Near are to a value
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Alejandro Fernández
el 27 de Abr. de 2020
Comentada: Alejandro Fernández
el 27 de Abr. de 2020
Hi, I was wondering if anyone knows how I can program the option for a binary image to which all its regions have been tagged to determine the index of that region whose area is closest to a value I enter, for expample 1.
value = 1;
0 comentarios
Respuestas (1)
Image Analyst
el 27 de Abr. de 2020
To extract the index of a desired number from a labeled (what you call "tagged") image, you can do this:
[labeledImage, numRegions] = bwlabel(allBlobs); % allBlobs is your binary image.
% Now extract blob #7 ONLY into a new binary image:
oneSingleBlob = ismember(labeledImage, 7);
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!