Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG???] Correct way to calculate distance_to_gaussian_surface #32

Open
MrForExample opened this issue Dec 20, 2023 · 0 comments
Open

Comments

@MrForExample
Copy link

MrForExample commented Dec 20, 2023

In script: utils/ops.py#L153
Inside function distance_to_gaussian_surface(mean, svec, rotmat, query)
It calculates squared Mahalanobis distance by :
r2 = svec[..., 2] ** 2 * cos_theta**2 + d2**2 * sin_theta**2
But according to Mahalanobis distance formula it should be :
r2 = svec[..., 2] ** 2 * cos_theta**2 + d2 * sin_theta**2

Reference:
https://en.wikipedia.org/wiki/Mahalanobis_distance
https://math.stackexchange.com/questions/18776/mean-distance-between-a-fixed-point-and-a-gaussian-distributed-random-variable
http://www.open3d.org/docs/latest/tutorial/geometry/distance_queries.html

I have tested both formula, and both seem to work fine
Is this merely a trivial bug or is there any reason that I missed for your specific formula?
Please let me know :)

@MrForExample MrForExample changed the title [BUG or Misunderstading] Correct way to calculate distance_to_gaussian_surface [BUG or Misunderstanding] Correct way to calculate distance_to_gaussian_surface Dec 20, 2023
@MrForExample MrForExample changed the title [BUG or Misunderstanding] Correct way to calculate distance_to_gaussian_surface [BUG???] Correct way to calculate distance_to_gaussian_surface Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant