I think the center is a public data member of RotatedRect (track_box.center)
How to find centroid of a ellipse in my camshift tracking algorithm?
Domanda
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.
Soluzione
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow