Large-scale Point Clouds Alignment (Registration)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Large-scale Point Clouds Alignment (Registration)

H Seong
Hi,

I have problem for registration of large-scale and complex point clouds
using “alignment prerejective” source code (see
http://www.pcl-users.org/alignment-prerejective-cpp-tutorial-not-working-td4030336.html#a4035997)

The environment of my PC is;
 Windows 10
 PCL 1.8.1
 Visual Studio Community 2015
 GTX 1080
 RAM 32GB

Information for point clouds I am using is;
 Context: Industrial facilities (mainly includes pipes or instrument)
 Number of points: more than 500,000

<http://www.pcl-users.org/file/t499245/%E1%84%8F%E1%85%A2%E1%86%B8%E1%84%8E%E1%85%A5.png>
Figure 1. An exemplar image of point clouds

To solve problem, I have been exploring all the previous subscriptions that
is related to my issue from PCL Users mailing list. I found that two
solutions.

1. Parameter Adjustment
There was a trial for registering large-scale point clouds using the same
code I am using
(http://www.pcl-users.org/alignment-prerejective-cpp-tutorial-not-working-td4030336.html#a4035997).
He or she has solved the problem by adjusting parameters of the source code
which are;
 setRadiusSearch (both for normal estimation and feature description)
 the number of RANSAC Iteration
 the inlier ratio for RANSAC
I applied same parameters, but It’s not working. Moreover, I have tried
various of parameters ranging from 0.01 to 4.0 for setRadiusSearch and
adjusting for all the rest of parameter.

The error is shown below;
<http://www.pcl-users.org/file/t499245/%E1%84%8F%E1%85%A2%E1%86%B8%E1%84%8E%E1%85%A52.png>

2. Using Kdtree search
It has been suggested using setKsearch rather than setRadiusSearch frome the
link here
(http://www.pcl-users.org/Problem-with-Normal-estimation-in-point-clouds-td4026387.html#a4026390).
I tried

The error is shown below; to use setKsearch, but it’s not working. I think
parameters for setKsearch needs to be examined with analysis.

I have tried to add lines on source code for estimating normal of object.pcd
(a target point cloud) data (This is because the original source code only
performs normal estimation for scene.pcd [a reference point cloud]).
However, it does not contribute to solve the problem.

I think automated registration should be improved for large-scale data not
for small objects because the time consumption for manual registration of
large-scale data is far higher than that for small objects.

Any expertise or users who has same consideration of mine, please reply for
this subscription.
If anyone want to try using my data, please leave an e-mail address.

Thank you in advance.



--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Large-scale Point Clouds Alignment (Registration)

Sérgio Agostinho



On 28/02/2018 17:02, H Seong wrote:
I applied same parameters, but It’s not working. Moreover, I have tried
various of parameters ranging from 0.01 to 4.0 for setRadiusSearch and
adjusting for all the rest of parameter. 

Every use case is unique on its own. Applying other people's parameters to your case only makes sense if your data exhibits similar properties, otherwise it's equivalent to trying a random real number and expecting it to work. Sounds ridiculous right?
  • What's roughly the distance between the points in your point cloud?
  • Have you tried visualizing your normals to see if they look reasonable?



The error is shown below; 
<http://www.pcl-users.org/file/t499245/%E1%84%8F%E1%85%A2%E1%86%B8%E1%84%8E%E1%85%A52.png> 

Please upsample and reupload with higher quality. The "CSI enhance" feature is not publicly available just yet.

2.	Using Kdtree search 
It has been suggested using setKsearch rather than setRadiusSearch frome the
link here
(http://www.pcl-users.org/Problem-with-Normal-estimation-in-point-clouds-td4026387.html#a4026390).
I tried 

The error is shown below; to use setKsearch, but it’s not working. I think
parameters for setKsearch needs to be examined with analysis. 
First confirm your normals are ok, then we'll jump to the actual registration part.

Cheers

_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Large-scale Point Clouds Alignment (Registration)

H Seong
Thank you for reply.

As you told me I visualized normals using PCL plugins functions of Cloud
Compare.

 
<http://www.pcl-users.org/file/t499245/%E1%84%8F%E1%85%A2%E1%86%B8%E1%84%8E%E1%85%A5%E1%86%B801.png>
Original scene

<http://www.pcl-users.org/file/t499245/%E1%84%8F%E1%85%A2%E1%86%B8%E1%84%8E%E1%85%A502.png>
Setting radius parameter (0.01)

<http://www.pcl-users.org/file/t499245/%E1%84%8F%E1%85%A2%E1%86%B8%E1%84%8E%E1%85%A503.png>
Normal estimation result

I also tested on the target point cloud and figured that radius 0.01 is
"reasonable" normals for me.


Then I tried to implement "actual registration".

// Downsample
  pcl::console::print_highlight ("Downsampling...\n");
  pcl::VoxelGrid<PointNT> grid;
  const float leaf = 0.2f;
  grid.setLeafSize (leaf, leaf, leaf);
  grid.setInputCloud (object);
  grid.filter (*object);
  grid.setInputCloud (scene);
  grid.filter (*scene);
 
  // Estimate normals for scene
  pcl::console::print_highlight ("Estimating scene normals...\n");
  pcl::NormalEstimationOMP<PointNT,PointNT> nest;
  nest.setRadiusSearch (0.01);
  nest.setInputCloud (scene);
  nest.compute (*scene);
 
  // Estimate features
  pcl::console::print_highlight ("Estimating features...\n");
  FeatureEstimationT fest;
  fest.setRadiusSearch (0.01);
  fest.setInputCloud (object);
  fest.setInputNormals (object);
  fest.compute (*object_features);
  fest.setInputCloud (scene);
  fest.setInputNormals (scene);
  fest.compute (*scene_features);
 
  // Perform alignment
  pcl::console::print_highlight ("Starting alignment...\n");
  pcl::SampleConsensusPrerejective<PointNT,PointNT,FeatureT> align;
  align.setInputSource (object);
  align.setSourceFeatures (object_features);
  align.setInputTarget (scene);
  align.setTargetFeatures (scene_features);
  align.setMaximumIterations (100000); // Number of RANSAC iterations
  align.setNumberOfSamples (3); // Number of points to sample for
generating/prerejecting a pose
  align.setCorrespondenceRandomness (4); // Number of nearest features to
use
  align.setSimilarityThreshold (0.6f); // Polygonal edge length similarity
threshold
  align.setMaxCorrespondenceDistance (1.4f * leaf); // Inlier threshold
  align.setInlierFraction (0.15f); // Required inlier fraction for accepting
a pose hypothesis
 
This is the source code I used.
And It failed to align the point clouds like this:

> Loading point clouds...
Failed to find match for field 'normal_x'.
Failed to find match for field 'normal_y'.
Failed to find match for field 'normal_z'.
Failed to find match for field 'curvature'.
Failed to find match for field 'normal_x'.
Failed to find match for field 'normal_y'.
Failed to find match for field 'normal_z'.
Failed to find match for field 'curvature'.
> Downsampling...
> Estimating scene normals...
> Estimating features...
> Starting alignment...
Alignment took 35741ms.

    |  1.000  0.000  0.000 |
R = |  0.000  1.000  0.000 |
    |  0.000  0.000  1.000 |

t = < 0.000, 0.000, 0.000 >

Inliers: 0/29239

Is there any mistakes I made? or any suggestion for me?

sincerely appreciate your help.



--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Large-scale Point Clouds Alignment (Registration)

Sérgio Agostinho


On 03-03-2018 11:24, H Seong wrote:
> <http://www.pcl-users.org/file/t499245/%E1%84%8F%E1%85%A2%E1%86%B8%E1%84%8E%E1%85%A503.png>
> Normal estimation result

I see there are things on the screen. I'm not sure what they are. You
tell me the normals are ok, so I'll just take it at face value.

> Is there any mistakes I made? or any suggestion for me?
>
> sincerely appreciate your help.

First thing to try:

Find manually the coarse transformation between the two point clouds,
apply that transformation and run the registration algorithm. Is the
solution stable with your current parameters? If it's not stable even
like this it means your current parameters won't work.

Cheers



_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users

signature.asc (836 bytes) Download Attachment