How to find corner points of any object in point cloud and find distance between corner points in inch/cm/m?

自作多情 提交于 2019-12-06 15:56:37

问题


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.

We have managed to do 1, 2 and 3.

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. 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

enter image description here


回答1:


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

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

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



来源:https://stackoverflow.com/questions/33361527/how-to-find-corner-points-of-any-object-in-point-cloud-and-find-distance-between

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!