how can i calculate the distabce between the “center of mass” of the green light, and it’s corners?
simple get the coordinate for mid (x,y) then get coordinates for corner(x1,y1)
now use the distance formual –
sqareroot( (x-x1)^2 + (y-y1)^2) I think
I believe that the centroid values available from the camera are “center of mass” values and not the exact center of the bounding box. With one light being tracked, those are accurate enough, but when tracking two lights, the centroid values will stray towards the light that is closest to you.
O yea I forgot about this how foolish of me. Hmm Well if the twoo or more target are of same area than you can use the pixels but the same problem of distance occurs. Maybe if you can caculate the distance to one off the target or use the VW function to get 1 target you could do it. Using VW gives can theoretically get you down to one target I belive. Am I right or dead wrong?