Removal Of objects from binary image.

7 ビュー (過去 30 日間)
Mohammed Farhan
Mohammed Farhan 2014 年 2 月 19 日
編集済み: Dishant Arora 2014 年 2 月 22 日
Hello, actually I am new to matlab and want to know how to remove some objects from a binary image based upon area. Such that when a particular threshold is set the components of image having area above threshold is removed. Like removing a large vessel of eye and not removing small ones. Is there any function??? Please provide assistance!
  2 件のコメント
mohammed
mohammed 2014 年 2 月 19 日
Dishant Arora
Dishant Arora 2014 年 2 月 19 日
it definitely is!!

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

採用された回答

Dishant Arora
Dishant Arora 2014 年 2 月 19 日
編集済み: Dishant Arora 2014 年 2 月 20 日
once you have got the binary image,you can do the following:
outputImage = xor(BW , bwareaopen(BW , threshArea));
% BW being the binary image
% it will discard objects with area greater then threshArea
imshow(outputImage)
  2 件のコメント
Mohammed Farhan
Mohammed Farhan 2014 年 2 月 22 日
Thanks!

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

その他の回答 (1 件)

Image Analyst
Image Analyst 2014 年 2 月 19 日
I just did that in the past month or two for someone - extracting the main vasculature of the retina in a fundus photograph. Look up the tag eye and look for my name. Or look in my File Exchange or at bwareaopen as Dishant suggests.
  6 件のコメント
Mohammed Farhan
Mohammed Farhan 2014 年 2 月 22 日
Thank you very much! But I still get an error:
Undefined variable "blobMeasurements" or function "blobMeasurements.MeanIntensity".
Error in naew (line 118) allBlobIntensities = [blobMeasurements.MeanIntensity];
Please Help
Dishant Arora
Dishant Arora 2014 年 2 月 22 日
編集済み: Dishant Arora 2014 年 2 月 22 日
You need to call regionprops before running this snippet like:
blobMeasurements = regionprops(labeledImage,grayImage,'all');
or
blobmeasurements =regionprops(labelleImage,grayImage,'Area','MeanIntensity');

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

Community Treasure Hunt

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

Start Hunting!

Translated by