Open AntonioMacaronio opened 4 months ago
Hi @AntonioMacaronio, did you try printing out the value of input_image.shape and input_calib_width/height?
@AntonioMacaronio can you provide any feedback?
Yes! I can add quick one line PR to fix this if need be (i will also note the changes down below) - since the main RGB camera has solution 1404x1404, no runtime errors arise with that camera.
This only occurs with the side grayscale which have resolution 480x640. What happens is the following:
input_image
will be a numpy array of shape (480, 640), input_calib_width
will be equal to 640, and input_calib_height
will be equal to 480if input_image.shape[0] != input_calib_width or input_image.shape[1] != input_calib_height:
will be True and a ValueError will be raised.Simply changing the conditional to if input_image.shape[1] != input_calib_width or input_image.shape[0] != input_calib_height:
fixes this error
Here is a potential bug: https://github.com/facebookresearch/projectaria_tools/blob/6338ce8024dd0d64b233b918864f78fcde8d739a/projectaria_tools/utils/calibration_utils.py#L30
input_calib_width refers to the width of the image. For an image represented as a NumPy array, the number of numpy columns is equal to the width of the image, but the code writes
input_image.shape[0] != input_calib_width
, which is comparing the number of numpy rows.The same thing but vice versa happens on line 31 with
input_image.shape[1] != input_calib_height