原图
灰度:
roberts 算子:
prewitt算子
sobel 算子
canny算子
拉普拉斯
代码:
read_image (Image, 'C:/Users/alber/Desktop/opencv_images/canny.png')
rgb1_to_gray (Image, GrayImage)
* 测试 roberts 算子
roberts (GrayImage, ImageRoberts, 'gradient_sum')
roberts (GrayImage, ImageRoberts, 'roberts_max')
*prewitt_amp 算子测试
prewitt_amp (GrayImage, ImageEdgeAmp)
* sobel_amp 算子
sobel_amp (GrayImage, EdgeAmplitude, 'sum_abs', 3)
*canny
edges_image (GrayImage, ImaAmp1, ImaDir1, 'canny', 1, 'nms', 20, 40)
laplace_of_gauss (GrayImage, ImageLaplace, 1)