我有两个图像:原始图像和模糊图像。主要问题是估计用于对原始图像进行卷积以获得模糊的内核。
获取模糊图像的简单示例:
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);
现在想象我有 Mat src_raw和blured并且应该估计kernel。我没有找到任何opencv函数来做到这一点。也许我需要一些优化算法来获得它?如果是,我可以在 opencv 包中找到它吗?
谢谢