Closed Eyvaz27 closed 5 months ago
The code from crop_shim.py
that you're referring to does cropping, while the Stack Exchange answer does resizing. Note that the Stack Exchange answer is also using intrinsics matrices in pixels, while our intriniscs are normalized (i.e., divided by image width/height). You can find an explanation of how the intrinsics change when cropping here. Take a look and let me know if you still have questions!
Thanks a lot for answer
Hello, I noticed that in the shim folder under src/dataset (especially in crop_shim.py), you are scaling the intrinsic matrix as: intrinsics[..., 0, 0] = w_in / w_out # fx whereas in StackExchange (https://dsp.stackexchange.com/questions/6055/how-does-resizing-an-image-affect-the-intrinsic-camera-matrix) operation is performed as : intrinsics[..., 0, 0] = w_out / w_in # fx
so, which convention should we follow?