38 int id = rhs[0].toInt();
39 string method(rhs[1].toString());
42 if (method ==
"new") {
45 rhs[2].toString(), rhs.
begin() + 3, rhs.
end());
55 if (method ==
"delete") {
60 else if (method ==
"typeid") {
62 plhs[0] =
MxArray(
string(
typeid(*obj).name()));
64 else if (method ==
"collectGarbage") {
75 else if (method ==
"find") {
76 nargchk((nrhs==3 || nrhs==4) && nlhs<=1);
81 obj->operator()(image, features, rois);
84 obj->operator()(image, features);
87 else if (method ==
"findParallel") {
88 nargchk((nrhs==3 || nrhs==4) && nlhs<=1);
95 &MxArray::toVector<Rect>)));
96 obj->operator()(images, features, rois);
99 obj->operator()(images, features);
104 "Unrecognized operation %s", method.
c_str());
cv::Ptr< cv::detail::FeaturesFinder > createFeaturesFinder(const std::string &type, std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of FeaturesFinder using options in arguments.
Common definitions for the stitching module.
LIBMWMEX_API_EXTERN_C void mexLock(void)
Lock a MEX-function so that it cannot be cleared from memory.
virtual void collectGarbage()
map< int, Ptr< FeaturesFinder > > obj_
Object container.
struct mxArray_tag mxArray
Forward declaration for mxArray.
MxArray toStruct(const std::vector< cv::ml::DTrees::Node > &nodes)
Convert tree nodes to struct array.
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Main entry called from Matlab.
LIBMWMEX_API_EXTERN_C void mexErrMsgIdAndTxt(const char *identifier, const char *err_msg,...)
Issue formatted error message with corresponding error identifier and return to MATLAB prompt...
LIBMWMEX_API_EXTERN_C void mexUnlock(void)
Unlock a locked MEX-function so that it can be cleared from memory.
mxArray object wrapper for data conversion and manipulation.
void nargchk(bool cond)
Alias for input/output arguments number check.
Global constant definitions.
int last_id
Last object id to allocate.