what is error in this sobel function code

I edit the code in this format
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'); figure,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 commentaire

Jan
Jan le 26 Juin 2013
Modifié(e) : Jan le 26 Juin 2013
Please format your code and explain any details about why you assume, that there is an error. E.g. a copy of the complete error message will reveal many information. Please add this by editing the question, not as comment or answer. Thanks.

Connectez-vous pour commenter.

Réponses (1)

Image Analyst
Image Analyst le 26 Juin 2013

0 votes

You forgot to post the error, but if you use the sobel option of edge, it takes a single threshold, not an array of two thresholds like you tried to do.

Question posée :

le 26 Juin 2013

Community Treasure Hunt

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

Start Hunting!

Translated by