编程语言
首页 > 编程语言> > C#图像处理-OpenCVSharp教程(十七) OpenCVSharp图像边缘检测--Canny、Sobel、Laplacian

C#图像处理-OpenCVSharp教程(十七) OpenCVSharp图像边缘检测--Canny、Sobel、Laplacian

作者:互联网

本文作者Color Space,文章未经作者允许禁止转载!

本文将介绍OpenCVSharp图像边缘检测--Canny、Sobel、Laplacian!

代码演示:

///Canny边缘检测演示
Mat srcImg = Cv2.ImRead("2.png");
Cv2.ImShow("src", srcImg);
Mat grayImg = new Mat();
Cv2.CvtColor(srcImg, grayImg, ColorConversionCodes.BGR2GRAY);
Cv2.GaussianBlur(grayImg, grayImg, new Size(3, 3), 0, 0);
Cv2.Canny(grayImg, grayImg, 30, 100);
Cv2.ImShow("Canny&

标签:srcImg,Mat,Sobel,C#,Cv2,OpenCVSharp,Canny,grayImg
来源: https://blog.csdn.net/stq054188/article/details/117905114