matlab中图像边缘检测 edge函数总在报错?I=imread('E:\MATLAB\work\lenna.tif');BW1=edge(I,'prewitt');BW2=edge(I,'canny');subplot(1,2,1);subimage(BW1);title('prewitt算子分割效果图');subplot(1,2,2);subimage(BW2);title('canny算子分割

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/09 06:13:39
matlab中图像边缘检测 edge函数总在报错?I=imread('E:\MATLAB\work\lenna.tif');BW1=edge(I,'prewitt');BW2=edge(I,'canny');subplot(1,2,1);subimage(BW1);title('prewitt算子分割效果图');subplot(1,2,2);subimage(BW2);title('canny算子分割

matlab中图像边缘检测 edge函数总在报错?I=imread('E:\MATLAB\work\lenna.tif');BW1=edge(I,'prewitt');BW2=edge(I,'canny');subplot(1,2,1);subimage(BW1);title('prewitt算子分割效果图');subplot(1,2,2);subimage(BW2);title('canny算子分割
matlab中图像边缘检测 edge函数总在报错?
I=imread('E:\MATLAB\work\lenna.tif');
BW1=edge(I,'prewitt');
BW2=edge(I,'canny');
subplot(1,2,1);
subimage(BW1);
title('prewitt算子分割效果图');
subplot(1,2,2);
subimage(BW2);
title('canny算子分割效果图');
报错:
? Error using ==> edge>parse_inputs at 537
Not enough input arguments.
Error in ==> edge at 197
[a,method,thresh,sigma,thinning,H,kx,ky] = parse_inputs(varargin{:});

matlab中图像边缘检测 edge函数总在报错?I=imread('E:\MATLAB\work\lenna.tif');BW1=edge(I,'prewitt');BW2=edge(I,'canny');subplot(1,2,1);subimage(BW1);title('prewitt算子分割效果图');subplot(1,2,2);subimage(BW2);title('canny算子分割
注意图像格式,double格式的灰度图!
I=imread('原始图像');
I1=rgb2gray(I);
I2=im2double(I1);