フィルターのクリア

pixel Segmentation using histograms

2 ビュー (過去 30 日間)
Mehwish
Mehwish 2013 年 8 月 28 日
Hi, I am facing with a theoretical confusion and I hope some one can clear it up for me.
Is it possible to find gradients on the basis of a simple histogram?
I came across a mention of an algorithm which finds gradients on the basis of highest peaks of a histogram but I wasn't able to find it on web even after much searching.
Can someone please point me in the right direction if any of you have any idea regarding this? I shall be extremly grateful.
Thanks
Mehwish

採用された回答

Image Analyst
Image Analyst 2013 年 8 月 28 日
Not in general, though with fancier algorithms you can find some gradients (edges). For example using the range filter in the Image Processing Toolbox:
I = imread('liftingbody.png');
J = rangefilt(I);
imshow(I), figure, imshow(J);
or using stdfilt() or graycomatrix(). But these are a little more complicated than a simple global histogram of the whole image.

その他の回答 (1 件)

Mehwish
Mehwish 2013 年 8 月 28 日
編集済み: Mehwish 2013 年 8 月 28 日
Thanks a lot Image Analyst. You have really solved huge issue for me.
I have another thing. For example using your lines of code if I want to display only those areas in the J image which are lighter in color than the rest of the pixels of the image how to do so? And make the rest of the pixels white?
Please advise.
Thanks Mehwish
  2 件のコメント
Image Analyst
Image Analyst 2013 年 8 月 28 日
darkPixels = J < 150; % or whatever.
I(darkPixels) = 255; % Set dark pixels to white in the original image.
imshow(I);
Mehwish
Mehwish 2013 年 8 月 28 日
Thanks :)

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

カテゴリ

Help Center および File ExchangeModify Image Colors についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by