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

Function CameraModelInitializeParams

src/colmap/sensor/models.cc:137–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137std::vector<double> CameraModelInitializeParams(const CameraModelId model_id,
138 const double focal_length,
139 const size_t width,
140 const size_t height) {
141 // Assuming that image measurements are within [0, dim], i.e. that the
142 // upper left corner is the (0, 0) coordinate (rather than the center of
143 // the upper left pixel). This complies with the default SiftGPU convention.
144 switch (model_id) {
145#define CAMERA_MODEL_CASE(CameraModel) \
146 case CameraModel::model_id: \
147 return CameraModel::InitializeParams(focal_length, width, height); \
148 break;
149
150 CAMERA_MODEL_SWITCH_CASES
151
152#undef CAMERA_MODEL_CASE
153 }
154}
155
156const std::string& CameraModelParamsInfo(const CameraModelId model_id) {
157 switch (model_id) {

Callers 3

CreateFromModelIdMethod · 0.85
TestModelFunction · 0.85
TESTFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestModelFunction · 0.68
TESTFunction · 0.68