将像素坐标转换为笛卡尔坐标 [英] Convert pixel coordinates to cartesian coordinates

查看:113
本文介绍了将像素坐标转换为笛卡尔坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将像素/屏幕坐标转换为直角坐标(x,y)?

How to convert pixel/screen coordinates to cartesian coordinates(x,y)?

我在图片上得到的信息是(参见图片):

The info I have on the pictures is (see image):

vFov (以度为单位), hFov (以度为单位),像素宽度,像素高度

vFov in degrees, hFov in degrees, pixel width, pixel height

基本上我想要的是获取图像上的任何像素,并计算其远离图像中心的相对度.

Basically what I want is to take any pixel on the image, and calculate the relative degrees it is away from the center of the image.

推荐答案

由于没有足够的信息,您永远不能-原则上将像素坐标转换为3d-坐标.这与c ++或任何语言都没有关系.试想一下您用相机拍摄的照片.它是2D,但是实际字词是3D,并且图片中不包含第三维(模糊度除外).

You can never - by principal - convert pixel coordinates to 3d-cooridnates since there is not enough information. This has nothing to do with c++ or any language. Just think of a picture you take with a camera. It is 2D, however the real word is 3D and the third dimension is not in contained in the picture (except for blurryness).

这篇关于将像素坐标转换为笛卡尔坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