Skip to content

fix: use parameters.fov_eps_rad in compute_histogram_equalization#1010

Open
abhinow03 wants to merge 1 commit into
nerfstudio-project:mainfrom
abhinow03:fix/histogram-equalization-fov-eps
Open

fix: use parameters.fov_eps_rad in compute_histogram_equalization#1010
abhinow03 wants to merge 1 commit into
nerfstudio-project:mainfrom
abhinow03:fix/histogram-equalization-fov-eps

Conversation

@abhinow03

Copy link
Copy Markdown

compute_histogram_equalization checks sensor angles against a hardcoded tolerance of 2 * torch.finfo(torch.float32).eps, while the lidar model's own tolerance is parameters.fov_eps_rad (fov_eps_factor * eps, default factor 4). Angles within the model's tolerance can therefore trip the azimuths are out of bounds / elevations are out of bounds assertions, and the user-supplied fov_eps_factor has no effect on this check.
This resolves the existing TODO on that line by using parameters.fov_eps_rad, making the histogram-equalization bounds consistent withvalid_sensor_angles and the CUDA side (Lidars.cuh), which already use fov_eps_rad.

Fixes #973

The FOV bounds check hardcoded 2 * float32 eps instead of the model's
fov_eps_rad (fov_eps_factor * eps, default factor 4), so angles within
the model's own tolerance could trip the out-of-bounds assertions and
the user-supplied fov_eps_factor had no effect here. Resolves the
existing TODO by using the parameter.

Fixes nerfstudio-project#973
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

Successfully merging this pull request may close these issues.

parameters.fov_eps_rad in compute_histogram_equalization

1 participant