pglira / simpleICP

Implementations of a rather simple version of the Iterative Closest Point algorithm in various languages.
MIT License
291 stars 59 forks source link

(Python) Calculation of RMSE between point clouds #33

Closed jkissi closed 1 year ago

jkissi commented 1 year ago

Hi! I am attempting to detect differences between multiple clouds. I am afraid that I am a little confused...does your [python] implementation generate any products that would allow me to calculate the RMSE between the final estimation given by the algo and my target cloud. What I am looking for are the inlier correspondences and I am unsure of how to generate them/find them from the outputs.

Apologies if it obvious, I would be very grateful if you could point it out to me, or if there is a process involved, give me a run down of what I need to do.

Cheers and thanks in advance, J

pglira commented 1 year ago

Hi! The closest that you can get at the moment is the standard deviation of the point-to-plane distances: image In this case the number of inlier correspondences as determined by the algorithm is 752. Hope this helps.

jkissi commented 1 year ago

Hi, Thanks this is really helpful! It was kinda obvious, I just didn't see it. Thanks for the clarification. Does the iteration table with the correspondences and std residuals get output as a textfile or in another product?

thanks j

jkissi commented 1 year ago

Hi! The closest that you can get at the moment is the standard deviation of the point-to-plane distances: image In this case the number of inlier correspondences as determined by the algorithm is 752. Hope this helps.

Hi again!! Sorry but could you just confirm for me whether this information is passed to one of the output products or if it is only written to the console? Being able to grab that information and pass it to a function I've written would help me alot, so it would be good to know for sure one way or the other.

Cheers again j

pglira commented 1 year ago

The final point-to-plane distances are now returned by the function, see commit 283143c

With this, you can run now run:

H, X_mov_transformed, rbp, distance_residuals = icp.run(max_overlap_distance=1)

and calculate all you need with

len(distance_residuals) # number of correspondences
np.mean(distance_residuals)
np.std(distance_residuals)

Hope this helps.

jkissi commented 1 year ago

The final point-to-plane distances are now returned by the function, see commit 283143c

With this, you can run now run:

H, X_mov_transformed, rbp, distance_residuals = icp.run(max_overlap_distance=1)

and calculate all you need with

len(distance_residuals) # number of correspondences
np.mean(distance_residuals)
np.std(distance_residuals)

Hope this helps.

Oh wow!! Thanks so much for this phillip, this helps a great deal and is a very nice feature to add. Thanks again! Should I close this or do you prefer to?

jon

pglira commented 1 year ago

It's already closed. 😊

jkissi commented 1 year ago

Haha, didn't even see that!