prclibo / relative-pose-estimation

Relative pose estimation pack
https://sites.google.com/site/prclibo/relative-pose-estimation
172 stars 58 forks source link

Custom cost function #5

Open ShrutheeshIR opened 4 years ago

ShrutheeshIR commented 4 years ago

How would I go about implementing a cost function that weights a few points more than the others. I am specifically asking for the 5 point Nister algorithm. Say, for every keypoint in the arguments, I have a weight associated with it, that indicates how good the correspondence of the point was, how would I include that in the calculations. (Essentially I would like to fit a model that weights the input) Which part of the code should I change?

prclibo commented 4 years ago

The code is based on RANSAC strategy which is not easy to integrate weights. Maybe you should use the RANSAC result as a initial value and write another optimizer weighting by your cost.