Sobel Operator no threshold

4 ビュー (過去 30 日間)
GARRETT
GARRETT 2014 年 3 月 3 日
コメント済み: Anand 2014 年 3 月 4 日
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 日
Don't use edge(). Use imgradient() instead. You will get the actual Sobel filtered image.
  2 件のコメント
GARRETT
GARRETT 2014 年 3 月 3 日
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,[]);
Anand
Anand 2014 年 3 月 4 日
For 256 bins, you could use
h = hist(Gmag(:),256);

サインインしてコメントする。

その他の回答 (1 件)

Anand
Anand 2014 年 3 月 3 日
[Gx,Gy] = imgradientxy(im,'sobel');

Community Treasure Hunt

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

Start Hunting!

Translated by