将摄像机视图中的 x/y 值转换为平移/倾斜值
如果我有一台可以提供 360 度平移 (x) 和倾斜 (y) 值的摄像机,并且我想获取光标在摄像机视图中的位置的平移和倾斜值,我将如何转换它?
更多信息: 这是一个 Flash/AS3 项目。 平移和倾斜值来自摄像机视图的中心。 相机视图尺寸为 960x540。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您给出的“视图”大小以像素为单位。 您需要知道的是视野 (FOV),以度为单位测量。 由此您可以得知从中心到图像边缘的度数。
您也许可以在相机的技术规格中找到 FOV。 (它由探测器阵列尺寸和焦距决定)。 或者,您可以尝试测量它。 以下网页解释了操作方法:
http://www.panohelp.com/lensfov.html
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