mexopencv  3.4.1
MEX interface for OpenCV library
dictionaryDump.cpp
Go to the documentation of this file.
1 
8 #include "mexopencv.hpp"
9 #include "mexopencv_aruco.hpp"
10 #include "opencv2/aruco.hpp"
11 using namespace std;
12 using namespace cv;
13 using namespace cv::aruco;
14 
22 void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
23 {
24  // Check the number of arguments
25  nargchk(nrhs==1 && nlhs<=1);
26 
27  // Argument vector
28  vector<MxArray> rhs(prhs, prhs+nrhs);
29 
30  // Process
31  Ptr<Dictionary> dictionary = MxArrayToDictionary(rhs[0]);
32  plhs[0] = toStruct(dictionary);
33 }
STL namespace.
struct mxArray_tag mxArray
Forward declaration for mxArray.
Definition: matrix.h:259
MxArray toStruct(const std::vector< cv::ml::DTrees::Node > &nodes)
Convert tree nodes to struct array.
Common definitions for the aruco module.
cv::Ptr< cv::aruco::Dictionary > MxArrayToDictionary(const MxArray &arr)
Convert MxArray to cv::Ptr<cv::aruco::Dictionary>
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Main entry called from Matlab.
void nargchk(bool cond)
Alias for input/output arguments number check.
Definition: mexopencv.hpp:181
STL class.
Global constant definitions.