ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
camera_models.cc File Reference
#include "base/camera_models.h"
#include <unordered_map>
#include <boost/algorithm/string.hpp>
Include dependency graph for camera_models.cc:

Go to the source code of this file.

Namespaces

 colmap
 

Macros

#define CAMERA_MODEL_CASE(CameraModel)
 
#define CAMERA_MODEL_CASE(CameraModel)
 
#define CAMERA_MODEL_CASE(CameraModel)
 
#define CAMERA_MODEL_CASE(CameraModel)
 
#define CAMERA_MODEL_CASE(CameraModel)
 
#define CAMERA_MODEL_CASE(CameraModel)
 
#define CAMERA_MODEL_CASE(CameraModel)
 
#define CAMERA_MODEL_CASE(CameraModel)
 
#define CAMERA_MODEL_CASE(CameraModel)
 
#define CAMERA_MODEL_CASE(CameraModel)
 
#define CAMERA_MODEL_CASE(CameraModel)
 

Functions

CAMERA_MODEL_CASES std::unordered_map< std::string, int > colmap::InitialzeCameraModelNameToId ()
 
std::unordered_map< int, std::string > colmap::InitialzeCameraModelIdToName ()
 
bool colmap::ExistsCameraModelWithName (const std::string &model_name)
 
bool colmap::ExistsCameraModelWithId (const int model_id)
 
int colmap::CameraModelNameToId (const std::string &model_name)
 
std::string colmap::CameraModelIdToName (const int model_id)
 
std::vector< double > colmap::CameraModelInitializeParams (const int model_id, const double focal_length, const size_t width, const size_t height)
 
std::string colmap::CameraModelParamsInfo (const int model_id)
 
const std::vector< size_t > & colmap::CameraModelFocalLengthIdxs (const int model_id)
 
const std::vector< size_t > & colmap::CameraModelPrincipalPointIdxs (const int model_id)
 
const std::vector< size_t > & colmap::CameraModelExtraParamsIdxs (const int model_id)
 
size_t colmap::CameraModelNumParams (const int model_id)
 
bool colmap::CameraModelVerifyParams (const int model_id, const std::vector< double > &params)
 
bool colmap::CameraModelHasBogusParams (const int model_id, const std::vector< double > &params, const size_t width, const size_t height, const double min_focal_length_ratio, const double max_focal_length_ratio, const double max_extra_param)
 

Variables

static const std::unordered_map< std::string, int > colmap::CAMERA_MODEL_NAME_TO_ID
 
static const std::unordered_map< int, std::string > colmap::CAMERA_MODEL_ID_TO_NAME
 
static const std::vector< size_t > colmap::EMPTY_IDXS
 

Macro Definition Documentation

◆ CAMERA_MODEL_CASE [1/11]

#define CAMERA_MODEL_CASE (   CameraModel)
Value:
const int CameraModel::model_id = InitializeModelId(); \
const std::string CameraModel::model_name = \
CameraModel::InitializeModelName(); \
const size_t CameraModel::num_params = InitializeNumParams(); \
const std::string CameraModel::params_info = \
CameraModel::InitializeParamsInfo(); \
const std::vector<size_t> CameraModel::focal_length_idxs = \
CameraModel::InitializeFocalLengthIdxs(); \
const std::vector<size_t> CameraModel::principal_point_idxs = \
CameraModel::InitializePrincipalPointIdxs(); \
const std::vector<size_t> CameraModel::extra_params_idxs = \
CameraModel::InitializeExtraParamsIdxs();

Definition at line 42 of file camera_models.cc.

◆ CAMERA_MODEL_CASE [2/11]

#define CAMERA_MODEL_CASE (   CameraModel)
Value:
camera_model_name_to_id.emplace(CameraModel::model_name, \
CameraModel::model_id);

Definition at line 42 of file camera_models.cc.

◆ CAMERA_MODEL_CASE [3/11]

#define CAMERA_MODEL_CASE (   CameraModel)
Value:
camera_model_id_to_name.emplace(CameraModel::model_id, \
CameraModel::model_name);

Definition at line 42 of file camera_models.cc.

◆ CAMERA_MODEL_CASE [4/11]

#define CAMERA_MODEL_CASE (   CameraModel)
Value:
case CameraModel::kModelId: \
return CameraModel::InitializeParams(focal_length, width, height); \
break;
int width
int height

Definition at line 42 of file camera_models.cc.

◆ CAMERA_MODEL_CASE [5/11]

#define CAMERA_MODEL_CASE (   CameraModel)
Value:
case CameraModel::kModelId: \
return CameraModel::params_info; \
break;

Definition at line 42 of file camera_models.cc.

◆ CAMERA_MODEL_CASE [6/11]

#define CAMERA_MODEL_CASE (   CameraModel)
Value:
case CameraModel::kModelId: \
return CameraModel::focal_length_idxs; \
break;

Definition at line 42 of file camera_models.cc.

◆ CAMERA_MODEL_CASE [7/11]

#define CAMERA_MODEL_CASE (   CameraModel)
Value:
case CameraModel::kModelId: \
return CameraModel::principal_point_idxs; \
break;

Definition at line 42 of file camera_models.cc.

◆ CAMERA_MODEL_CASE [8/11]

#define CAMERA_MODEL_CASE (   CameraModel)
Value:
case CameraModel::kModelId: \
return CameraModel::extra_params_idxs; \
break;

Definition at line 42 of file camera_models.cc.

◆ CAMERA_MODEL_CASE [9/11]

#define CAMERA_MODEL_CASE (   CameraModel)
Value:
case CameraModel::kModelId: \
return CameraModel::num_params;

Definition at line 42 of file camera_models.cc.

◆ CAMERA_MODEL_CASE [10/11]

#define CAMERA_MODEL_CASE (   CameraModel)
Value:
case CameraModel::kModelId: \
if (params.size() == CameraModel::num_params) { \
return true; \
} \
break;

Definition at line 42 of file camera_models.cc.

◆ CAMERA_MODEL_CASE [11/11]

#define CAMERA_MODEL_CASE (   CameraModel)
Value:
case CameraModel::kModelId: \
return CameraModel::HasBogusParams( \
params, width, height, min_focal_length_ratio, max_focal_length_ratio, \
max_extra_param); \
break;

Definition at line 42 of file camera_models.cc.