Hi Question is about eleminating unwanted regions in binary image.

I work on fundus image , bwareaopen() function removes all connected components fewer than P pixels. But in my image I need to remove all the regions which have more than 11 pixels how can I do so? And how can I calculate the metrics of each region and eliminate the structures having metrics less than 0.95?

Risposte (1)

So P=11, right? Did you try this:
binaryImage = bwareaopen(binaryImage, 11);
Regarding "metrics", I think you need to do a spatial calibration, and I attach my demo for that. So then use regionprops() and multiply linear measurements by the spatial calibration factor and area measurements by the spatial calibration factor squared.

5 Commenti

If I use p=11 it will eliminate all the regions that have less than 11 pixels but I need to eliminate all the regions that have more than 11 pixels .
Try bwareafilt:
smallBlobs = bwareafilt(binaryImage,[1, 11]);
If I'm not wrong that function is only available in r2015b . I work with r2013b . so any other suggestions?
You can do what Image Analyst mentioned:
binaryImage_out = bwareaopen(binaryImage_in, 11);
Later, subtract binaryImage_in and binaryImage_out.
binaryImage = binaryImage - bwareaopen(binaryImage, 11);

Accedi per commentare.

Categorie

Scopri di più su Convert Image Type in Centro assistenza e File Exchange

Richiesto:

il 10 Gen 2016

Commentato:

il 13 Gen 2016

Community Treasure Hunt

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

Start Hunting!

Translated by