user110791
user110791

Reputation:

Converting x/y values in camera view to pan/tilt values

If I have a camera which gives out 360 degree pan (x) and tilt (y) values, and I want to get the pan and tilt values of where I have my cursor in the camera's view, how would I convert that?

More info: It's a Flash/AS3 project. The pan and tilt values are from the center of the camera view. Camera view size is 960x540.

Upvotes: 2

Views: 2822

Answers (1)

nsanders
nsanders

Reputation: 12656

You gave the "view" size in pixels. What you need to know is the Field of View (FOV), which is measured in degrees. From that you can tell the number of degrees from center to the image edges.

You might be able to find the FOV in your camera's technical specifications. (It's determined by the detector array size and the focal length). Alternatively, you could try measuring it. Here's a webpage that explains how:

http://www.panohelp.com/lensfov.html

Upvotes: 1

Related Questions