Help: Edge detection technique of image

1 view (last 30 days)
ruban ramalingam
ruban ramalingam on 10 Dec 2019
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.

Answers (0)

Categories

Find more on Color and Styling in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!