#include <Camera.h>
Public Member Functions | |
Camera () | |
Camera (const std::string &camera_file) | |
const cv::Mat & | D () const |
virtual void | deserialize (const cv::FileNode &fn) |
float | fov_max () const |
float | fovX () const |
float | fovY () const |
const cv::Size & | img_size () const |
void | initUndistort () |
const cv::Mat & | K () const |
const cv::Mat & | Kinv () const |
void | ptsToRays (const std::vector< cv::Point2f > &pts, std::vector< cv::Point3f > &rays) const |
void | raysToPts (const std::vector< cv::Point3f > &rays, std::vector< cv::Point2f > &pts) const |
void | scale (float x, float y) |
virtual void | serialize (cv::FileStorage &fs) const |
void | setCameraIntrinsics (const std::string &filename) |
void | setCameraIntrinsics (const cv::Mat &K, const cv::Mat &D, const cv::Size &img_size) |
void | undistort (const cv::Mat &image, cv::Mat &uimage) const |
virtual int | version () const |
void | write (const std::string &file_name) const |
~Camera () | |
Static Public Member Functions | |
static void | KtoFOV (const cv::Mat &K, float &fovx, float &fovy) |
Private Member Functions | |
void | setupK () |
Private Attributes | |
cv::Mat | D_ |
distortion coeffecients; | |
float | fov_x_ |
camera field of view x not focal length. | |
float | fov_y_ |
camera field of view y | |
cv::Size | img_size_ |
image size that this is based on | |
cv::Mat | K_ |
camera matrix | |
cv::Mat | Kinv_ |
pre computed camera inverse, for projecting points | |
cv::Mat | P_ |
cv::Mat | Pinv_ |
cv::Mat | u_rm1_ |
cv::Mat | u_rm2_ |
Definition at line 58 of file Camera.cpp.
Definition at line 69 of file Camera.cpp.
pano::Camera::Camera | ( | const std::string & | camera_file | ) | [explicit] |
Definition at line 64 of file Camera.cpp.
const cv::Mat& pano::Camera::D | ( | ) | const [inline] |
void pano::Camera::deserialize | ( | const cv::FileNode & | fn | ) | [virtual] |
Implements pano::serializable.
Definition at line 166 of file Camera.cpp.
float pano::Camera::fov_max | ( | ) | const [inline] |
float pano::Camera::fovX | ( | ) | const [inline] |
float pano::Camera::fovY | ( | ) | const [inline] |
const cv::Size& pano::Camera::img_size | ( | ) | const [inline] |
void pano::Camera::initUndistort | ( | ) |
Definition at line 73 of file Camera.cpp.
const cv::Mat& pano::Camera::K | ( | ) | const [inline] |
const cv::Mat& pano::Camera::Kinv | ( | ) | const [inline] |
void pano::Camera::KtoFOV | ( | const cv::Mat & | K, |
float & | fovx, | ||
float & | fovy | ||
) | [static] |
Definition at line 177 of file Camera.cpp.
void pano::Camera::ptsToRays | ( | const std::vector< cv::Point2f > & | pts, |
std::vector< cv::Point3f > & | rays | ||
) | const |
Definition at line 86 of file Camera.cpp.
void pano::Camera::raysToPts | ( | const std::vector< cv::Point3f > & | rays, |
std::vector< cv::Point2f > & | pts | ||
) | const |
Definition at line 92 of file Camera.cpp.
void pano::Camera::scale | ( | float | x, |
float | y | ||
) |
Definition at line 136 of file Camera.cpp.
void pano::Camera::serialize | ( | cv::FileStorage & | fs | ) | const [virtual] |
Implements pano::serializable.
Definition at line 154 of file Camera.cpp.
void pano::Camera::setCameraIntrinsics | ( | const std::string & | filename | ) |
Definition at line 117 of file Camera.cpp.
void pano::Camera::setCameraIntrinsics | ( | const cv::Mat & | K, |
const cv::Mat & | D, | ||
const cv::Size & | img_size | ||
) |
Definition at line 126 of file Camera.cpp.
void pano::Camera::setupK | ( | ) | [private] |
Definition at line 109 of file Camera.cpp.
void pano::Camera::undistort | ( | const cv::Mat & | image, |
cv::Mat & | uimage | ||
) | const |
Definition at line 80 of file Camera.cpp.
virtual int pano::Camera::version | ( | ) | const [inline, virtual] |
Implements pano::serializable.
void pano::Camera::write | ( | const std::string & | file_name | ) | const |
Definition at line 149 of file Camera.cpp.
cv::Mat pano::Camera::D_ [private] |
float pano::Camera::fov_x_ [private] |
float pano::Camera::fov_y_ [private] |
cv::Size pano::Camera::img_size_ [private] |
cv::Mat pano::Camera::K_ [private] |
cv::Mat pano::Camera::Kinv_ [private] |
cv::Mat pano::Camera::P_ [private] |
cv::Mat pano::Camera::Pinv_ [private] |
cv::Mat pano::Camera::u_rm1_ [private] |
cv::Mat pano::Camera::u_rm2_ [private] |