问题
Given a picture taken by a simple digital that contains an image of a rectangle of known dimensions. How can I - to some degree of accuracy - determine the parameters of this camera?
I am mostly interested in Pan-, Tilt- and Swing angles. Optionally distance to the rectangle would be nice.
I acknowledge the fact that the focal length and resolution of the camera should be known, but it can be assumed that they are available (for example through exif metadata).
Are there any simple algorithms for this problems?
回答1:
What you are looking for are camera calibration algorithms. A commonly used one is Zhang's algorithm.
For more information regarding calibrating cameras, a good source is Hartley and Zisserman's textbook
回答2:
for a slightly simpler introduction and sample code see (chap 12 IIRC)
来源:https://stackoverflow.com/questions/1060350/determining-camera-parameters