By Ev Zisselman Modified by Yuhao Liao
Add a create_blurred_images.m script under image_helpers path to generate background-in-focus and foreground-in-focus pair from an original image which has clear background-foreground boundary.
Since the situation is different from image to image, I just took an image with a sheep right in the middle of the frame to showcase how to create the background-in-focus and foreground-in-focus pair from it. For other situations, other types of morphological operations and different parameters might be needed.
Result of multi-focus image fusion of the images sheep (background and foreground in-focus) using
Demo_Multi_Focus_Fusion.m
:
A Local Block Coordinate Descent Algorithm for the CSC Model
This is the Matlab package that implements the LoBCoD algorithm.
E. Zisselman, J. Sulam and M. Elad, "A Local Block Coordinate Descent Algorithm
for the Convolutional Sparse Coding Model". CVPR 2019.
@InProceedings{Zisselman_2019_CVPR,
author = {Zisselman, Ev and Sulam, Jeremias and Elad, Michael},
title = {A Local Block Coordinate Descent Algorithm for the CSC Model},
booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2019}
}
Download the package to a local folder (e.g. ~/LoBCoD/) by running:
git clone https://github.com/EvZissel/LoBCoD.git
Open Matlab and navigate to the folder (~/LoBCoD/).
This code uses the following packages:
- vlfeat - An open library of computer vision algorithms.
- SPAMS optimization toolbox - For its implementation of the batch LARS algorithm.
Make sure you have all mex files downloaded in the mexfiles path for your specific platform, i.e.
- Linux® — .mexa64
- Apple macOS — .mexmaci64
- Microsoft® Windows® — .mexw64
Before running any demo program within the demos/ path, run the command in Command Window below:
addpath demos
This package contains the following main modules:
Module | Description |
---|---|
LoBCoD.m | The main function that implements the batch LoBCoD algorithm |
Demo.m | A demo script that applies the function LoBCoD.m on the Fruit dataset |
LoBCoD_online.m | A function that implements the online LoBCoD algorithm |
Demo_online.m | A demo script that applies LoBCoD_online.m on a subset of mirflickr dataset |
inpainting_LoBCoD.m | A function that implements inpainting using LoBCoD.m |
Demo_inpainting.m | A demo script that applies inpainting_LoBCoD.m |
Demo_Multi_Focus_Fusion.m | A demo script for implementing multi-focus image fusion |
Demo_Multi_Exposure_Fusion.m | A demo script for implementing multi-exposure image fusion |
Demo_Text_Image_Denoising.m | A demo script for implementing salt-and-pepper text image denoising |
The training curves of the LoBCoD algorithm using Demo.m
(trained on the Fruit dataset):
The converging objective value of the test set using Demo_online.m
(trained on a subset of mirflickr dataset):
Example of inpainting of the corrupted Barbara image using Demo_inpainting.m
:
Example of multi-focus image fusion of the images Bird (background and foreground in-focus) using Demo_Multi_Focus_Fusion.m
:
Example of multi-exposure image fusion of the images Window using Demo_Multi_Exposure_Fusion.m
:
Example of salt-and-pepper text image denoising using Demo_Text_Image_Denoising.m
: