![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#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 > ¶ms) |
| 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 |
| colmap::Camera::Camera | ( | ) |
Definition at line 42 of file camera.cc.
Referenced by BOOST_AUTO_TEST_CASE().
| Eigen::Matrix3d colmap::Camera::CalibrationMatrix | ( | ) | const |
Definition at line 75 of file camera.cc.
References FocalLengthIdxs(), PrincipalPointX(), and PrincipalPointY().
Referenced by BOOST_AUTO_TEST_CASE(), colmap::EstimateManhattanWorldFrame(), colmap::TwoViewGeometry::EstimateRelativePose(), and colmap::RectifyStereoCameras().
|
inline |
Definition at line 154 of file camera.h.
Referenced by colmap::DatabaseCache::AddCamera(), colmap::Reconstruction::AddCamera(), BOOST_AUTO_TEST_CASE(), colmap::ImageReader::Next(), operator==(), cloudViewer::CameraTab::Reload(), colmap::CameraTab::Reload(), colmap::Image::SetUp(), colmap::Database::UpdateCamera(), and colmap::Database::WriteCamera().
| const std::vector< size_t > & colmap::Camera::ExtraParamsIdxs | ( | ) | const |
Definition at line 71 of file camera.cc.
References colmap::CameraModelExtraParamsIdxs().
Referenced by BOOST_AUTO_TEST_CASE(), IsUndistorted(), colmap::BundleAdjuster::ParameterizeCameras(), and colmap::RefineAbsolutePose().
| 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().
| const std::vector< size_t > & colmap::Camera::FocalLengthIdxs | ( | ) | const |
Definition at line 63 of file camera.cc.
References colmap::CameraModelFocalLengthIdxs().
Referenced by BOOST_AUTO_TEST_CASE(), CalibrationMatrix(), colmap::EstimateAbsolutePose(), colmap::Reconstruction::ExportCam(), FocalLength(), FocalLengthX(), FocalLengthY(), MeanFocalLength(), colmap::BundleAdjuster::ParameterizeCameras(), colmap::RefineAbsolutePose(), Rescale(), SetFocalLength(), SetFocalLengthX(), SetFocalLengthY(), and colmap::UndistortCamera().
| double colmap::Camera::FocalLengthX | ( | ) | const |
Definition at line 115 of file camera.cc.
References FocalLengthIdxs().
Referenced by BOOST_AUTO_TEST_CASE(), colmap::Reconstruction::ExportCam(), Rescale(), and colmap::UndistortCamera().
| double colmap::Camera::FocalLengthY | ( | ) | const |
Definition at line 121 of file camera.cc.
References FocalLengthIdxs().
Referenced by BOOST_AUTO_TEST_CASE(), colmap::Reconstruction::ExportCam(), Rescale(), and colmap::UndistortCamera().
| bool colmap::Camera::HasBogusParams | ( | const double | min_focal_length_ratio, |
| const double | max_focal_length_ratio, | ||
| const double | max_extra_param | ||
| ) | const |
Definition at line 186 of file camera.cc.
References colmap::CameraModelHasBogusParams().
Referenced by BOOST_AUTO_TEST_CASE(), colmap::Reconstruction::FilterImages(), and colmap::IncrementalMapper::RegisterNextImage().
|
inline |
Definition at line 168 of file camera.h.
Referenced by BOOST_AUTO_TEST_CASE(), colmap::TwoViewGeometry::Estimate(), operator==(), colmap::IncrementalMapper::RegisterNextImage(), cloudViewer::CameraTab::Reload(), colmap::CameraTab::Reload(), colmap::Database::UpdateCamera(), and colmap::Database::WriteCamera().
|
inline |
Definition at line 162 of file camera.h.
Referenced by BOOST_AUTO_TEST_CASE(), colmap::TwoViewGeometry::DetectWatermark(), colmap::Reconstruction::ExportCam(), colmap::Reconstruction::ExportRecon3D(), colmap::ImageReader::Next(), operator==(), colmap::RectifyAndUndistortStereoImages(), cloudViewer::CameraTab::Reload(), colmap::CameraTab::Reload(), colmap::Image::SetUp(), cloudViewer::DatabaseImageViewerWidget::ShowImageWithId(), colmap::DatabaseImageViewerWidget::ShowImageWithId(), colmap::UndistortCamera(), colmap::UndistortImage(), colmap::Database::UpdateCamera(), colmap::WarpImageBetweenCameras(), colmap::WarpImageWithHomographyBetweenCameras(), and colmap::Database::WriteCamera().
| Eigen::Vector2d colmap::Camera::ImageToWorld | ( | const Eigen::Vector2d & | image_point | ) | const |
Definition at line 219 of file camera.cc.
References colmap::CameraModelImageToWorld().
Referenced by BOOST_AUTO_TEST_CASE(), colmap::CalculateAngularError(), colmap::IncrementalTriangulator::CompleteImage(), colmap::TwoViewGeometry::EstimateCalibrated(), colmap::TwoViewGeometry::EstimateRelativePose(), colmap::IncrementalMapper::RegisterInitialImagePair(), colmap::UndistortCamera(), colmap::WarpImageBetweenCameras(), and colmap::WarpImageWithHomographyBetweenCameras().
| double colmap::Camera::ImageToWorldThreshold | ( | const double | threshold | ) | const |
Definition at line 226 of file camera.cc.
References colmap::CameraModelImageToWorldThreshold().
Referenced by BOOST_AUTO_TEST_CASE(), and colmap::TwoViewGeometry::EstimateCalibrated().
| void colmap::Camera::InitializeWithId | ( | const int | model_id, |
| const double | focal_length, | ||
| const size_t | width, | ||
| const size_t | height | ||
| ) |
Definition at line 203 of file camera.cc.
References colmap::CameraModelInitializeParams(), colmap::ExistsCameraModelWithId(), height, and width.
Referenced by BOOST_AUTO_TEST_CASE(), GenerateReconstruction(), InitializeWithName(), and colmap::ImageReader::Next().
| void colmap::Camera::InitializeWithName | ( | const std::string & | model_name, |
| const double | focal_length, | ||
| const size_t | width, | ||
| const size_t | height | ||
| ) |
Definition at line 212 of file camera.cc.
References colmap::CameraModelNameToId(), height, InitializeWithId(), and width.
Referenced by BOOST_AUTO_TEST_CASE(), and GenerateReconstruction().
| bool colmap::Camera::IsUndistorted | ( | ) | const |
Definition at line 194 of file camera.cc.
References e, and ExtraParamsIdxs().
Referenced by BOOST_AUTO_TEST_CASE().
| double colmap::Camera::MeanFocalLength | ( | ) | const |
Definition at line 100 of file camera.cc.
References FocalLengthIdxs().
Referenced by BOOST_AUTO_TEST_CASE(), colmap::Reconstruction::ExportBundler(), colmap::Reconstruction::ExportCam(), colmap::Reconstruction::ExportNVM(), colmap::Reconstruction::ExportRecon3D(), and colmap::RectifyStereoCameras().
|
inline |
Definition at line 158 of file camera.h.
Referenced by BOOST_AUTO_TEST_CASE(), colmap::Reconstruction::ExportBundler(), colmap::Reconstruction::ExportCam(), colmap::Reconstruction::ExportNVM(), colmap::Reconstruction::ExportRecon3D(), colmap::ImageReader::Next(), operator==(), colmap::RectifyStereoCameras(), colmap::RefineAbsolutePose(), colmap::UndistortCamera(), colmap::Database::UpdateCamera(), and colmap::Database::WriteCamera().
| std::string colmap::Camera::ModelName | ( | ) | const |
Definition at line 49 of file camera.cc.
References colmap::CameraModelIdToName().
Referenced by BOOST_AUTO_TEST_CASE(), cloudViewer::CameraTab::Reload(), colmap::CameraTab::Reload(), cloudViewer::DatabaseImageViewerWidget::ShowImageWithId(), and colmap::DatabaseImageViewerWidget::ShowImageWithId().
|
inline |
Definition at line 174 of file camera.h.
Referenced by BOOST_AUTO_TEST_CASE(), colmap::BundleAdjuster::ParameterizeCameras(), colmap::RefineAbsolutePose(), colmap::Database::UpdateCamera(), and colmap::Database::WriteCamera().
|
inline |
|
inline |
Definition at line 190 of file camera.h.
References CameraId(), HasPriorFocalLength(), Height(), ModelId(), Params(), and Width().
|
inline |
Definition at line 176 of file camera.h.
Referenced by BOOST_AUTO_TEST_CASE(), colmap::EstimateAbsolutePose(), colmap::Reconstruction::ExportBundler(), colmap::Reconstruction::ExportCam(), colmap::Reconstruction::ExportNVM(), colmap::Reconstruction::ExportRecon3D(), operator==(), colmap::IncrementalMapper::RegisterNextImage(), cloudViewer::CameraTab::Reload(), colmap::CameraTab::Reload(), and colmap::RunImageUndistorterStandalone().
|
inline |
|
inline |
Definition at line 184 of file camera.h.
Referenced by BOOST_AUTO_TEST_CASE(), colmap::BundleAdjuster::ParameterizeCameras(), colmap::RefineAbsolutePose(), colmap::Database::UpdateCamera(), and colmap::Database::WriteCamera().
| std::string colmap::Camera::ParamsInfo | ( | ) | const |
Definition at line 96 of file camera.cc.
References colmap::CameraModelParamsInfo().
Referenced by BOOST_AUTO_TEST_CASE().
| std::string colmap::Camera::ParamsToString | ( | ) | const |
Definition at line 170 of file camera.cc.
References colmap::VectorToCSV().
Referenced by BOOST_AUTO_TEST_CASE(), cloudViewer::DatabaseImageViewerWidget::ShowImageWithId(), and colmap::DatabaseImageViewerWidget::ShowImageWithId().
| const std::vector< size_t > & colmap::Camera::PrincipalPointIdxs | ( | ) | const |
Definition at line 67 of file camera.cc.
References colmap::CameraModelPrincipalPointIdxs().
Referenced by BOOST_AUTO_TEST_CASE(), colmap::BundleAdjuster::ParameterizeCameras(), PrincipalPointX(), PrincipalPointY(), colmap::RefineAbsolutePose(), SetPrincipalPointX(), and SetPrincipalPointY().
| double colmap::Camera::PrincipalPointX | ( | ) | const |
Definition at line 146 of file camera.cc.
References PrincipalPointIdxs().
Referenced by BOOST_AUTO_TEST_CASE(), CalibrationMatrix(), colmap::Reconstruction::ExportBundler(), colmap::Reconstruction::ExportCam(), colmap::Reconstruction::ExportRecon3D(), colmap::RectifyStereoCameras(), Rescale(), and colmap::UndistortCamera().
| double colmap::Camera::PrincipalPointY | ( | ) | const |
Definition at line 152 of file camera.cc.
References PrincipalPointIdxs().
Referenced by BOOST_AUTO_TEST_CASE(), CalibrationMatrix(), colmap::Reconstruction::ExportBundler(), colmap::Reconstruction::ExportCam(), colmap::Reconstruction::ExportRecon3D(), colmap::RectifyStereoCameras(), Rescale(), and colmap::UndistortCamera().
| void colmap::Camera::Rescale | ( | const double | scale | ) |
Definition at line 237 of file camera.cc.
References FocalLength(), FocalLengthIdxs(), FocalLengthX(), FocalLengthY(), PrincipalPointX(), PrincipalPointY(), SetFocalLength(), SetFocalLengthX(), SetFocalLengthY(), SetPrincipalPointX(), SetPrincipalPointY(), and size.
Referenced by BOOST_AUTO_TEST_CASE(), colmap::UndistortCamera(), colmap::WarpImageBetweenCameras(), and colmap::WarpImageWithHomographyBetweenCameras().
| void colmap::Camera::Rescale | ( | const size_t | width, |
| const size_t | height | ||
| ) |
Definition at line 258 of file camera.cc.
References FocalLength(), FocalLengthIdxs(), FocalLengthX(), FocalLengthY(), height, PrincipalPointX(), PrincipalPointY(), SetFocalLength(), SetFocalLengthX(), SetFocalLengthY(), SetPrincipalPointX(), SetPrincipalPointY(), size, and width.
|
inline |
Definition at line 156 of file camera.h.
Referenced by BOOST_AUTO_TEST_CASE(), GenerateReconstruction(), and colmap::ImageReader::Next().
| 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().
| 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().
| 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().
|
inline |
Definition at line 166 of file camera.h.
References height.
Referenced by BOOST_AUTO_TEST_CASE(), colmap::ImageReader::Next(), colmap::RunImageUndistorterStandalone(), and colmap::UndistortCamera().
| void colmap::Camera::SetModelId | ( | const int | model_id | ) |
Definition at line 51 of file camera.cc.
References colmap::CameraModelNumParams(), and colmap::ExistsCameraModelWithId().
Referenced by BOOST_AUTO_TEST_CASE(), and colmap::UndistortCamera().
| void colmap::Camera::SetModelIdFromName | ( | const std::string & | model_name | ) |
Definition at line 57 of file camera.cc.
References colmap::CameraModelNameToId(), colmap::CameraModelNumParams(), and colmap::ExistsCameraModelWithName().
Referenced by BOOST_AUTO_TEST_CASE(), and colmap::RunImageUndistorterStandalone().
|
inline |
Definition at line 188 of file camera.h.
Referenced by BOOST_AUTO_TEST_CASE(), and colmap::IncrementalMapper::RegisterNextImage().
| 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().
| 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().
| 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().
|
inline |
Definition at line 170 of file camera.h.
References prior().
Referenced by BOOST_AUTO_TEST_CASE(), and colmap::ImageReader::Next().
|
inline |
Definition at line 164 of file camera.h.
References width.
Referenced by BOOST_AUTO_TEST_CASE(), colmap::ImageReader::Next(), colmap::RunImageUndistorterStandalone(), and colmap::UndistortCamera().
| bool colmap::Camera::VerifyParams | ( | ) | const |
Definition at line 182 of file camera.cc.
References colmap::CameraModelVerifyParams().
Referenced by colmap::Reconstruction::AddCamera(), BOOST_AUTO_TEST_CASE(), colmap::ImageReader::Next(), and colmap::RunImageUndistorterStandalone().
|
inline |
Definition at line 160 of file camera.h.
Referenced by BOOST_AUTO_TEST_CASE(), colmap::TwoViewGeometry::DetectWatermark(), colmap::Reconstruction::ExportCam(), colmap::Reconstruction::ExportRecon3D(), colmap::ImageReader::Next(), operator==(), colmap::RectifyAndUndistortStereoImages(), cloudViewer::CameraTab::Reload(), colmap::CameraTab::Reload(), colmap::Image::SetUp(), cloudViewer::DatabaseImageViewerWidget::ShowImageWithId(), colmap::DatabaseImageViewerWidget::ShowImageWithId(), colmap::UndistortCamera(), colmap::UndistortImage(), colmap::Database::UpdateCamera(), colmap::WarpImageBetweenCameras(), colmap::WarpImageWithHomographyBetweenCameras(), and colmap::Database::WriteCamera().
| Eigen::Vector2d colmap::Camera::WorldToImage | ( | const Eigen::Vector2d & | world_point | ) | const |
Definition at line 230 of file camera.cc.
References colmap::CameraModelWorldToImage().
Referenced by BOOST_AUTO_TEST_CASE(), colmap::CalculateSquaredReprojectionError(), colmap::ProjectPointToImage(), colmap::UndistortCamera(), colmap::WarpImageBetweenCameras(), and colmap::WarpImageWithHomographyBetweenCameras().