MCPcopy Create free account
hub / github.com/colmap/colmap / SquaredSphericalReprojectionError

Function SquaredSphericalReprojectionError

src/colmap/scene/projection.cc:46–52  ·  view source on GitHub ↗

Pixel reprojection error is ill-defined for equirectangular (e.g. EQUIRECTANGULAR) cameras: the azimuth is discontinuous at the ±π seam and its pixel scale diverges towards the poles (azimuth pixels grow as 1/cos(elevation)). Instead measure the angular error between the observed bearing and the 3D point and convert it to an equivalent pixel error at the equator, consistent with the model's pixel<

Source from the content-addressed store, hash-verified

44// CamFromImgThreshold. This makes the (squared) error continuous across the
45// seam and uniform over the sphere.
46double SquaredSphericalReprojectionError(const double angular_error,
47 const Camera& camera) {
48 const double pixels_per_radian =
49 static_cast<double>(camera.width) / (2.0 * EIGEN_PI);
50 const double pixel_error = angular_error * pixels_per_radian;
51 return pixel_error * pixel_error;
52}
53
54} // namespace
55

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected