I want to use Circle Detection to detect circles, which I did. But the thing is that I want to detect the largest one out of for example 5 circles. Or at least get values for largest one. Can you help me in any way? If you can I would appreciate your help.
Thanks for your time.
Have you tried out the find_circles example under feature detection in the IDE? If so, you just have to choose the circle from the list of circle objects that has the largest radius. Please see the find circles example to get started.
I indeed was using that function for detecting circles. But I can’t find that list you are talking about. Are you talking about set “c” and if you are talking about it isn’t that set updated every time for loop is “updated”? But still thanks for your time.
Hi, the find_circles method returns a list of circle objects. If you want to get the max sized circle from that list you simply do:
circles = img.find_circles(...) if circles: largest_circles = max(circles, key = lambda x: x.r())
Or something like that. Um, if you need help with the python code just google for how to find the largest object in a list of objects, etc using python.
Thank you for helping. Didn’t know that!!
And is there a way for the camera to receive data or commands from UART and if it can, how??
See the Examples → Pixy Emulation → UART Color Tracking script for UART control examples.