Lasso Selection and Point Cloud Alignment | Blogs | nCircle Tech
Spread the word

Introduction
This blog describes a mechanism to select a point in the point cloud, select points using lasso selection and alignment of two point clouds using manual registration and global registration.

Applications:

  • 3D Scanners
  • TM (Digital terrain model) Laser Scanner
  • Airborne Laser Scanning

 1. Point Selection and Lasso Selection :
We at nCircle have implemented a Ray casting algorithm to select the point on left mouse button click.
It fires the Ray from a near plane to a faraway plane, and finds the nearest point to the Ray within a certain tolerance. Once we get a set of points nearest to the ray, we pick the point closest to the camera.

Performance analysis:
Total number of points: 5,79,158
Time : 0.102 seconds

Lasso Selection :
The lasso selection tool allows the user to select points from point cloud by drawing any random shape on the screen.
It is also known as the Free Selection tool. Users can select a subset of points from point cloud by drawing a freehand sketch. The Lasso tool is used for selections where there is no pre-defined shape.
You can see the below image for a reference:

Lasso Selection

 

Algorithm:
This application projects all the points onto a 3D plane and checks if the projected points lie inside or outside the lasso shape.

This code is helpful for finding the points inside the lasso shape. Once these points are selected, the user can perform various operations such as delete, move, highlight, etc. Usually, when dealing with Point clouds Lasso selection is helpful in deleting the unwanted points.

Video demo: https://youtu.be/p98bBWCifEc

 2. Point cloud alignment :
We have implemented an algorithm to align the two-point clouds based on three points selection. But in case of three point alignment, two point clouds are aligned but not completely. So we have used PCL ICP to refine the output cloud.

Steps for Alignment in two point cloud :
1. Load two point clouds in two viewers source (left) and target (right) using drag-drop
2. Select three points in both (source and target) viewers
3. Click on “Manual Alignment” toolbar to align both point clouds based on selected three points. It will quickly align both the clouds and render the merged cloud (target and source) in output viewer (bottom)

                                            Example 2: Three-Point Alignment

The above process is known as manual registration. Using manual registration users can quickly align the two point clouds. This helps the user to visualize the point cloud properly, however it is not good enough if you want to proceed with surface re-generation, hole filling, etc applications. The points are closely aligned but not as accurate as required as shown in the example above.

In order to align the points as closely as possible, we use a technique called as Global Registration. We implemented the “Global Registration” technique using PCL ICP library.

These are few parameters user have to set for “Global Registration”.


Max Iteration: Number of iterations for movement of each point to its closest point.
Max Correspondence Distance: Search out point which lies between 0.0 to maximum distance.
RANSAC Outlier Rejection Threshold: If the distance between two points is less than 0.06 then neglect the distance and overlap to each other.

After global registration, the point cloud looks like the following:


Global Registration (ICP)

The time taken during global registration can vary significantly depending upon the point cloud size, the ICP parameters, etc.

Following are few results from time comparison studies:
Number Of Point In Cloud :
Source Cloud : 3,19,627
Target Cloud :  3,04,416
Performance analysis:

Number of Iterations Time duration for Global Registration (In Seconds)
10 23
25 51
40 83
50 101
75 148
100 199

Watch our video on “Manual Alignment” and “Global Registration (ICP)” for more details: https://youtu.be/ZrSPoHaH470

References:

http://bbs.dartmouth.edu/http://en.wikipedia.org/wiki/Point_in_polygon

Author: Amit M

Contact us

nCircle Tech (inCorporated in 2012) empowers passionate innovators to create impactful 3D visualization software for desktop, mobile and cloud. Our domain expertise in CAD-BIM customization driving automation with the ability to integrate advanced technologies like AI/ML and VR/AR; empowers our clients to reduce time to market and meet business goals. nCircle has a proven track record of technology consulting and advisory services for the AEC and Manufacturing industry across the globe. Our team of dedicated engineers, partner ecosystem and industry veterans are on a mission to redefine how you design and visualize.
Over the last 7+ years, the organisation has worked on more than 150 large and complex projects for 50+ customers across 15+ countries


Spread the word