【opencv】教程代码 —ImgProc (6)通过Wiener滤波器恢复运动模糊图像

6. motion_deblur_filter.cpp通过Wiener滤波器恢复运动模糊图像(参数难调)

041b19fe4367cd3ad97226acf09690f5.jpeg

1107288b85498e9aa15070fd3da23972.jpeg

03584f318a7bc14b8e13ea2098877960.jpeg

您将学习如何使用维纳滤波器恢复具有运动模糊失真的图像

d204a81fa2df0e6ddb530361fd762800.png

/**
* @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              
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值