#include <CameraModel.h>
Public Member Functions | |
CameraModel () | |
CameraModel (const std::string &name, const cv::Size &imageSize, const cv::Mat &K, const cv::Mat &D, const cv::Mat &R, const cv::Mat &P, const Transform &localTransform=opticalRotation()) | |
CameraModel (double fx, double fy, double cx, double cy, const Transform &localTransform=opticalRotation(), double Tx=0.0f, const cv::Size &imageSize=cv::Size(0, 0)) | |
CameraModel (const std::string &name, double fx, double fy, double cx, double cy, const Transform &localTransform=opticalRotation(), double Tx=0.0f, const cv::Size &imageSize=cv::Size(0, 0)) | |
double | cx () const |
double | cy () const |
cv::Mat | D () const |
cv::Mat | D_raw () const |
unsigned int | deserialize (const std::vector< unsigned char > &data) |
unsigned int | deserialize (const unsigned char *data, unsigned int dataSize) |
double | fovX () const |
double | fovY () const |
double | fx () const |
double | fy () const |
double | horizontalFOV () const |
int | imageHeight () const |
const cv::Size & | imageSize () const |
int | imageWidth () const |
bool | inFrame (int u, int v) const |
bool | initRectificationMap () |
bool | isFisheye () const |
bool | isRectificationMapInitialized () const |
bool | isValidForProjection () const |
bool | isValidForRectification () const |
bool | isValidForReprojection () const |
cv::Mat | K () const |
cv::Mat | K_raw () const |
bool | load (const std::string &filePath) |
bool | load (const std::string &directory, const std::string &cameraName) |
const Transform & | localTransform () const |
const std::string & | name () const |
cv::Mat | P () const |
void | project (float u, float v, float depth, float &x, float &y, float &z) const |
cv::Mat | R () const |
cv::Mat | rectifyDepth (const cv::Mat &raw) const |
cv::Mat | rectifyImage (const cv::Mat &raw, int interpolation=cv::INTER_LINEAR) const |
void | reproject (float x, float y, float z, float &u, float &v) const |
void | reproject (float x, float y, float z, int &u, int &v) const |
CameraModel | roi (const cv::Rect &roi) const |
bool | save (const std::string &directory) const |
CameraModel | scaled (double scale) const |
std::vector< unsigned char > | serialize () const |
void | setImageSize (const cv::Size &size) |
void | setLocalTransform (const Transform &transform) |
void | setName (const std::string &name) |
double | Tx () const |
double | verticalFOV () const |
virtual | ~CameraModel () |
Static Public Member Functions | |
static Transform | opticalRotation () |
Private Attributes | |
cv::Mat | D_ |
cv::Size | imageSize_ |
cv::Mat | K_ |
Transform | localTransform_ |
cv::Mat | mapX_ |
cv::Mat | mapY_ |
std::string | name_ |
cv::Mat | P_ |
cv::Mat | R_ |
Definition at line 38 of file CameraModel.h.
rtabmap::CameraModel::CameraModel | ( | ) |
Definition at line 40 of file CameraModel.cpp.
rtabmap::CameraModel::CameraModel | ( | const std::string & | name, |
const cv::Size & | imageSize, | ||
const cv::Mat & | K, | ||
const cv::Mat & | D, | ||
const cv::Mat & | R, | ||
const cv::Mat & | P, | ||
const Transform & | localTransform = opticalRotation() |
||
) |
Definition at line 46 of file CameraModel.cpp.
rtabmap::CameraModel::CameraModel | ( | double | fx, |
double | fy, | ||
double | cx, | ||
double | cy, | ||
const Transform & | localTransform = opticalRotation() , |
||
double | Tx = 0.0f , |
||
const cv::Size & | imageSize = cv::Size(0,0) |
||
) |
Definition at line 68 of file CameraModel.cpp.
rtabmap::CameraModel::CameraModel | ( | const std::string & | name, |
double | fx, | ||
double | fy, | ||
double | cx, | ||
double | cy, | ||
const Transform & | localTransform = opticalRotation() , |
||
double | Tx = 0.0f , |
||
const cv::Size & | imageSize = cv::Size(0,0) |
||
) |
Definition at line 111 of file CameraModel.cpp.
|
inlinevirtual |
Definition at line 82 of file CameraModel.h.
|
inline |
Definition at line 104 of file CameraModel.h.
|
inline |
Definition at line 105 of file CameraModel.h.
|
inline |
Definition at line 111 of file CameraModel.h.
|
inline |
Definition at line 109 of file CameraModel.h.
unsigned int rtabmap::CameraModel::deserialize | ( | const std::vector< unsigned char > & | data | ) |
Definition at line 535 of file CameraModel.cpp.
unsigned int rtabmap::CameraModel::deserialize | ( | const unsigned char * | data, |
unsigned int | dataSize | ||
) |
Definition at line 539 of file CameraModel.cpp.
double rtabmap::CameraModel::fovX | ( | ) | const |
Definition at line 676 of file CameraModel.cpp.
double rtabmap::CameraModel::fovY | ( | ) | const |
Definition at line 680 of file CameraModel.cpp.
|
inline |
Definition at line 102 of file CameraModel.h.
|
inline |
Definition at line 103 of file CameraModel.h.
double rtabmap::CameraModel::horizontalFOV | ( | ) | const |
Definition at line 685 of file CameraModel.cpp.
|
inline |
Definition at line 121 of file CameraModel.h.
|
inline |
Definition at line 119 of file CameraModel.h.
|
inline |
Definition at line 120 of file CameraModel.h.
bool rtabmap::CameraModel::inFrame | ( | int | u, |
int | v | ||
) | const |
Definition at line 796 of file CameraModel.cpp.
bool rtabmap::CameraModel::initRectificationMap | ( | ) |
Definition at line 156 of file CameraModel.cpp.
|
inline |
Definition at line 127 of file CameraModel.h.
|
inline |
Definition at line 85 of file CameraModel.h.
|
inline |
Definition at line 87 of file CameraModel.h.
|
inline |
Definition at line 89 of file CameraModel.h.
|
inline |
Definition at line 88 of file CameraModel.h.
|
inline |
Definition at line 110 of file CameraModel.h.
|
inline |
Definition at line 108 of file CameraModel.h.
bool rtabmap::CameraModel::load | ( | const std::string & | filePath | ) |
Definition at line 215 of file CameraModel.cpp.
bool rtabmap::CameraModel::load | ( | const std::string & | directory, |
const std::string & | cameraName | ||
) |
Definition at line 383 of file CameraModel.cpp.
|
inline |
Definition at line 116 of file CameraModel.h.
|
inline |
Definition at line 100 of file CameraModel.h.
|
inlinestatic |
Optical rotation used to transform image coordinate frame (x->right, y->down, z->forward) to robot coordinate frame (x->forward, y->left, z->up).
Definition at line 45 of file CameraModel.h.
|
inline |
Definition at line 113 of file CameraModel.h.
void rtabmap::CameraModel::project | ( | float | u, |
float | v, | ||
float | depth, | ||
float & | x, | ||
float & | y, | ||
float & | z | ||
) | const |
Definition at line 766 of file CameraModel.cpp.
|
inline |
Definition at line 112 of file CameraModel.h.
cv::Mat rtabmap::CameraModel::rectifyDepth | ( | const cv::Mat & | raw | ) | const |
Definition at line 712 of file CameraModel.cpp.
cv::Mat rtabmap::CameraModel::rectifyImage | ( | const cv::Mat & | raw, |
int | interpolation = cv::INTER_LINEAR |
||
) | const |
Definition at line 695 of file CameraModel.cpp.
void rtabmap::CameraModel::reproject | ( | float | x, |
float | y, | ||
float | z, | ||
float & | u, | ||
float & | v | ||
) | const |
Definition at line 781 of file CameraModel.cpp.
void rtabmap::CameraModel::reproject | ( | float | x, |
float | y, | ||
float | z, | ||
int & | u, | ||
int & | v | ||
) | const |
Definition at line 788 of file CameraModel.cpp.
CameraModel rtabmap::CameraModel::roi | ( | const cv::Rect & | roi | ) | const |
Definition at line 646 of file CameraModel.cpp.
bool rtabmap::CameraModel::save | ( | const std::string & | directory | ) | const |
Definition at line 388 of file CameraModel.cpp.
CameraModel rtabmap::CameraModel::scaled | ( | double | scale | ) | const |
Definition at line 609 of file CameraModel.cpp.
std::vector< unsigned char > rtabmap::CameraModel::serialize | ( | ) | const |
Definition at line 491 of file CameraModel.cpp.
void rtabmap::CameraModel::setImageSize | ( | const cv::Size & | size | ) |
Definition at line 189 of file CameraModel.cpp.
|
inline |
Definition at line 115 of file CameraModel.h.
|
inline |
Definition at line 99 of file CameraModel.h.
|
inline |
Definition at line 106 of file CameraModel.h.
double rtabmap::CameraModel::verticalFOV | ( | ) | const |
Definition at line 690 of file CameraModel.cpp.
|
private |
Definition at line 154 of file CameraModel.h.
|
private |
Definition at line 152 of file CameraModel.h.
|
private |
Definition at line 153 of file CameraModel.h.
|
private |
Definition at line 159 of file CameraModel.h.
|
private |
Definition at line 157 of file CameraModel.h.
|
private |
Definition at line 158 of file CameraModel.h.
|
private |
Definition at line 151 of file CameraModel.h.
|
private |
Definition at line 156 of file CameraModel.h.
|
private |
Definition at line 155 of file CameraModel.h.