Number of pixel, image outline and image processing

5 ビュー (過去 30 日間)
Syahrul Niezam
Syahrul Niezam 2012 年 2 月 1 日
編集済み: Adrian 2013 年 9 月 26 日
I'm still new in Matlab. I had segmented gray scale image into four regions like this.
I would like to calculate area/no. of pixel for each region within each human image. My idea is drawing outline of each human images and then calculate no. of pixel for white, light gray and dark gray regions in the image. Is there any idea to do that, or better idea? What i learnt and found only the method for binary image, not same with this one.
Thanks in advance.

採用された回答

Sean de Wolski
Sean de Wolski 2012 年 2 月 1 日
doc bwconncomp
doc regionprops
doc bwarea
  19 件のコメント
Syahrul Niezam
Syahrul Niezam 2012 年 2 月 2 日
I would like to ask, is there any idea how to do labeling on non-binary image; like image above? What I understand, bwlabel is for binary (black and white) image only. Is it possible to 'recreate' or renovate itself?
Sean de Wolski
Sean de Wolski 2012 年 2 月 2 日
A label image can be _ANY_ image if you choose to treat it as such. That is, you can treat equal intesities as objects.

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

その他の回答 (1 件)

Image Analyst
Image Analyst 2012 年 2 月 1 日
See my image segmentation tutorial: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862. I do that exact thing, except for coins instead of humans.
  8 件のコメント
Syahrul Niezam
Syahrul Niezam 2012 年 2 月 2 日
I want to apply labeling in above image, so that I can calculate no. of pixel for each levels; white, light gray, dark gray and black.
http://i44.tinypic.com/2nq8piw.jpg
However, I would like to calculate separately for each subject(human and non-human).
I really hope any code, basic or idea to do that.
Image Analyst
Image Analyst 2012 年 2 月 2 日
First use bwareaopen() to get rid of small regions. Then say
binaryImage = yourImage >= 100 & yourImage <= 150; % Or whatever it needs for the range you're interested in.
labeledImage = bwlabel(binaryImage);
measurements = regionprops(labeledImage, 'area');

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

Community Treasure Hunt

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

Start Hunting!

Translated by