Trying to find center of contour using color-blob-detection [closed]
Hello every one.
I'm sorry for this lame question but I´m looking for a quick fix.
As an open project at my uni I´m building an object tracking robot.
I have limited amount of time and resources. The plan is to use my android phone to find x-coordinates of a ball on the floor. Then sending them via USB to an Arduino that controls the rest of robot. I've been trying to teach myself something in both Android development and OpenCV but with limited luck on the OpenCV half.
The OpenCV sample color-blob-detection is working fine but I would love to get the x and y coordinates of the center of contour.
Is there an easy way to do this or should I just keep looking at tutorials and try to build a code from scratch?
With hope of an answer, Saevar.
just get the boundingrect of your contour, and get the center from that
Thank you, that worked