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

Method CameraModelImgFromCam

src/colmap/sensor/models.h:2802–2821  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2800}
2801
2802std::optional<Eigen::Vector2d> CameraModelImgFromCam(
2803 const CameraModelId model_id,
2804 const std::vector<double>& params,
2805 const Eigen::Vector3d& uvw) {
2806 Eigen::Vector2d xy;
2807 switch (model_id) {
2808#define CAMERA_MODEL_CASE(CameraModel) \
2809 case CameraModel::model_id: \
2810 if (CameraModel::ImgFromCam( \
2811 params.data(), uvw.x(), uvw.y(), uvw.z(), &xy.x(), &xy.y())) { \
2812 return xy; \
2813 } \
2814 break;
2815
2816 CAMERA_MODEL_SWITCH_CASES
2817
2818#undef CAMERA_MODEL_CASE
2819 }
2820 return std::nullopt;
2821}
2822
2823std::optional<Eigen::Vector2d> CameraModelCamFromImg(
2824 const CameraModelId model_id,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected