sxyu / svox2

Plenoxels: Radiance Fields without Neural Networks
BSD 2-Clause "Simplified" License
2.79k stars 360 forks source link

colmap2nsvf.py cx and cy set incorrectly (off by one) #55

Open amonszpart opened 2 years ago

amonszpart commented 2 years ago

Hi,

Great stuff, thanks for putting the repo online so early.

I found an off by one error here: https://github.com/sxyu/svox2/blob/59984d6c4fd3d713353bafdcb011646e64647cc7/opt/scripts/colmap2nsvf.py#L320

Params is 4 long for SIMPLE_RADIAL: [fx, fy, cx, cy], so it should say:

K[0, 2] = cameras[0].params[2] / base_scale # <-- not params[1]
K[1, 2] = cameras[0].params[3] / base_scale # <-- not params[2]