Sumit Dhingra
Sumit Dhingra

Reputation: 123

Using Point Cloud Library ICP for 2D point matching

I'm using PCL's ICP for 2D point matching and I used ::correspondences_ to find source (index_query) to target (index_match) correspondence and observed that many source indices point to same target indices, like below.

SrcIndex: 3 -> TgtIndex: 800
SrcIndex: 4 -> TgtIndex: 800
SrcIndex: 5 -> TgtIndex: 801
SrcIndex: 6 -> TgtIndex: 801
  1. Shouldn't the correspondence mapping be one to one?
  2. What does setEuclideanFitnessEpsilon do?

I found here, on page 5, that

A solution was found if the sum of squared errors is smaller than a user-defined threshold. set via setEuclideanFitnessEpsilon(distance)

However, even after setting ::setEuclideanFitnessEpsilon(1), I got a getFitnessScore() of 50ish which is worse than not setting euclidean fitness at all.

  1. Can I write some custom set of rules to reject correspondences? I know CorrespondenceRejector exists but is there any nice and simple tutorial available?

Upvotes: 0

Views: 968

Answers (1)

Mark Loyman
Mark Loyman

Reputation: 2170

  1. Shouldn't the correspondence mapping be one to one?

You need to set: setUseReciprocalCorrespondences(true)

  1. after setting ::setEuclideanFitnessEpsilon(1), I got a getFitnessScore() of 50ish which is worse than not setting euclidean fitness at all.

There are several possible stop criteria:

  • setMaximumIterations(): number of iterations reached maximum number of iterations
  • setTransformationEpsilon(): difference between previous transformation and current estimated transformation is smaller than the threshold
  • setEuclideanFitnessEpsilon(): sum of Euclidean squared errors is smaller than a threshold
  1. Can I write some custom set of rules to reject correspondences? I know CorrespondenceRejector exists but is there any nice and simple tutorial available?

I'm not familiar with any tutorial on this, but you can learn from existing CorrespondenceRejector derived classes. For example: correspondence_rejection_median_distance.h correspondence_rejection_median_distance.cpp

Upvotes: 1

Related Questions