eigenvivek / DiffPose

[CVPR 2024] Intraoperative 2D/3D registration via differentiable X-ray rendering
http://vivekg.dev/DiffPose/
MIT License
118 stars 14 forks source link

About detector target points #28

Closed lixinxin9703 closed 2 months ago

lixinxin9703 commented 5 months ago

diffdrr version 0.3.9

target[...,2] -= self.x0 target[...,1] -= self.y0 Why is it not adding but subtracting?

eigenvivek commented 2 months ago

Hi @lixinxin9703 just a convention choice. In DiffDRR, the detector plane (in 1D) runs from [0, ..., N]. To align the detector plane with the center of the principal ray, we subtract N // 2. To further adjust with a non-zero principal point, we subtract x0. You could equivalently define all of these operations with addition.