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 ==
"feed") {
80 obj->
feed(corners, images, masks);
82 else if (method ==
"apply") {
84 int index = rhs[2].toInt();
85 Point corner(rhs[3].toPoint());
91 else if (method ==
"gains") {
96 "Method only supported for GainCompensator");
102 "Unrecognized operation %s", method.
c_str());
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.
std::vector< double > gains() const
cv::Ptr< cv::detail::ExposureCompensator > createExposureCompensator(const std::string &type, std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of ExposureCompensator using options in arguments.
struct mxArray_tag mxArray
Forward declaration for mxArray.
virtual void apply(int index, Point corner, InputOutputArray image, InputArray mask)=0
map< int, Ptr< ExposureCompensator > > obj_
Object container.
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Main entry called from Matlab.
Ptr< Y > dynamicCast() const
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.
void feed(const std::vector< Point > &corners, const std::vector< UMat > &images, const std::vector< UMat > &masks)
Global constant definitions.
int last_id
Last object id to allocate.