如何使用Kinect从不同的对象获取真实世界的坐标(x,y,z) [英] How to get real world coordinates (x, y, z) from a distinct object using a Kinect

查看:336
本文介绍了如何使用Kinect从不同的对象获取真实世界的坐标(x,y,z)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须使用Kinect获取真实世界的坐标(x,y,z).实际上,我想要距Kinect的x,y,z距离(以米为单位). 我必须从场景中的唯一对象(例如,一个黄色的小盒子)获取这些坐标,并以不同的颜色上色.

I have to get the real world coordinates (x, y, z) using Kinect. Actually, I want the x, y, z distance (in meters) from Kinect. I have to get these coordinates from a unique object (e.g. a little yellow box) in the scenario, colored in a distinct color.

在这里您可以看到该场景的一个示例

Here you can see an example of the scenario

我想要架子上黄色物体的距离(x,y,z以米为单位).

I want the distance (x, y, z in meters) of the yellow object in the shelf.

请注意,在此情况下不需要一个人(骨骼).

Note that is not required a person (skeleton) in the scenario.

首先,我想知道是否有可能且容易做到? 因此,如果您发送一些可以帮助我完成此任务的链接/代码,我将不胜感激.

First of all, I would like to know if it is possible and simple to do? So, I would appreciate if you send some links/code that could help me doing this task.

推荐答案

您将需要同时使用颜色流深度流.

首先,使用Color Stream,您需要收集与所需颜色匹配的像素阵列,然后从Depth Stream查找这些像素的深度数据,以获取与相机的平均距离.那给你Z.

First, using the Color Stream you would need to collect an array of pixels that match the color you are looking for and then lookup the depth data from the Depth Stream for those pixels to get an average distance from the camera. That gives you the Z.

要获取XY,您可以使用答案中的数学方法.

To get the X and Y you would use the math from this answer.

这篇关于如何使用Kinect从不同的对象获取真实世界的坐标(x,y,z)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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