symforce.examples.bundle_adjustment_in_the_large.bundle_adjustment_in_the_large module#

Symbolic factor and codegen for the Bundle-Adjustment-in-the-Large problem

snavely_reprojection_residual(cam_T_world, intrinsics, point, pixel, epsilon)[source]#

Reprojection residual for the camera model used in the Bundle-Adjustment-in-the-Large dataset, a polynomial camera with two distortion coefficients, cx == cy == 0, and fx == fy

See for more information

  • cam_T_world (Pose3) – The (inverse) pose of the camera

  • intrinsics (Matrix31) – Camera intrinsics (f, k1, k2)

  • point (Matrix31) – The world point to be projected

  • pixel (Matrix21) – The measured pixel in the camera (with (0, 0) == center of image)

  • epsilon (float) –


residual – The reprojection residual

Return type:



Generates the snavely_reprojection_factor into C++, as well as a set of Keys to help construct the optimization problem in C++, and puts them into output_dir. This is called by symforce/test/ to generate the contents of the gen folder inside this directory.


output_dir (Path) –

Return type: