argoverse-api icon indicating copy to clipboard operation
argoverse-api copied to clipboard

determine_valid_cam_coords() in calibration.py bug

Open tom-bu opened this issue 3 years ago • 2 comments

The following code still considers a uv point that rounds up to the img width/height as valid.

x_valid = np.logical_and(0 <= uv[:, 0], uv[:, 0] < camera_config.img_width)
y_valid = np.logical_and(0 <= uv[:, 1], uv[:, 1] < camera_config.img_height)

It might be necessary to change it to this

x_valid = np.logical_and(0 <= np.round(uv[:, 0]), np.round(uv[:, 0]) < camera_config.img_width)
y_valid = np.logical_and(0 <= np.round(uv[:, 1]), np.round(uv[:, 1]) < camera_config.img_height)

tom-bu avatar Jun 30 '21 21:06 tom-bu

Hi @tom-bu,

Good suggestion. Would you mind putting in a PR?

benjaminrwilson avatar Jul 26 '21 16:07 benjaminrwilson

Sure, no problem. Here is the PR https://github.com/argoai/argoverse-api/pull/262

tom-bu avatar Jul 26 '21 22:07 tom-bu