Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement iterative blind deblurring algorithm #433

Closed
Andrey1994 opened this issue May 14, 2017 · 14 comments
Closed

Implement iterative blind deblurring algorithm #433

Andrey1994 opened this issue May 14, 2017 · 14 comments
Assignees
Labels

Comments

@Andrey1994
Copy link
Contributor

This algorithm iterates between updating the restored image and PSF, based on error function minimization

@windyuan
Copy link
Contributor

looking forward to see this feature. thank you.

@windyuan
Copy link
Contributor

@Andrey1994 is selected from GSoC (Google Summer of Code https://summerofcode.withgoogle.com) and now is working on this feature. More details from https://github.com/Andrey1994/ImageDeblurring/wiki
Some steps to enable.

  1. investigation on deblurring algorithms (done)
  2. simulate by matlab or OpenCV (WIP) and tune a good quality on synthetic and real blurring images.
  3. porting and clean up code in libxcam with OpenCL.
  4. quality and performance tuning.
    Thanks,
    Wind

@Andrey1994
Copy link
Contributor Author

The first version of the IBD algorithm is merged(#450). Performance and quality improvements required(WIP)

@windyuan
Copy link
Contributor

windyuan commented Aug 2, 2017

Cool. Thanks for @Andrey1994 efforts on IBD enabling.
This feature initiated from GSoC
libxcam Enable a debluring feature with OpenCL Design

@windyuan
Copy link
Contributor

windyuan commented Aug 9, 2017

#454
#453
merged for debluring framework refine.

@excllent123
Copy link

 The result of function edgetaper don't  agree with matlab‘s,  and  I have tested  this function, It doesn't work. Can you update your code? or tell me how it works.  
Thank  you.

@windyuan
Copy link
Contributor

@excllent123, could you post the picture from both matlab and libxcam. this can help us to figure out if it's a bug. about the pictures, if not convenient in public, you can also send mail to us (feng.yuan@intel.com and a1994ndrey@gmail.com)
@Andrey1994, could you help check whether it's a bug or something wrong in usage?

@Andrey1994
Copy link
Contributor Author

Yep, I will check it. This function just blur the edges with some weights, could you send me how do you use it?
For now I see one mismatch, I used correlation instead convolution, so for non-symmetric psf it will be differ. I will compare it with matlab results more detailed and fix a code

@excllent123
Copy link

excllent123 commented Sep 12, 2017

My test code is like this:
Firstly, I pad the image by using copyMakeBorder in opencv,
cv::copyMakeBorder(Img,Img,size,size,size,size,cv::BORDER_REPLICATE);
and then  use  edgetaper
Img = edgetaper(Img,BlurKernel); 
and the BlurKernel  is motion-blur-kernel,  
[0,0,0,0,0
 0 0 0 0 0
 1/5 1/5 1/5 1/5 1/5
 0 0 0 0 0 
 0 0 0 0 0]

I have compared with the output of this function with matlab, but the result is different,  
and It does'nt work,the result of  image I will send to your email.
Thank you for your help

@Andrey1994
Copy link
Contributor Author

why do you pad image? edgetaper saves the initial sizes. Also Img has to be a single channel image.

I've checked matlab version and libxcam version, there are a little difference in weights calculation, but both version are good for ringing artifacts removing. @windyuan Have we fix weights initialization?

@windyuan
Copy link
Contributor

windyuan commented Sep 12, 2017

@Andrey1994 If there's only one rule for weights(matlab version). we need fix. Else, keep the current version.

@Andrey1994
Copy link
Contributor Author

@excllent123 Matlab calculates the autocorrelation of PSF in another and in my opinion rather strange way. They use 1d autocorrelation of vector which is a sum of each PSF rows\columns. In libxcam we use 2d autocorrealtion of PSF. That's why their weights are differ

Maybe their implementation outperform our, but I think both of them can be used. So, I think at least for a while we will keep current version.

@excllent123
Copy link

@Andrey1994 Thanks for your help.

@windyuan
Copy link
Contributor

close this feature since already released in 1.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants