Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

Ball Tracking

$
0
0
Hello, I am working on ball tracking. So far, using a calibrated camera, i have segmented a court area and segmented the ball from the background. We know the dimensions of the court and the ball. The court was segmented and a homography transform gives us a handle of remapping it. Using the homography, i can map back to the court model. ![image description](/upfiles/14425688598829116.png) I want to do the same with the ball. Since the ball bounces, we need to use it's diameter to determine it's distance from the camera. Homography doesn't work for a bouncing ball. Treating the ball as a 2D circle of diameter 23.44 cm. Using this, it's quite easy to use solvePNP to get the rotation/translation matrices for the object. But this is in 'camera space'. Now, i guess we want to match up the homography transform and the rvec/tvec of solvePNP. Expected Result: As above, the ball can be mapped to the court model for a 'top down' view of it's position. If i used a court model and applied solvePNP, then i would have rvec/tvec for the court also in the same space as the ball. How do i get metric values? How do i get the co-ordinates of the ball as an x/y location on the court surface? Regards, Daniel

Viewing all articles
Browse latest Browse all 41027


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>