#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=Transform::getIdentity()) | |
CameraModel (double fx, double fy, double cx, double cy, const Transform &localTransform=Transform::getIdentity(), 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=Transform::getIdentity(), 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 |
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 |
void | initRectificationMap () |
bool | isRectificationMapInitialized () |
bool | isValidForProjection () const |
bool | isValidForRectification () const |
bool | isValidForReprojection () const |
cv::Mat | K () const |
cv::Mat | K_raw () const |
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 |
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 () |
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.
Definition at line 39 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 = Transform::getIdentity() |
||
) |
Definition at line 44 of file CameraModel.cpp.
rtabmap::CameraModel::CameraModel | ( | double | fx, |
double | fy, | ||
double | cx, | ||
double | cy, | ||
const Transform & | localTransform = Transform::getIdentity() , |
||
double | Tx = 0.0f , |
||
const cv::Size & | imageSize = cv::Size(0,0) |
||
) |
Definition at line 66 of file CameraModel.cpp.
rtabmap::CameraModel::CameraModel | ( | const std::string & | name, |
double | fx, | ||
double | fy, | ||
double | cx, | ||
double | cy, | ||
const Transform & | localTransform = Transform::getIdentity() , |
||
double | Tx = 0.0f , |
||
const cv::Size & | imageSize = cv::Size(0,0) |
||
) |
Definition at line 109 of file CameraModel.cpp.
virtual rtabmap::CameraModel::~CameraModel | ( | ) | [inline, virtual] |
Definition at line 75 of file CameraModel.h.
double rtabmap::CameraModel::cx | ( | ) | const [inline] |
Definition at line 97 of file CameraModel.h.
double rtabmap::CameraModel::cy | ( | ) | const [inline] |
Definition at line 98 of file CameraModel.h.
cv::Mat rtabmap::CameraModel::D | ( | ) | const [inline] |
Definition at line 104 of file CameraModel.h.
cv::Mat rtabmap::CameraModel::D_raw | ( | ) | const [inline] |
Definition at line 102 of file CameraModel.h.
double rtabmap::CameraModel::fx | ( | ) | const [inline] |
Definition at line 95 of file CameraModel.h.
double rtabmap::CameraModel::fy | ( | ) | const [inline] |
Definition at line 96 of file CameraModel.h.
double rtabmap::CameraModel::horizontalFOV | ( | ) | const |
Definition at line 519 of file CameraModel.cpp.
int rtabmap::CameraModel::imageHeight | ( | ) | const [inline] |
Definition at line 114 of file CameraModel.h.
const cv::Size& rtabmap::CameraModel::imageSize | ( | ) | const [inline] |
Definition at line 112 of file CameraModel.h.
int rtabmap::CameraModel::imageWidth | ( | ) | const [inline] |
Definition at line 113 of file CameraModel.h.
bool rtabmap::CameraModel::inFrame | ( | int | u, |
int | v | ||
) | const |
Definition at line 638 of file CameraModel.cpp.
Definition at line 154 of file CameraModel.cpp.
bool rtabmap::CameraModel::isRectificationMapInitialized | ( | ) | [inline] |
Definition at line 78 of file CameraModel.h.
bool rtabmap::CameraModel::isValidForProjection | ( | ) | const [inline] |
Definition at line 80 of file CameraModel.h.
bool rtabmap::CameraModel::isValidForRectification | ( | ) | const [inline] |
Definition at line 82 of file CameraModel.h.
bool rtabmap::CameraModel::isValidForReprojection | ( | ) | const [inline] |
Definition at line 81 of file CameraModel.h.
cv::Mat rtabmap::CameraModel::K | ( | ) | const [inline] |
Definition at line 103 of file CameraModel.h.
cv::Mat rtabmap::CameraModel::K_raw | ( | ) | const [inline] |
Definition at line 101 of file CameraModel.h.
bool rtabmap::CameraModel::load | ( | const std::string & | directory, |
const std::string & | cameraName | ||
) |
Definition at line 212 of file CameraModel.cpp.
const Transform& rtabmap::CameraModel::localTransform | ( | ) | const [inline] |
Definition at line 109 of file CameraModel.h.
const std::string& rtabmap::CameraModel::name | ( | ) | const [inline] |
Definition at line 93 of file CameraModel.h.
cv::Mat rtabmap::CameraModel::P | ( | ) | const [inline] |
Definition at line 106 of file CameraModel.h.
void rtabmap::CameraModel::project | ( | float | u, |
float | v, | ||
float | depth, | ||
float & | x, | ||
float & | y, | ||
float & | z | ||
) | const |
Definition at line 608 of file CameraModel.cpp.
cv::Mat rtabmap::CameraModel::R | ( | ) | const [inline] |
Definition at line 105 of file CameraModel.h.
cv::Mat rtabmap::CameraModel::rectifyDepth | ( | const cv::Mat & | raw | ) | const |
Definition at line 554 of file CameraModel.cpp.
cv::Mat rtabmap::CameraModel::rectifyImage | ( | const cv::Mat & | raw, |
int | interpolation = cv::INTER_LINEAR |
||
) | const |
Definition at line 537 of file CameraModel.cpp.
void rtabmap::CameraModel::reproject | ( | float | x, |
float | y, | ||
float | z, | ||
float & | u, | ||
float & | v | ||
) | const |
Definition at line 623 of file CameraModel.cpp.
void rtabmap::CameraModel::reproject | ( | float | x, |
float | y, | ||
float | z, | ||
int & | u, | ||
int & | v | ||
) | const |
Definition at line 630 of file CameraModel.cpp.
CameraModel rtabmap::CameraModel::roi | ( | const cv::Rect & | roi | ) | const |
Definition at line 489 of file CameraModel.cpp.
bool rtabmap::CameraModel::save | ( | const std::string & | directory | ) | const |
Definition at line 362 of file CameraModel.cpp.
CameraModel rtabmap::CameraModel::scaled | ( | double | scale | ) | const |
Definition at line 452 of file CameraModel.cpp.
void rtabmap::CameraModel::setImageSize | ( | const cv::Size & | size | ) |
Definition at line 186 of file CameraModel.cpp.
void rtabmap::CameraModel::setLocalTransform | ( | const Transform & | transform | ) | [inline] |
Definition at line 108 of file CameraModel.h.
void rtabmap::CameraModel::setName | ( | const std::string & | name | ) | [inline] |
Definition at line 92 of file CameraModel.h.
double rtabmap::CameraModel::Tx | ( | ) | const [inline] |
Definition at line 99 of file CameraModel.h.
double rtabmap::CameraModel::verticalFOV | ( | ) | const |
Definition at line 528 of file CameraModel.cpp.
cv::Mat rtabmap::CameraModel::D_ [private] |
Definition at line 140 of file CameraModel.h.
cv::Size rtabmap::CameraModel::imageSize_ [private] |
Definition at line 138 of file CameraModel.h.
cv::Mat rtabmap::CameraModel::K_ [private] |
Definition at line 139 of file CameraModel.h.
Definition at line 145 of file CameraModel.h.
cv::Mat rtabmap::CameraModel::mapX_ [private] |
Definition at line 143 of file CameraModel.h.
cv::Mat rtabmap::CameraModel::mapY_ [private] |
Definition at line 144 of file CameraModel.h.
std::string rtabmap::CameraModel::name_ [private] |
Definition at line 137 of file CameraModel.h.
cv::Mat rtabmap::CameraModel::P_ [private] |
Definition at line 142 of file CameraModel.h.
cv::Mat rtabmap::CameraModel::R_ [private] |
Definition at line 141 of file CameraModel.h.