this is the base class of all types of cameras, the customized camera type should inherit this class, and implement the virtual methods in this class and OpenCV VideoCapture class.
More...
#include <CameraObject.h>
|
| CameraObject () |
| Construct a new Camera Object object. More...
|
|
| CameraObject (std::string CameraName) |
| Construct a new Camera Object object. More...
|
|
virtual | ~CameraObject () |
| Destroy the Camera Object object.
|
|
std::string | getCameraName () |
| Get the Camera Name. More...
|
|
virtual bool | undistort (const cv::Mat &src, cv::Mat &dst)=0 |
| Transforms an image to compensate for lens distortion. this is a pure virtual function, the real undistort algorithm should be implemented. More...
|
|
virtual bool | open () |
| open the camera with the preloaded parameter More...
|
|
bool | save (JsonNode &fs) override |
| save data and settings to file More...
|
|
bool | load (JsonNode &fs) override |
| load data and settings from file More...
|
|
virtual std::string | type_name () override |
| get the typename. More...
|
|
| DataFlowObject () |
| Construct a new Data Flow Object object.
|
|
virtual | ~DataFlowObject () |
| Destroy the Data Flow Object object.
|
|
| MVSObject () |
| Construct a new MVSObject object.
|
|
virtual | ~MVSObject () |
| Destroy the MVSObject object.
|
|
virtual bool | save (JsonNode &fs)=0 |
| save data and settings to file More...
|
|
virtual bool | load (JsonNode &fs)=0 |
| load data and settings from file More...
|
|
virtual std::string | type_name () |
| get the typename. More...
|
|
|
std::string | CameraName |
|
cv::Size2i | ImageSize |
|
|
static void | cvMat2Sophus (const cv::Mat1d &Mat, Sophus::SE3d &Pose) |
| create shared pointer of DataFlowObject, do NOT use this method directly, use the Create() method in derived class. More...
|
|
static void | Sophus2cvMat (const Sophus::SE3d &pose, cv::Mat1d &Mat) |
|
static cv::Mat1d | Rt2T (const cv::Mat1d &R, const cv::Mat1d &t) |
|
static std::tuple< cv::Mat1d, cv::Mat1d > | T2Rt (const cv::Mat1d &T) |
|
bool | isDirExist (std::string path) |
| check if the directory is exist. More...
|
|
bool | mkdir (std::string path) |
| create directory in given path. More...
|
|
this is the base class of all types of cameras, the customized camera type should inherit this class, and implement the virtual methods in this class and OpenCV VideoCapture class.
◆ CameraObject() [1/2]
CameraObject::CameraObject |
( |
| ) |
|
Construct a new Camera Object object.
- Parameters
-
CameraName | the unique name of Camera |
◆ CameraObject() [2/2]
CameraObject::CameraObject |
( |
std::string |
CameraName | ) |
|
Construct a new Camera Object object.
- Parameters
-
◆ getCameraName()
std::string CameraObject::getCameraName |
( |
| ) |
|
Get the Camera Name.
- Returns
- std::string Camera name
◆ load()
bool CameraObject::load |
( |
JsonNode & |
fs | ) |
|
|
overridevirtual |
load data and settings from file
this method will load data such as keypoints, descriptors, translation matrices in DataFlowObject and its sub-classes from the given JsonNode instance. or will load parameters and settings in WorkFlowObject and its sub-classes to the given JsonNode instance, and automatically initialize the WorkFlow with these parameters
- Parameters
-
- Returns
- true load successfully
-
false load failed or initialization falied.
Implements MVSObject.
Reimplemented in PinholeCamera.
◆ open()
bool CameraObject::open |
( |
| ) |
|
|
virtual |
open the camera with the preloaded parameter
- Returns
- true
-
false
Reimplemented in PinholeImageReader.
◆ save()
bool CameraObject::save |
( |
JsonNode & |
fs | ) |
|
|
overridevirtual |
save data and settings to file
this method will save data such as keypoints, descriptors, translation matrices in DataFlowObject and its sub-classes to the given JsonNode instance, or will save parameters and settings in WorkFlowObject and its sub-classes to the given JsonNode instance.
- Parameters
-
- Returns
- true save successfully
-
false save failed
Implements MVSObject.
Reimplemented in PinholeCamera.
◆ type_name()
std::string CameraObject::type_name |
( |
| ) |
|
|
overridevirtual |
◆ undistort()
virtual bool CameraObject::undistort |
( |
const cv::Mat & |
src, |
|
|
cv::Mat & |
dst |
|
) |
| |
|
pure virtual |
Transforms an image to compensate for lens distortion. this is a pure virtual function, the real undistort algorithm should be implemented.
- Parameters
-
src | Input (distorted) image. |
dst | Output (corrected) image that has the same size and type as src. |
- Returns
- true successfully undistort
-
false undistort failed
Implemented in PinholeCamera.
The documentation for this class was generated from the following files:
- C:/Users/ZhouZishun/Documents/Workspace/EasyMVS/core/common/CameraObject.h
- C:/Users/ZhouZishun/Documents/Workspace/EasyMVS/core/common/CameraObject.cpp