Centroid detection for irregular shape objects
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am trying to find the centroid of irregular shaped objects from a binary image. For some objects, no centroid is detected and for some, more than one centroid is detected. I am using regionprops with bwconncomp(8-neighbourhood). Some objects have holes in them whereas others are filled.Please advice on how to proceed?
0 comentarios
Respuestas (3)
Image Analyst
el 17 de Mzo. de 2015
That sounds really bizarre. Please attach your binary image so I can try it. There can be a few reasons why you might think that some objects have two centroids, for example if you have a disc surrounded by a C - both centroids would lie in the disc. And so you might think the C had no centroid while the disc had two centroids. Be aware that the centroid of a region does not necessarily lie within the region, like in the example of a C-shaped region.
6 comentarios
Image Analyst
el 23 de Mzo. de 2015
Well the answer is that each blob that you identified has one and exactly one centroid. Not two. Not three or four. One.
The real problem is that your segmentation is all messed up. It sort of looks like you did an edge filter, then dilated it and thresholded it, or something like that. Whatever you did, the binary image it produces (in your "Answer" below) is all messed up. I mean, you've identified virtually the whole background as one big foreground blob! Moreover, the solid black particles do not appear correctly in the segmentation. What did you do? Actually I don't know if it's even worth fixing or if it would be best to just start over with a brand new, but effective, algorithm. Anyway, attach your segmentation code so I can look at it and instruct you why it didn't work.
Avinash Andhale
el 1 de Dic. de 2017
i want to find centroid of the detected object in a image ..How to do that ?
0 comentarios
Ver también
Categorías
Más información sobre Image Segmentation and Analysis en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!