function I=my_edge(method,img,thresh,sigma) %Sobel ,Prewitt ,Roberts approximation近似,返回梯度最大点作为边缘 %The Laplacian of Gaussian method将图像先通过Laplacian of Gaussian filter,以过零点作为判断 %zero-cross 方法(不要求)以自定义filter后,判断过零点 %Canny 由高斯标准差算梯度, 然后用两个域值 two thresholds, 然后延伸大域值
img=my_im2dou(img); %得到图像长宽 m = size(img,1); n = size(img,2); kx=1;ky=1; %便于对图像内部处理 rr = 2:m-1; cc=2:n-1;% The output edge map:生成一个m×n的全零矩阵,作为输出,其实是一个逻辑阵 I = repmat(false, m, n);
%Sobel ,Prewitt ,Roberts approximation近似,返回梯度最大点作为边缘
%The Laplacian of Gaussian method将图像先通过Laplacian of Gaussian filter,以过零点作为判断
%zero-cross 方法(不要求)以自定义filter后,判断过零点
%Canny 由高斯标准差算梯度, 然后用两个域值 two thresholds, 然后延伸大域值
%得到图像长宽
m = size(img,1);
n = size(img,2);
kx=1;ky=1;
%便于对图像内部处理
rr = 2:m-1; cc=2:n-1;% The output edge map:生成一个m×n的全零矩阵,作为输出,其实是一个逻辑阵
I = repmat(false, m, n);