using a Prewitt filter to detect edges in a image
8 views (last 30 days)
Show older comments
Hi i am trying to do something basic just to acquint myself with image processing. I'm a newbie at this. I am just trying to use a Prewit filter to find the edges; This is the code that I have used:
ic = imread('ic.tif');
b = mean(ic,3);
px = [-1 0 1; -1 0 1; -1 0 1];
ic = filter2(px,ic);
figure, imshow(icx/255)
i get the statement:
Undefined function 'conv2' for input arguments of type 'double' and attributes 'full 3d real'.
before converting the image to a double it was saying that the filter function is 2d and the image is 3d. I am nt sure what to do . Please help.
1 Comment
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!