Sobel function error in image

I edit the code but again there is an error
I=imread('first palm.jpg');
subplot(1,2,1);
imshow(I);title('first palm');
BW1=edge(I,'sobel');
BW2=edge(I,'canny');
subplot(1,2,2);
imshow(BW1);
title('sobel edge detector image');
subplot(1,2,1);
imshow(I);
title('first palm');
subplot(1,2,2);
imshow(BW2);title('canny edge detector image');
and this error "Error in Edges (line 4) BW1=edge(I,'sobel');" appear to me

1 comentario

eltaf kazemi
eltaf kazemi el 28 de Abr. de 2021
most of these are for gray scale images.
I suggest using "rgb2gray"

Iniciar sesión para comentar.

Respuestas (1)

Image Analyst
Image Analyst el 17 de Dic. de 2013

0 votos

If you still care, is I an RGB image or gray scale?

Categorías

Más información sobre Image Processing Toolbox en Centro de ayuda y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Preguntada:

el 9 de Jul. de 2013

Comentada:

el 28 de Abr. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by