dcharatan / pixelsplat

[CVPR 2024 Oral, Best Paper Runner-Up] Code for "pixelSplat: 3D Gaussian Splats from Image Pairs for Scalable Generalizable 3D Reconstruction" by David Charatan, Sizhe Lester Li, Andrea Tagliasacchi, and Vincent Sitzmann
http://davidcharatan.com/pixelsplat/
MIT License
864 stars 60 forks source link

intrinsics + scaling #74

Closed Eyvaz27 closed 5 months ago

Eyvaz27 commented 5 months ago

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?

dcharatan commented 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!

Eyvaz27 commented 4 months ago

Thanks a lot for answer