Regionprops vs. imfindcircles
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
KatherineL
el 25 de Mzo. de 2020
Respondida: Harikrishnan Balachandran Nair
el 17 de Ag. de 2021
Hello, I want to detect circles in a live video and I manage to do that with a while-loop. When using imfindcircles(), the circles' center are in order of strength, the most likely circles is the first one and so on. I am wondering how regionprops outputs its regions. It finds more circles than I need, so I would like to choose which circles to use further in my code.
Short one: regionprops() finds circles, I want the 3 strongest circles. Is this possible with regionprops()?
0 comentarios
Respuestas (1)
Harikrishnan Balachandran Nair
el 17 de Ag. de 2021
From my understanding, you want to know if 'regionprops' can be used to extract the strongest three circles from a frame.
The 'regionprops' function returns , as a structure or table, the measure for the set of specified properties, for all the connected components in the binary image.It can also return the 'PixelList' for each connected component, centroid, boundingbox etc .You can sort the structure with respect to the measure of property of interest, and plot the pixels in the corresponding 'n' objects which have the highest value for the specified property. Alternatively, you can use the 'bwpropfilt' function to directly extract the 'n' objects from the binary image, which have the largest values for the specified attribute. The following line of code does the same.
bw2=bwpropfilt(bw,attrib,n);
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!