How to get the two biggest objects/blobs from a binary image?

3 visualizaciones (últimos 30 días)
peyush
peyush el 19 de Jul. de 2015
Comentada: peyush el 20 de Jul. de 2015
I have a binary image having 3 or more blobs...I need to display an image which displays only the two biggest(biggest in terms of area) blobs while rejectingrejecting others....how can I do this?

Respuesta aceptada

Image Analyst
Image Analyst el 20 de Jul. de 2015
Try bwareafilt():
BW2 = bwareafilt(BW, 2, 'Largest');

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by