OpenCV
3.2.0
Open Source Computer Vision
|
Type conversion class for converting OpenCV and native C++ types. More...
#include "bridge.hpp"
Static Public Member Functions | |
template<typename Scalar > | |
static matlab::MxArray | FromMat (const cv::Mat &mat) |
Type conversion class for converting OpenCV and native C++ types.
Bridge provides an interface for converting between OpenCV/C++ types to Matlab's mxArray format.
Each type conversion requires three operators: // conversion from ObjectType –> Bridge Bridge& operator=(const ObjectType&); // implicit conversion from Bridge –> ObjectType operator ObjectType(); // explicit conversion from Bridge –> ObjectType ObjectType toObjectType();
The bridging class provides common conversions between OpenCV types, std and stl types to Matlab's mxArray format. By inheriting Bridge, you can add your own custom type conversions.
Because Matlab uses a homogeneous storage type, all operations are provided relative to Matlab's type. That is, Bridge always stores an matlab::MxArray object and converts to and from other object types on demand.
NOTE: for the explicit conversion function, the object name must be in UpperCamelCase, for example: int –> toInt my_object –> MyObject my_Object –> MyObject myObject –> MyObject this is because the binding generator standardises the calling syntax.
Bridge attempts to make as few assumptions as possible, however in some cases where 1-to-1 mappings don't exist, some assumptions are necessary. In particular:
cv::bridge::Bridge::Bridge | ( | ) |
|
virtual |
cv::bridge::Bridge::Bridge | ( | const matlab::MxArray & | obj | ) |
cv::bridge::Bridge::Bridge | ( | const mxArray * | obj | ) |
bool cv::bridge::Bridge::empty | ( | ) | const |
|
static |
Object* cv::bridge::Bridge::getObjectByName | ( | const std::string & | name | ) |
unpack an object from Matlab into C++
this function checks whether the given bridge is derived from an object in Matlab. If so, it converts it to a (platform dependent) pointer to the underlying C++ object.
NOTE! This function assumes that the C++ pointer is stored in inst_
cv::bridge::Bridge::operator bool | ( | ) |
cv::bridge::Bridge::operator cv::Mat | ( | ) | const |
cv::bridge::Bridge::operator cv::Moments | ( | ) | const |
cv::bridge::Bridge::operator cv::Point | ( | ) | const |
cv::bridge::Bridge::operator cv::Point2d | ( | ) | const |
cv::bridge::Bridge::operator cv::Point2f | ( | ) | const |
cv::bridge::Bridge::operator cv::Rect | ( | ) |
cv::bridge::Bridge::operator cv::RNG | ( | ) |
cv::bridge::Bridge::operator cv::RotatedRect | ( | ) |
cv::bridge::Bridge::operator cv::Scalar | ( | ) |
cv::bridge::Bridge::operator cv::Size | ( | ) | const |
cv::bridge::Bridge::operator cv::TermCriteria | ( | ) |
cv::bridge::Bridge::operator double | ( | ) |
cv::bridge::Bridge::operator float | ( | ) |
cv::bridge::Bridge::operator Ptr_AlignMTB | ( | ) |
cv::bridge::Bridge::operator Ptr_CalibrateDebevec | ( | ) |
cv::bridge::Bridge::operator Ptr_CalibrateRobertson | ( | ) |
cv::bridge::Bridge::operator Ptr_CLAHE | ( | ) |
cv::bridge::Bridge::operator Ptr_DenseOpticalFlow | ( | ) |
cv::bridge::Bridge::operator Ptr_DualTVL1OpticalFlow | ( | ) |
cv::bridge::Bridge::operator Ptr_FeatureDetector | ( | ) |
cv::bridge::Bridge::operator Ptr_LineSegmentDetector | ( | ) |
cv::bridge::Bridge::operator Ptr_MergeDebevec | ( | ) |
cv::bridge::Bridge::operator Ptr_MergeMertens | ( | ) |
cv::bridge::Bridge::operator Ptr_MergeRobertson | ( | ) |
cv::bridge::Bridge::operator Ptr_StereoBM | ( | ) |
cv::bridge::Bridge::operator Ptr_StereoSGBM | ( | ) |
cv::bridge::Bridge::operator Ptr_Stitcher | ( | ) |
cv::bridge::Bridge::operator Ptr_Tonemap | ( | ) |
cv::bridge::Bridge::operator Ptr_TonemapDrago | ( | ) |
cv::bridge::Bridge::operator Ptr_TonemapDurand | ( | ) |
cv::bridge::Bridge::operator Ptr_TonemapMantiuk | ( | ) |
cv::bridge::Bridge::operator Ptr_TonemapReinhard | ( | ) |
cv::bridge::Bridge::operator size_t | ( | ) |
cv::bridge::Bridge::operator std::string | ( | ) |
cv::bridge::Bridge::operator vector_float | ( | ) |
cv::bridge::Bridge::operator vector_int | ( | ) |
cv::bridge::Bridge::operator vector_KeyPoint | ( | ) |
cv::bridge::Bridge::operator vector_Mat | ( | ) |
cv::bridge::Bridge::operator vector_Point | ( | ) |
cv::bridge::Bridge::operator vector_Rect | ( | ) |
cv::bridge::Bridge::operator vector_String | ( | ) |
cv::bridge::Bridge::operator vector_uchar | ( | ) |
cv::bridge::Bridge::operator vector_vector_char | ( | ) |
cv::bridge::Bridge::operator vector_vector_DMatch | ( | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const mxArray * | obj | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const matlab::MxArray & | obj | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const std::string & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const bool & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const double & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const float & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const int & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const cv::Point2f & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const cv::Point2d & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const cv::Moments & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const cv::Scalar & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const cv::RotatedRect & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const cv::TermCriteria & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const vector_Mat & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const vector_int & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const vector_float & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const vector_Rect & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const vector_KeyPoint & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const vector_String & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const vector_Point & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const vector_uchar & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const vector_vector_char & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const vector_vector_DMatch & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const Ptr_StereoBM & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const Ptr_StereoSGBM & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const Ptr_FeatureDetector & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const Ptr_LineSegmentDetector & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const Ptr_AlignMTB & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const Ptr_CalibrateDebevec & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const Ptr_CalibrateRobertson & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const Ptr_DenseOpticalFlow & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const Ptr_DualTVL1OpticalFlow & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const Ptr_MergeDebevec & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const Ptr_MergeMertens & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const Ptr_MergeRobertson & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const Ptr_Stitcher & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const Ptr_Tonemap & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const Ptr_TonemapDrago & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const Ptr_TonemapDurand & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const Ptr_TonemapMantiuk & | ) |
Bridge& cv::bridge::Bridge::operator= | ( | const Ptr_TonemapReinhard & | ) |
bool cv::bridge::Bridge::toBool | ( | ) |
double cv::bridge::Bridge::toDouble | ( | ) |
float cv::bridge::Bridge::toFloat | ( | ) |
int cv::bridge::Bridge::toInt | ( | ) |
cv::Mat cv::bridge::Bridge::toMat | ( | ) | const |
cv::Moments cv::bridge::Bridge::toMoments | ( | ) | const |
matlab::MxArray cv::bridge::Bridge::toMxArray | ( | ) |
cv::Point cv::bridge::Bridge::toPoint | ( | ) | const |
cv::Point2d cv::bridge::Bridge::toPoint2d | ( | ) | const |
cv::Point2f cv::bridge::Bridge::toPoint2f | ( | ) | const |
Ptr_AlignMTB cv::bridge::Bridge::toPtrAlignMTB | ( | ) |
Ptr_CalibrateDebevec cv::bridge::Bridge::toPtrCalibrateDebevec | ( | ) |
Ptr_CalibrateRobertson cv::bridge::Bridge::toPtrCalibrateRobertson | ( | ) |
Ptr_CLAHE cv::bridge::Bridge::toPtrCLAHE | ( | ) |
Ptr_DenseOpticalFlow cv::bridge::Bridge::toPtrDenseOpticalFlow | ( | ) |
Ptr_DualTVL1OpticalFlow cv::bridge::Bridge::toPtrDualTVL1OpticalFlow | ( | ) |
Ptr_FeatureDetector cv::bridge::Bridge::toPtrFeatureDetector | ( | ) |
Ptr_LineSegmentDetector cv::bridge::Bridge::toPtrLineSegmentDetector | ( | ) |
Ptr_MergeDebevec cv::bridge::Bridge::toPtrMergeDebevec | ( | ) |
Ptr_MergeMertens cv::bridge::Bridge::toPtrMergeMertens | ( | ) |
Ptr_MergeRobertson cv::bridge::Bridge::toPtrMergeRobertson | ( | ) |
Ptr_StereoBM cv::bridge::Bridge::toPtrStereoBM | ( | ) |
Ptr_StereoSGBM cv::bridge::Bridge::toPtrStereoSGBM | ( | ) |
Ptr_Stitcher cv::bridge::Bridge::toPtrStitcher | ( | ) |
Ptr_Tonemap cv::bridge::Bridge::toPtrTonemap | ( | ) |
Ptr_TonemapDrago cv::bridge::Bridge::toPtrTonemapDrago | ( | ) |
Ptr_TonemapDurand cv::bridge::Bridge::toPtrTonemapDurand | ( | ) |
Ptr_TonemapMantiuk cv::bridge::Bridge::toPtrTonemapMantiuk | ( | ) |
Ptr_TonemapReinhard cv::bridge::Bridge::toPtrTonemapReinhard | ( | ) |
cv::Rect cv::bridge::Bridge::toRect | ( | ) |
cv::RNG cv::bridge::Bridge::toRNG | ( | ) |
cv::RotatedRect cv::bridge::Bridge::toRotatedRect | ( | ) |
cv::Scalar cv::bridge::Bridge::toScalar | ( | ) |
cv::Size cv::bridge::Bridge::toSize | ( | ) | const |
size_t cv::bridge::Bridge::toSizeT | ( | ) |
std::string cv::bridge::Bridge::toString | ( | ) |
cv::TermCriteria cv::bridge::Bridge::toTermCriteria | ( | ) |
vector_float cv::bridge::Bridge::toVectorFloat | ( | ) |
vector_int cv::bridge::Bridge::toVectorInt | ( | ) |
vector_KeyPoint cv::bridge::Bridge::toVectorKeyPoint | ( | ) |
vector_Mat cv::bridge::Bridge::toVectorMat | ( | ) |
vector_Point cv::bridge::Bridge::toVectorPoint | ( | ) |
vector_Rect cv::bridge::Bridge::toVectorRect | ( | ) |
vector_String cv::bridge::Bridge::toVectorString | ( | ) |
vector_uchar cv::bridge::Bridge::toVectorUchar | ( | ) |
vector_vector_char cv::bridge::Bridge::toVectorVectorChar | ( | ) |
vector_vector_DMatch cv::bridge::Bridge::toVectorVectorDMatch | ( | ) |