Question

I am tracking user from webcam feed using opencv in Python so the code is something like this:

cv.EllipseBox( frame, track_box, cv.CV_RGB(255,0,0), 3, cv.CV_AA, 0 )

How do I print out the centroid of this ellipse in code? Do I have to convert the image (frame) itself to grayscale and use contour centroid to get it? Or can I just use the box (track_box) because using contour seems redundant if I already have a selection.

Was it helpful?

Solution

I think the center is a public data member of RotatedRect (track_box.center)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top