ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
colmap::Camera Class Reference

#include <camera.h>

Public Member Functions

 Camera ()
 
camera_t CameraId () const
 
void SetCameraId (const camera_t camera_id)
 
int ModelId () const
 
std::string ModelName () const
 
void SetModelId (const int model_id)
 
void SetModelIdFromName (const std::string &model_name)
 
size_t Width () const
 
size_t Height () const
 
void SetWidth (const size_t width)
 
void SetHeight (const size_t height)
 
double MeanFocalLength () const
 
double FocalLength () const
 
double FocalLengthX () const
 
double FocalLengthY () const
 
void SetFocalLength (const double focal_length)
 
void SetFocalLengthX (const double focal_length_x)
 
void SetFocalLengthY (const double focal_length_y)
 
bool HasPriorFocalLength () const
 
void SetPriorFocalLength (const bool prior)
 
double PrincipalPointX () const
 
double PrincipalPointY () const
 
void SetPrincipalPointX (const double ppx)
 
void SetPrincipalPointY (const double ppy)
 
const std::vector< size_t > & FocalLengthIdxs () const
 
const std::vector< size_t > & PrincipalPointIdxs () const
 
const std::vector< size_t > & ExtraParamsIdxs () const
 
Eigen::Matrix3d CalibrationMatrix () const
 
std::string ParamsInfo () const
 
size_t NumParams () const
 
const std::vector< double > & Params () const
 
std::vector< double > & Params ()
 
double Params (const size_t idx) const
 
double & Params (const size_t idx)
 
const double * ParamsData () const
 
double * ParamsData ()
 
void SetParams (const std::vector< double > &params)
 
std::string ParamsToString () const
 
bool SetParamsFromString (const std::string &string)
 
bool VerifyParams () const
 
bool IsUndistorted () const
 
bool HasBogusParams (const double min_focal_length_ratio, const double max_focal_length_ratio, const double max_extra_param) const
 
void InitializeWithId (const int model_id, const double focal_length, const size_t width, const size_t height)
 
void InitializeWithName (const std::string &model_name, const double focal_length, const size_t width, const size_t height)
 
Eigen::Vector2d ImageToWorld (const Eigen::Vector2d &image_point) const
 
double ImageToWorldThreshold (const double threshold) const
 
Eigen::Vector2d WorldToImage (const Eigen::Vector2d &world_point) const
 
void Rescale (const double scale)
 
void Rescale (const size_t width, const size_t height)
 
bool operator== (const Camera &other) const
 
bool operator!= (const Camera &other) const
 

Detailed Description

Definition at line 20 of file camera.h.

Constructor & Destructor Documentation

◆ Camera()

colmap::Camera::Camera ( )

Definition at line 42 of file camera.cc.

Referenced by BOOST_AUTO_TEST_CASE().

Member Function Documentation

◆ CalibrationMatrix()

Eigen::Matrix3d colmap::Camera::CalibrationMatrix ( ) const

◆ CameraId()

◆ ExtraParamsIdxs()

const std::vector< size_t > & colmap::Camera::ExtraParamsIdxs ( ) const

◆ FocalLength()

double colmap::Camera::FocalLength ( ) const

Definition at line 109 of file camera.cc.

References FocalLengthIdxs().

Referenced by BOOST_AUTO_TEST_CASE(), Rescale(), and colmap::UndistortCamera().

◆ FocalLengthIdxs()

◆ FocalLengthX()

double colmap::Camera::FocalLengthX ( ) const

◆ FocalLengthY()

double colmap::Camera::FocalLengthY ( ) const

◆ HasBogusParams()

bool colmap::Camera::HasBogusParams ( const double  min_focal_length_ratio,
const double  max_focal_length_ratio,
const double  max_extra_param 
) const

◆ HasPriorFocalLength()

◆ Height()

◆ ImageToWorld()

◆ ImageToWorldThreshold()

double colmap::Camera::ImageToWorldThreshold ( const double  threshold) const

◆ InitializeWithId()

void colmap::Camera::InitializeWithId ( const int  model_id,
const double  focal_length,
const size_t  width,
const size_t  height 
)

◆ InitializeWithName()

void colmap::Camera::InitializeWithName ( const std::string &  model_name,
const double  focal_length,
const size_t  width,
const size_t  height 
)

◆ IsUndistorted()

bool colmap::Camera::IsUndistorted ( ) const

Definition at line 194 of file camera.cc.

References e, and ExtraParamsIdxs().

Referenced by BOOST_AUTO_TEST_CASE().

◆ MeanFocalLength()

◆ ModelId()

◆ ModelName()

◆ NumParams()

◆ operator!=()

