Image similarity metrics and geodesic distances for camera poses
Image similarity metrics
Used to quantify the similarity between ground truth X-rays () and synthetic X-rays generated from estimated camera poses (). If a metric is differentiable, it can be used to optimize camera poses with DiffDRR.
NCC and GradNCC are originally implemented in diffdrr.metrics. DiffPose provides torchmetrics wrappers for these functions.
One can define geodesic pseudo-distances on SO(3) and SE(3).1 This let’s us measure registration error (in radians and millimeters, respectively) on poses, rather than needed to compute the projection of fiducials.
For SO(3), the geodesic distance between two rotation matrices and is where , the source-to-detector radius, is used to convert radians to millimeters.
For SE(3), we decompose the transformation matrix into a rotation and a translation, i.e., . Then, we compute the geodesic on translations (just Euclidean distance), Finally, we compute the double geodesic on the rotations and translations: