6. motion_deblur_filter.cpp通过Wiener滤波器恢复运动模糊图像(参数难调)
您将学习如何使用维纳滤波器恢复具有运动模糊失真的图像
/**
* @brief 学习如何使用Wiener滤波器恢复运动模糊失真的图像。
* @author 混沌鱼, karpushin@ngs.ru, https://github.com/VladKarpushin
*/
#include <iostream>
#include "opencv2/imgproc.hpp"
#include "opencv2/imgcodecs.hpp"
// 使用OpenCV和标准库的命名空间
using namespace cv;
using namespace std;
// 函数声明
void help();
void calcPSF(Mat& outputImg, Size filterSize, int len, double theta);
void fftshift(const Mat& inputImg, Mat& outputImg);
void filter2DFreq(const Mat& inputImg, Mat& outputImg, const Mat& H);
void calcWnrFilter(const Mat& input_h_PSF, Mat& output_G, double nsr);
void edgetaper(const Mat& inputImg, Mat& outputImg, double gamma = 5.0, double beta = 0.2);
// 定义程序可能接受的命令行参数。
const String keys =
"{help h usage ? | | print this message