Find the center of rotation of arbitrary points
Posted 18 January 2012 - 02:10 AM
I would also like to remove rotation (bank) of the camera, as the camera may be handheld and have a small amount of banking. Unfortunately, I don't know the center of the rotation. It may be near the center of the camera (center of the screen), or it may not be.
I can track several points, say a triangle, and I was hoping this would help me determine the center of rotation. However, I have no idea how to go about actually finding the center of rotation using these points at the moment.
Posted 18 January 2012 - 06:03 AM
Now you just need to figure out how to get the "average" convergence point of a set of lines. You could maybe look at all the intersection points of all pairs of lines and find the centroid of those, but that sounds expensive since it's O(n^2) in the number of lines. There's probably a better way, but I can't think of it at the moment.
Once you have the center, you can then find the angle of rotation by again considering each pair of points and calculating the angle between them relative to the center. Then averaging all the angles should give the best estimate for the true angle of rotation.
Posted 18 January 2012 - 09:57 AM
Posted 25 January 2012 - 09:55 AM
The way I would approach it is to look for horizontal linear features in the background. I would start with edge detection. Then convert this to a line list through a tracing algo.
This can be done reasonably quickly as I did it a while back in an app that converts bitmaps to laser displays. You can look at the various chunks of code for vectorizing bitmaps for sample code.
I would then scan the line list looking for line segments that were more or less horizontal, calculate the angle between the line and horizontal, and average it. This will give you an estimation of the bank angle, but it is highly dependant on the scene.
Without having some known datum points, I can't think of another way of doing it.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users