用OpenCVSharp 4.5 跑一遍OpenCV官方教程
原官方教程链接:OpenCV: Periodic Noise Removing Filter
原作者有意埋了坑,完全照抄是不行的.......
using System;
using OpenCvSharp;
namespace ConsoleApp1
{
class tutorial33 : ITutorial
{
public void Run()
{
Mat imgIn = Cv2.ImRead("I:\\csharp\\images\\period_input.jpg", ImreadModes.Grayscale);
if (imgIn.Empty()) //check whether the image is loaded or not
{
Console.Write("ERROR : Image cannot be loaded..!!");
return;
}
imgIn.ConvertTo(imgIn, MatType.CV_32F);
// it needs to process even image only
Rect roi = new Rect(0, 0, imgIn.Cols & -2, imgIn.Rows & -2);
imgIn = imgIn[roi];
// PSD calculation (start)
Mat imgPS

本文详细介绍了使用OpenCVSharp 4.5 执行OpenCV官方教程中关于周期噪声去除滤波的过程,包括PSD计算、H矩阵合成和频域过滤操作,适合学习者跟随步骤调试和理解OpenCV图像处理技术。
最低0.47元/天 解锁文章
837

被折叠的 条评论
为什么被折叠?



