问题描述
基于this question,我正在尝试将Azure Kinect sdk给定的x和y像素转换为以毫秒为单位的真实坐标。我正在使用以下python代码:
VRES = 720 # vertical resolution of the image in pixels
HRES = 1280 # horizontal resolution of the image in pixels
VFOV = 120 # vertical field of view of the camera in degrees
HFOV = 120 # horizontal field of view of the camera in degrees
def __init__(self,x,y,depth):
self.z = depth
self.x = int((2 * sin(pi * self.VFOV / 360) * depth * y) / self.VRES)
self.y = int((2 * sin(pi * self.HFOV / 360) * depth * x) / self.HRES)
使用的Kinect配置为:
self._config = pyk4a.Configuration()
self._config.depth_mode = pyk4a.K4A_DEPTH_MODE_WFOV_2X2BINNED
self._config.color_resolution = pyk4a.K4A_COLOR_RESOLUTION_720P
self._config.camera_fps = pyk4a.K4A_FRAMES_PER_SECOND_30
self._config.color_format = pyk4a.K4A_IMAGE_FORMAT_COLOR_BGRA32
self._config.synchronized_images_only = True
从here中,我发现FOV应为120°x 120°,而720p图像应为1280x720。 这种计算有什么问题?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)