mexopencv
3.4.1
MEX interface for OpenCV library
|
Go to the source code of this file.
Classes | |
struct | mexGlobalTableEntry_Tag |
struct | mexFunctionTableEntry_tag |
struct | _mexLocalFunctionTable |
struct | _mexInitTermTableEntry |
struct | _mex_information |
Macros | |
#define | mex_h |
#define | printf mexPrintf |
#define | __MEX_PUBLISHED_API_HPP__ |
#define | EXTERN_C extern |
#define | LIBMWMEX_API |
#define | LIBMWMEX_API_EXTERN_C EXTERN_C LIBMWMEX_API |
#define | MEXFUNCTION_LINKAGE EXTERN_C |
Remove usage of deprecated function mexGet and mexSet from MEX code and use mxGetProperty and mxSetProperty instead. Otherwise, define the macro | |
#define | mexCallMATLAB mexCallMATLABWithObject |
#define | mexCallMATLABWithTrap mexCallMATLABWithTrapWithObject |
#define | mexGetVariable mexGetVariableWithObject |
#define | mexGet(a, b) NULL;do{mexGetIsDeprecated x;}while(0) |
#define | mexSet(a, b, c) 0;do{mexSetIsDeprecated x;}while(0) |
Functions | |
MEXFUNCTION_LINKAGE void | mexFunction (int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) |
mexFunction is the user-defined C routine that is called upon invocation of a MEX-function. More... | |
LIBMWMEX_API_EXTERN_C void | mexErrMsgTxt (const char *error_msg) |
Issue error message and return to MATLAB prompt. More... | |
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. More... | |
LIBMWMEX_API_EXTERN_C void | mexWarnMsgTxt (const char *warn_msg) |
Invoke an unidentified warning. More... | |
LIBMWMEX_API_EXTERN_C void | mexWarnMsgIdAndTxt (const char *identifier, const char *warn_msg,...) |
Invoke a warning with message identifier 'identifier' and message derived from 'fmt' and subsequent arguments. More... | |
LIBMWMEX_API_EXTERN_C int | mexPrintf (const char *fmt,...) |
mex equivalent to MATLAB's "disp" function More... | |
LIBMWMEX_API_EXTERN_C void | mexMakeArrayPersistent (mxArray *pa) |
Remove all components of an array plus the array header itself from MATLAB's memory allocation list. More... | |
LIBMWMEX_API_EXTERN_C void | mexMakeMemoryPersistent (void *ptr) |
Remove memory previously allocated via mxCalloc from MATLAB's memory allocation list. More... | |
LIBMWMEX_API_EXTERN_C int | mexCallMATLAB (int nlhs, mxArray *plhs[], int nrhs, mxArray *prhs[], const char *fcn_name) |
call MATLAB function More... | |
LIBMWMEX_API_EXTERN_C int | mexCallMATLABWithObject (int nlhs, mxArray *plhs[], int nrhs, mxArray *prhs[], const char *fcn_name) |
Call MATLAB function. More... | |
LIBMWMEX_API_EXTERN_C mxArray * | mexCallMATLABWithTrap (int nlhs, mxArray *plhs[], int nrhs, mxArray *prhs[], const char *fcn_name) |
call MATLAB function with Trap More... | |
LIBMWMEX_API_EXTERN_C mxArray * | mexCallMATLABWithTrapWithObject (int nlhs, mxArray *plhs[], int nrhs, mxArray *prhs[], const char *fcn_name) |
call MATLAB function with trap More... | |
LIBMWMEX_API_EXTERN_C void | mexSetTrapFlag (int flag) |
set or clear mexCallMATLAB trap flag (if set then an error in mexCallMATLAB is caught and mexCallMATLAB will return a status value, if not set an error will cause control to revert to MATLAB) More... | |
LIBMWMEX_API_EXTERN_C void | mexPrintAssertion (const char *test, const char *fname, int linenum, const char *message) |
Print an assertion-style error message and return control to the MATLAB command line. More... | |
LIBMWMEX_API_EXTERN_C bool | mexIsGlobal (const mxArray *pa) |
This function is deprecated and always return false. More... | |
LIBMWMEX_API_EXTERN_C int | mexPutVariable (const char *workspace, const char *name, const mxArray *parray) |
Place a copy of the array value into the specified workspace with the specified name. More... | |
LIBMWMEX_API_EXTERN_C const mxArray * | mexGetVariablePtr (const char *workspace, const char *name) |
return a pointer to the array value with the specified variable name in the specified workspace More... | |
LIBMWMEX_API_EXTERN_C mxArray * | mexGetVariable (const char *workspace, const char *name) |
return a copy of the array value with the specified variable name in the specified workspace More... | |
LIBMWMEX_API_EXTERN_C void | mexLock (void) |
Lock a MEX-function so that it cannot be cleared from memory. More... | |
LIBMWMEX_API_EXTERN_C void | mexUnlock (void) |
Unlock a locked MEX-function so that it can be cleared from memory. More... | |
LIBMWMEX_API_EXTERN_C bool | mexIsLocked (void) |
Return true if the MEX-function is currently locked, false otherwise. More... | |
LIBMWMEX_API_EXTERN_C const char * | mexFunctionName (void) |
Return the name of a the MEXfunction currently executing. More... | |
LIBMWMEX_API_EXTERN_C int | mexEvalString (const char *str) |
Parse and execute MATLAB syntax in string. More... | |
LIBMWMEX_API_EXTERN_C mxArray * | mexEvalStringWithTrap (const char *str) |
Parse and execute MATLAB syntax in string. More... | |
LIBMWMEX_API_EXTERN_C int | mexAtExit (mex_exit_fn exit_fcn) |
Register Mex-file's At-Exit function (accessed via MEX callback) More... | |
#define | mex_typedefs_h |
#define | cicompare(s1, s2) strcmp((s1),(s2)) |
#define | cscompare(s1, s2) strcmp((s1),(s2)) |
#define | MEX_INFORMATION_VERSION 1 |
typedef struct impl_info_tag * | MEX_impl_info |
typedef void(* | mex_exit_fn) (void) |
typedef struct mexGlobalTableEntry_Tag | mexGlobalTableEntry |
typedef struct mexGlobalTableEntry_Tag * | mexGlobalTable |
typedef struct mexFunctionTableEntry_tag | mexFunctionTableEntry |
typedef struct mexFunctionTableEntry_tag * | mexFunctionTable |
typedef struct _mexLocalFunctionTable | _mexLocalFunctionTable |
typedef struct _mexLocalFunctionTable * | mexLocalFunctionTable |
typedef struct _mexInitTermTableEntry * | mexInitTermTableEntry |
typedef struct _mex_information * | mex_information |
typedef mex_information(* | fn_mex_file) (void) |
typedef void(* | fn_clean_up_after_error) (void) |
typedef const char *(* | fn_simple_function_to_string) (mxFunctionPtr f) |
typedef void(* | fn_mex_enter_mex_library) (mex_information x) |
typedef fn_mex_enter_mex_library | fn_mex_exit_mex_library |
typedef mexLocalFunctionTable(* | fn_mex_get_local_function_table) (void) |
typedef mexLocalFunctionTable(* | fn_mex_set_local_function_table) (mexLocalFunctionTable) |
PUBLISHed header for libmex, the mex library.
This header file "mex.h"
declares all the types, macros and functions necessary to interface mex files with the current version of MATLAB. See the release notes for information on supporting syntax from earlier versions.
Definition in file mex.h.
#define LIBMWMEX_API_EXTERN_C EXTERN_C LIBMWMEX_API |
#define mexCallMATLAB mexCallMATLABWithObject |
#define mexCallMATLABWithTrap mexCallMATLABWithTrapWithObject |
#define mexGet | ( | a, | |
b | |||
) | NULL;do{mexGetIsDeprecated x;}while(0) |
#define mexSet | ( | a, | |
b, | |||
c | |||
) | 0;do{mexSetIsDeprecated x;}while(0) |
typedef struct _mexLocalFunctionTable _mexLocalFunctionTable |
typedef void(* fn_mex_enter_mex_library) (mex_information x) |
typedef mex_information(* fn_mex_file) (void) |
typedef mexLocalFunctionTable(* fn_mex_get_local_function_table) (void) |
typedef mexLocalFunctionTable(* fn_mex_set_local_function_table) (mexLocalFunctionTable) |
typedef const char*(* fn_simple_function_to_string) (mxFunctionPtr f) |
typedef struct impl_info_tag* MEX_impl_info |
typedef struct _mex_information * mex_information |
typedef struct mexFunctionTableEntry_tag * mexFunctionTable |
typedef struct mexFunctionTableEntry_tag mexFunctionTableEntry |
typedef struct mexGlobalTableEntry_Tag * mexGlobalTable |
typedef struct mexGlobalTableEntry_Tag mexGlobalTableEntry |
typedef struct _mexInitTermTableEntry * mexInitTermTableEntry |
typedef struct _mexLocalFunctionTable * mexLocalFunctionTable |
LIBMWMEX_API_EXTERN_C int mexAtExit | ( | mex_exit_fn | exit_fcn | ) |
Register Mex-file's At-Exit function (accessed via MEX callback)
exit_fcn |
LIBMWMEX_API_EXTERN_C int mexCallMATLAB | ( | int | nlhs, |
mxArray * | plhs[], | ||
int | nrhs, | ||
mxArray * | prhs[], | ||
const char * | fcn_name | ||
) |
call MATLAB function
nlhs | number of expected outputs |
plhs | pointer array to outputs |
nrhs | number of inputs |
prhs | pointer array to inputs |
fcn_name | name of function to execute |
LIBMWMEX_API_EXTERN_C int mexCallMATLABWithObject | ( | int | nlhs, |
mxArray * | plhs[], | ||
int | nrhs, | ||
mxArray * | prhs[], | ||
const char * | fcn_name | ||
) |
Call MATLAB function.
nlhs | number of expected outputs |
plhs | pointer array to outputs |
nrhs | number of inputs |
prhs | pointer array to inputs |
fcn_name | name of function to execute |
LIBMWMEX_API_EXTERN_C mxArray* mexCallMATLABWithTrap | ( | int | nlhs, |
mxArray * | plhs[], | ||
int | nrhs, | ||
mxArray * | prhs[], | ||
const char * | fcn_name | ||
) |
call MATLAB function with Trap
nlhs | number of expected outputs |
plhs | pointer array to outputs |
nrhs | number of inputs |
prhs | pointer array to inputs |
fcn_name | name of function to execute |
LIBMWMEX_API_EXTERN_C mxArray* mexCallMATLABWithTrapWithObject | ( | int | nlhs, |
mxArray * | plhs[], | ||
int | nrhs, | ||
mxArray * | prhs[], | ||
const char * | fcn_name | ||
) |
call MATLAB function with trap
nlhs | number of expected outputs |
plhs | pointer array to outputs |
nrhs | number of inputs |
prhs | pointer array to inputs |
fcn_name | name of function to execute |
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.
identifier | string with error message identifier |
err_msg | string with error message printf-style format |
... | any additional arguments |
LIBMWMEX_API_EXTERN_C void mexErrMsgTxt | ( | const char * | error_msg | ) |
Issue error message and return to MATLAB prompt.
error_msg | string with error message |
LIBMWMEX_API_EXTERN_C int mexEvalString | ( | const char * | str | ) |
Parse and execute MATLAB syntax in string.
Returns zero if successful, and a non zero value if an error occurs.
str | matlab command string |
LIBMWMEX_API_EXTERN_C mxArray* mexEvalStringWithTrap | ( | const char * | str | ) |
Parse and execute MATLAB syntax in string.
Returns NULL if successful, and an MException if an error occurs.
str | matlab command string |
MEXFUNCTION_LINKAGE void mexFunction | ( | int | nlhs, |
mxArray * | plhs[], | ||
int | nrhs, | ||
const mxArray * | prhs[] | ||
) |
mexFunction
is the user-defined C routine that is called upon invocation of a MEX-function.
nlhs | number of expected outputs |
plhs | array of pointers to output arguments |
nrhs | number of inputs |
prhs | array of pointers to input arguments |
mexFunction
is the user-defined C routine that is called upon invocation of a MEX-function.
nlhs | number of left-hand-side arguments |
plhs | pointers to mxArrays in the left-hand-side |
nrhs | number of right-hand-side arguments |
prhs | pointers to mxArrays in the right-hand-side |
Definition at line 19 of file testMxArray1_.cpp.
LIBMWMEX_API_EXTERN_C const char* mexFunctionName | ( | void | ) |
Return the name of a the MEXfunction currently executing.
LIBMWMEX_API_EXTERN_C mxArray* mexGetVariable | ( | const char * | workspace, |
const char * | name | ||
) |
return a copy of the array value with the specified variable name in the specified workspace
workspace | |
name | name of variable in question |
LIBMWMEX_API_EXTERN_C const mxArray* mexGetVariablePtr | ( | const char * | workspace, |
const char * | name | ||
) |
return a pointer to the array value with the specified variable name in the specified workspace
workspace | |
name | name of symbol |
LIBMWMEX_API_EXTERN_C bool mexIsGlobal | ( | const mxArray * | pa | ) |
This function is deprecated and always return false.
pa |
LIBMWMEX_API_EXTERN_C bool mexIsLocked | ( | void | ) |
Return true if the MEX-function is currently locked, false otherwise.
LIBMWMEX_API_EXTERN_C void mexLock | ( | void | ) |
Lock a MEX-function so that it cannot be cleared from memory.
LIBMWMEX_API_EXTERN_C void mexMakeArrayPersistent | ( | mxArray * | pa | ) |
Remove all components of an array plus the array header itself from MATLAB's memory allocation list.
The array will now persist between calls to the mex function. To destroy this array, you will need to explicitly call mxDestroyArray.
pa | pointer to array |
LIBMWMEX_API_EXTERN_C void mexMakeMemoryPersistent | ( | void * | ptr | ) |
LIBMWMEX_API_EXTERN_C void mexPrintAssertion | ( | const char * | test, |
const char * | fname, | ||
int | linenum, | ||
const char * | message | ||
) |
Print an assertion-style error message and return control to the MATLAB command line.
test | |
fname | |
linenum | |
message |
LIBMWMEX_API_EXTERN_C int mexPrintf | ( | const char * | fmt, |
... | |||
) |
mex equivalent to MATLAB's "disp"
function
fmt | printf style format |
... | any additional arguments |
LIBMWMEX_API_EXTERN_C int mexPutVariable | ( | const char * | workspace, |
const char * | name, | ||
const mxArray * | parray | ||
) |
Place a copy of the array value into the specified workspace with the specified name.
workspace | |
name | |
parray | matrix to copy |
LIBMWMEX_API_EXTERN_C void mexSetTrapFlag | ( | int | flag | ) |
set or clear mexCallMATLAB trap flag (if set then an error in mexCallMATLAB is caught and mexCallMATLAB will return a status value, if not set an error will cause control to revert to MATLAB)
flag |
LIBMWMEX_API_EXTERN_C void mexUnlock | ( | void | ) |
Unlock a locked MEX-function so that it can be cleared from memory.
LIBMWMEX_API_EXTERN_C void mexWarnMsgIdAndTxt | ( | const char * | identifier, |
const char * | warn_msg, | ||
... | |||
) |
Invoke a warning with message identifier 'identifier'
and message derived from 'fmt'
and subsequent arguments.
The warning may either get printed as is (if it is set to 'on'
), or not actually get printed (if set to 'off'
). See 'help warning' in MATLAB for more details.
identifier | string with warning message identifer |
warn_msg | string with warning message printf-style format |
... | any additional arguments |
LIBMWMEX_API_EXTERN_C void mexWarnMsgTxt | ( | const char * | warn_msg | ) |
Invoke an unidentified warning.
Such warnings can only be affected by the M-code 'warning * all', since they have no specific identifier.
warn_msg | string with warning message |