Help: Edge detection technique of image

1 次查看(过去 30 天)
I have used the following code
close all;
a = imread('3.bmp');
imshow(a)
figure
imedge = edge(img, 'sobel',0.05);
imshow(imedge, 'ColorMap', [1 1 1; 1 0 0]);
figure
title('sobel');
img = imread('3.bmp');
imedge1 = edge(img, 'prewitt',0.05);
imshow(imedge1, 'ColorMap', [1 1 1; 1 0 0]);
figure
title('prewitt');
img = imread('3.bmp');
imedge2 = edge(img, 'canny',0.05);
imshow(imedge2, 'ColorMap', [1 1 1; 1 0 0]);
figure
title('canny')
resulting in the following error:
Attempt to execute SCRIPT image as a function:
C:\Users\Administrator\Documents\MATLAB\image.m
Error in images.internal.basicImageDisplay (line 24)
hh = image(cdata, ...
Error in imshow (line 321)
hh = images.internal.basicImageDisplay(fig_handle,ax_handle,...
Error in m6 (line 3)
imshow(a)
Please help me to sort out this error. Any help is much appreciated.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Color and Styling 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by