I have two images: original and blured. The main problem is to estimate kernel which was used for convolution of original image for getting blured.
Simple example getting blured image:
Mat src_raw = imread("D:/codes/debluring/img/lena.png", 1);
Mat kernel = (Mat_<float>(5, 5) <<
0.0392, 0.0398, 0.0400, 0.0398, 0.0392,
0.0398, 0.0404, 0.0406, 0.0404, 0.0398,
0.0400, 0.0406, 0.0408, 0.0406, 0.0400,
0.0398, 0.0404, 0.0406, 0.0404, 0.0398,
0.0392, 0.0398, 0.0400, 0.0398, 0.0392
);
Mat blured;
filter2D(src_raw, blured, src_raw.depth(), kernel);
imshow("Source Image", src_raw);
imshow("Blurred", blured);
cvWaitKey(0);
Now imagine that i have Mat src_raw and blured and should estimate kernel. I didn't find any opencv functions to do it. Maybe i'll need some optimization algorithm to get it? If yes, can I find it in opencv package?
Thank you