フィルターのクリア

how to find the area of black region in image....?

2 ビュー (過去 30 日間)
Meena
Meena 2012 年 5 月 15 日
I have to find the blank area in the image...ie its value is 0..how to find the area..help me out...

回答 (3 件)

Andrei Bobrov
Andrei Bobrov 2012 年 5 月 15 日
s = regionprops(YourImage == 0,'Area','PixelIdxList')
add
I = imread('44298455.png');
i0 = im2bw(I,graythresh(I));
s = regionprops(i0 == 0,'Area','PixelIdxList')
  4 件のコメント
Meena
Meena 2012 年 5 月 15 日
http://imageshack.us/photo/my-images/528/44298455.png/
this is image
Walter Roberson
Walter Roberson 2012 年 5 月 15 日
Is it the portion outside of the oval whose area you are trying to find?

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


Walter Roberson
Walter Roberson 2012 年 5 月 15 日
sum(YourImage(:) == 0)
  2 件のコメント
Meena
Meena 2012 年 5 月 15 日
not for whole image sir..I have to find the blank region first i.e segment the parts alone and then the area sir
Walter Roberson
Walter Roberson 2012 年 5 月 15 日
Are there parts of the image which contain blank areas that you do _not_ wish to have included? The code I gave does not give the area of the whole image, only of the blank area.

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


Image Analyst
Image Analyst 2012 年 5 月 15 日
Try this:
binaryImage = grayScaleImage == 0;
measurements = regionprops(binaryImage, 'Area');
allAreas = [measurements.Area]
allAreas will be an array of areas. Each physically separated, isolated, black region will have its own area in the array.
  4 件のコメント
Meena
Meena 2012 年 5 月 16 日
but not getting the exact area values
Meena
Meena 2012 年 5 月 16 日
pls tell me is there any otherway to find the no of blank or the area of blank spaces

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

Community Treasure Hunt

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

Start Hunting!

Translated by