Count Object on color
13 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
hanis nadhirah
el 7 de Nov. de 2019
Comentada: hanis nadhirah
el 9 de Nov. de 2019
Hello , I just use threshold app to isolate object with same color. However , i try use bwlabel to count object from result but it does not count . Can you help me ? Thank you.
0 comentarios
Respuesta aceptada
Image Analyst
el 7 de Nov. de 2019
Call it then call bwlabel():
[BW,maskedRGBImage] = createMask(RGB);
[labeledImage, regionCount] = bwlabel(BW);
regionCount is the count of the colored objects you masked out.
5 comentarios
Image Analyst
el 8 de Nov. de 2019
Thanks for accepting the answer. You might also use bwareafilt() or bwareaopen() to remove noise while leaving the shape of the other blobs unchanged. imopen() and imclose() will change the shape of blobs, which may or may not be acceptable to you. imclose() will tend to make blobs rounder/smoother while imopen() tends to make blobs pointier.
Más respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!