如何在点云中找到任何物体的角点,以及如何以英寸/厘米/米为单位找到角点之间的距离? [英] How to find corner points of any object in point cloud and find distance between corner points in inch/cm/m?

查看:605
本文介绍了如何在点云中找到任何物体的角点,以及如何以英寸/厘米/米为单位找到角点之间的距离?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在创建一个应用程序,该应用程序用于使用Project tango Device计算任何窗户/门的尺寸.为此,我们需要执行以下提到的步骤:
1.捕获图像(普通2D图像).存储此图像.
2.在捕获图像的同时捕获点云.将点云存储在PCD文件中.
3.通过在图像上绘制一个矩形来指示窗口/门在画布上显示的图像中的位置.参见图像.
4.绘制矩形后,将使用存储的PointCloud数据自动计算窗/门的宽度和高度.

We are creating an app which is used for calculating measurements of any a window/door using Project tango Device. For that we need to follow below mentioned steps:
1. Capture Image (normal 2D image). Store this image.
2. Also capture point cloud while capturing the Image. Store the point cloud in a PCD file.
3. Indicate the position of the window/door in the image displayed on a canvas by drawing a rectangle on the image. See Image.
4. As the rectangle is drawn automatically calculate width and height of the window/door using the stored PointCloud data.

我们已经成功完成了1、2和3.

We have managed to do 1, 2 and 3.

对于4,我们有两个问题:
A.在PointCloud中确定与绘制的矩形(即窗户/门)相对应的点.我们认为,这涉及确定窗户/门所在的平面,例如窗户.假设沿深度的轴(即从相机到物体的轴)为Z轴,则需要确定与PointCloud中窗/门所在平面相对应的Z值.如何才能做到这一点?请问有人可以建议一种可行且有效的方式吗?

For 4 we have two issues:
A. Determine the Points in the PointCloud corresponding to the drawn rectangle i.e. the window/door. We believe that this involves determining the plane in which the window/door is located e.g. Assuming that the axis along the depth (i.e. from the camera to the object) is Z-axis then we need to determine the value(s) of Z that correspond to the plane in which the window/door is located in PointCloud. How can this be done? Please can someone suggest a feasible and an efficient way of doing so?

B.一旦我们确定了与绘制的矩形相对应的子点云,便找到沿X&的最小点和最大点之间的距离. Y轴分别确定宽度和高度.如何才能做到这一点?

B. Once we determine the sub-PointCloud corresponding to the drawn rectangle find the distance between the minimum and maximum points along the X & Y axis to determine the width and height respectively. How can this be done?

感谢您提供有关演示代码或应用参考的帮助.在此处输入图像描述

Any help with demo code or app reference is appreciated.enter image description here

在此处输入图片描述

推荐答案

查找点云的轮廓.使用迭代ransac使线条适合轮廓.相交线并获得拐角点

find contour of the point cloud. Use iterative ransac to fit lines to the contour. Intersect the lines and get the corner points

对于3d,计算表面法线.然后计算曲率,该曲率是表面法线的微分.这些是拐点.

for 3d, compute the surface normals. Then compute the curvature which is a differential of the surface normal. These are corner points.

PCL(点云库)具有所有这些功能.

PCL (Point Cloud Library) has all of these functions.

这篇关于如何在点云中找到任何物体的角点,以及如何以英寸/厘米/米为单位找到角点之间的距离?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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