Sobel Operator no threshold

I'm using the "edge(img,'sobel')" function but it returns a matrix that is logical. Is there a way to make it a uint8? I want to see it just the filtering.

 采纳的回答

Image Analyst
Image Analyst 2014-3-3

0 个投票

Don't use edge(). Use imgradient() instead. You will get the actual Sobel filtered image.

2 个评论

Thanks that worked, how would I show the histogram for it?
I was able to see it by [Gmag, Gdir] = imgradient(img,'sobel'); imshow(Gxy,[]);
For 256 bins, you could use
h = hist(Gmag(:),256);

请先登录,再进行评论。

更多回答(1 个)

Community Treasure Hunt

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

Start Hunting!

Translated by