eigenvivek / DiffPose

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

About detector target points #28

Closed lixinxin9703 closed 1 week ago

lixinxin9703 commented 3 months ago

diffdrr version 0.3.9

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

eigenvivek commented 1 week 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.