ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
camera_models.h File Reference
#include <ceres/ceres.h>
#include <Eigen/Core>
#include <Eigen/Dense>
#include <cfloat>
#include <string>
#include <vector>
Include dependency graph for camera_models.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  colmap::BaseCameraModel< CameraModel >
 
struct  colmap::SimplePinholeCameraModel
 
struct  colmap::PinholeCameraModel
 
struct  colmap::SimpleRadialCameraModel
 
struct  colmap::RadialCameraModel
 
struct  colmap::OpenCVCameraModel
 
struct  colmap::OpenCVFisheyeCameraModel
 
struct  colmap::FullOpenCVCameraModel
 
struct  colmap::FOVCameraModel
 
struct  colmap::SimpleRadialFisheyeCameraModel
 
struct  colmap::RadialFisheyeCameraModel
 
struct  colmap::ThinPrismFisheyeCameraModel
 

Namespaces

 colmap
 

Macros

#define CAMERA_MODEL_DEFINITIONS(model_id_value, model_name_value, num_params_value)
 
#define CAMERA_MODEL_CASES
 
#define CAMERA_MODEL_SWITCH_CASES
 
#define CAMERA_MODEL_DOES_NOT_EXIST_EXCEPTION    throw std::domain_error("Camera model does not exist");
 
#define CAMERA_MODEL_CASE(CameraModel)
 
#define CAMERA_MODEL_CASE(CameraModel)
 
#define CAMERA_MODEL_CASE(CameraModel)
 

Functions

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)
 
void colmap::CameraModelWorldToImage (const int model_id, const std::vector< double > &params, const double u, const double v, double *x, double *y)
 
void colmap::CameraModelImageToWorld (const int model_id, const std::vector< double > &params, const double x, const double y, double *u, double *v)
 
double colmap::CameraModelImageToWorldThreshold (const int model_id, const std::vector< double > &params, const double threshold)
 

Variables

static const int colmap::kInvalidCameraModelId = -1
 

Macro Definition Documentation

◆ CAMERA_MODEL_CASE [1/3]

#define CAMERA_MODEL_CASE (   CameraModel)
Value:
case CameraModel::kModelId: \
CameraModel::WorldToImage(params.data(), u, v, x, y); \
break;
normal_z y
normal_z x

◆ CAMERA_MODEL_CASE [2/3]

#define CAMERA_MODEL_CASE (   CameraModel)
Value:
case CameraModel::kModelId: \
CameraModel::ImageToWorld(params.data(), x, y, u, v); \
break;

◆ CAMERA_MODEL_CASE [3/3]

#define CAMERA_MODEL_CASE (   CameraModel)
Value:
case CameraModel::kModelId: \
return CameraModel::ImageToWorldThreshold(params.data(), threshold); \
break;

◆ CAMERA_MODEL_CASES

#define CAMERA_MODEL_CASES
Value:
CAMERA_MODEL_CASE(SimplePinholeCameraModel) \
CAMERA_MODEL_CASE(PinholeCameraModel) \
CAMERA_MODEL_CASE(SimpleRadialCameraModel) \
CAMERA_MODEL_CASE(SimpleRadialFisheyeCameraModel) \
CAMERA_MODEL_CASE(RadialCameraModel) \
CAMERA_MODEL_CASE(RadialFisheyeCameraModel) \
CAMERA_MODEL_CASE(OpenCVCameraModel) \
CAMERA_MODEL_CASE(OpenCVFisheyeCameraModel) \
CAMERA_MODEL_CASE(FullOpenCVCameraModel) \
CAMERA_MODEL_CASE(FOVCameraModel) \
CAMERA_MODEL_CASE(ThinPrismFisheyeCameraModel)
#define CAMERA_MODEL_CASE(CameraModel)

Definition at line 95 of file camera_models.h.

◆ CAMERA_MODEL_DEFINITIONS

#define CAMERA_MODEL_DEFINITIONS (   model_id_value,
  model_name_value,
  num_params_value 
)

Definition at line 58 of file camera_models.h.

◆ CAMERA_MODEL_DOES_NOT_EXIST_EXCEPTION

#define CAMERA_MODEL_DOES_NOT_EXIST_EXCEPTION    throw std::domain_error("Camera model does not exist");

Definition at line 117 of file camera_models.h.

◆ CAMERA_MODEL_SWITCH_CASES

#define CAMERA_MODEL_SWITCH_CASES
Value:
CAMERA_MODEL_CASES \
default: \
CAMERA_MODEL_DOES_NOT_EXIST_EXCEPTION \
break;

Definition at line 110 of file camera_models.h.