bool colmap::Camera::operator!= ( const Camera other) const
inline

Definition at line 197 of file camera.h.

◆ operator==()

bool colmap::Camera::operator== ( const Camera other) const
inline

Definition at line 190 of file camera.h.

References CameraId(), HasPriorFocalLength(), Height(), ModelId(), Params(), and Width().

◆ Params() [1/4]

std::vector< double > & colmap::Camera::Params ( )
inline

Definition at line 178 of file camera.h.

◆ Params() [2/4]

◆ Params() [3/4]

double & colmap::Camera::Params ( const size_t  idx)
inline

Definition at line 182 of file camera.h.

◆ Params() [4/4]

double colmap::Camera::Params ( const size_t  idx) const
inline

Definition at line 180 of file camera.h.

◆ ParamsData() [1/2]

double * colmap::Camera::ParamsData ( )
inline

Definition at line 186 of file camera.h.

◆ ParamsData() [2/2]

const double * colmap::Camera::ParamsData ( ) const
inline

◆ ParamsInfo()

std::string colmap::Camera::ParamsInfo ( ) const

Definition at line 96 of file camera.cc.

References colmap::CameraModelParamsInfo().

Referenced by BOOST_AUTO_TEST_CASE().

◆ ParamsToString()

std::string colmap::Camera::ParamsToString ( ) const

◆ PrincipalPointIdxs()

const std::vector< size_t > & colmap::Camera::PrincipalPointIdxs ( ) const

◆ PrincipalPointX()

◆ PrincipalPointY()

◆ Rescale() [1/2]

◆ Rescale() [2/2]

void colmap::Camera::Rescale ( const size_t  width,
const size_t  height 
)

◆ SetCameraId()

void colmap::Camera::SetCameraId ( const camera_t  camera_id)
inline

◆ SetFocalLength()

void colmap::Camera::SetFocalLength ( const double  focal_length)

Definition at line 127 of file camera.cc.

References FocalLengthIdxs().

Referenced by BOOST_AUTO_TEST_CASE(), and Rescale().

◆ SetFocalLengthX()

void colmap::Camera::SetFocalLengthX ( const double  focal_length_x)

Definition at line 134 of file camera.cc.

References FocalLengthIdxs().

Referenced by BOOST_AUTO_TEST_CASE(), Rescale(), and colmap::UndistortCamera().

◆ SetFocalLengthY()

void colmap::Camera::SetFocalLengthY ( const double  focal_length_y)

Definition at line 140 of file camera.cc.

References FocalLengthIdxs().

Referenced by BOOST_AUTO_TEST_CASE(), Rescale(), and colmap::UndistortCamera().

◆ SetHeight()

void colmap::Camera::SetHeight ( const size_t  height)
inline

◆ SetModelId()

void colmap::Camera::SetModelId ( const int  model_id)

◆ SetModelIdFromName()

void colmap::Camera::SetModelIdFromName ( const std::string &  model_name)

◆ SetParams()

void colmap::Camera::SetParams ( const std::vector< double > &  params)
inline

Definition at line 188 of file camera.h.

Referenced by BOOST_AUTO_TEST_CASE(), and colmap::IncrementalMapper::RegisterNextImage().

◆ SetParamsFromString()

bool colmap::Camera::SetParamsFromString ( const std::string &  string)

Definition at line 172 of file camera.cc.

References colmap::CameraModelVerifyParams().

Referenced by BOOST_AUTO_TEST_CASE().

◆ SetPrincipalPointX()

void colmap::Camera::SetPrincipalPointX ( const double  ppx)

Definition at line 158 of file camera.cc.

References PrincipalPointIdxs().

Referenced by BOOST_AUTO_TEST_CASE(), Rescale(), and colmap::UndistortCamera().

◆ SetPrincipalPointY()

void colmap::Camera::SetPrincipalPointY ( const double  ppy)

Definition at line 164 of file camera.cc.

References PrincipalPointIdxs().

Referenced by BOOST_AUTO_TEST_CASE(), Rescale(), and colmap::UndistortCamera().

◆ SetPriorFocalLength()

void colmap::Camera::SetPriorFocalLength ( const bool  prior)
inline

Definition at line 170 of file camera.h.

References prior().

Referenced by BOOST_AUTO_TEST_CASE(), and colmap::ImageReader::Next().

◆ SetWidth()

void colmap::Camera::SetWidth ( const size_t  width)
inline

◆ VerifyParams()

bool colmap::Camera::VerifyParams ( ) const

◆ Width()

◆ WorldToImage()

Eigen::Vector2d colmap::Camera::WorldToImage ( const Eigen::Vector2d &  world_point) const

The documentation for this class was generated from the following files: