golib
0.5
|
goMatlab offers an interface to the matlab engine and some convenience functions to get and put golib object from and to the matlab engine. It is in the separate library Gomatlab
, which can be built optionally. Also available are a few mex
modules for some tasks. The only interesting will probably be the video4linux interfaces.
More...
Files | |
file | matlab/mex/videocapture/videocapture.cpp |
file | videocaptureclose.cpp |
file | videocaptureopen.cpp |
Classes | |
class | goMatlab |
Matlab interface. More... | |
class | goMatlabPrivate |
Functions | |
bool | goMatlab::putString (const goString &, const char *name) |
Put a string to the matlab engine. More... | |
bool | goMatlab::getString (goString &str, const char *name) |
Get a string variable from matlab. More... | |
bool | goMatlab::putRGBImage (const goSignal3DBase< void > *sig, const char *name) |
Puts a multichannel signal as RGB image to matlab. More... | |
bool | goMatlab::putSignal (const goSignal3DBase< void > *sig, const char *name) |
Put a single channel of sig as matrix to matlab. More... | |
bool | goMatlab::getSignal (goSignal3D< void > *sig, const char *name) |
Get a matlab matrix as goSignal3D. More... | |
bool | goMatlab::putArray (const goDouble *p, goSize_t length, const char *name) |
Put a C array to matlab. More... | |
bool | goMatlab::putArray (const goArray< goDouble > *array, const char *name) |
Put a resizable array to matlab. More... | |
bool | goMatlab::getArray (goArray< goDouble > *array, const char *name) |
Get array from matlab. More... | |
bool | goMatlab::putVector (const goMath::Vectord *vec, const char *name) |
Put a goVector to matlab. More... | |
bool | goMatlab::putVector (const goMath::Vectorf *vec, const char *name) |
Put a goVector to matlab. More... | |
bool | goMatlab::getVector (goMath::Vectord *vec, const char *name) |
Get a vector from matlab into a goVector. More... | |
bool | goMatlab::getVector (goMath::Vectorf *vec, const char *name) |
Get a vector from matlab into a goVector. More... | |
bool | goMatlab::putDouble (goDouble d, const char *name) |
Put a double value to matlab. More... | |
bool | goMatlab::getDouble (goDouble &d, const char *name) |
Get a double from matlab. More... | |
bool | goMatlab::putSparse (goSparseMatrix *sm, const char *name) |
Put a sparse matrix stored in a goSparseMatrix. More... | |
bool | goMatlab::put2DPoints (const goList< goMath::Vectorf > &l, const char *variableName) |
Put 2d points from list to matlab matrix. More... | |
bool | goMatlab::put2DPoints (const goList< goMath::Vectord > &l, const char *variableName) |
Put 2d points from list to matlab matrix. More... | |
bool | goMatlab::get2DPoints (goList< goMath::Vectorf > &l, const char *variableName) |
Get a matrix of 2d points from matlab into a list. More... | |
bool | goMatlab::get2DPoints (goList< goMath::Vectord > &l, const char *variableName) |
Get a matrix of 2d points from matlab into a list. More... | |
bool | goMatlab::put2DPoints (goList< goMath::Vectorf >::ConstElement *begin, goIndex_t size, const char *variableName) |
bool | goMatlab::put2DPoints (goList< goMath::Vectord >::ConstElement *begin, goIndex_t size, const char *variableName) |
bool | goMatlab::stopEngine () |
Stops the matlab engine. More... | |
Engine * | goMatlab::getEngine () |
Get the matlab engine structure. More... | |
const Engine * | goMatlab::getEngine () const |
Get the matlab engine structure. More... | |
bool | goMatlab::startEngine () |
Starts a new matlab engine. More... | |
bool | goMatlab::sparseToMatlabSparse (goSparseMatrix *sp, const char *name) |
bool | goMatlab::signalToVariable (const goSignal3DBase< void > *sig, const char *name) |
bool | goMatlab::arrayToVariable (const goArray< goDouble > *array, const char *name) |
bool | goMatlab::arrayToVariable (const goDouble *array, goSize_t length, const char *name) |
bool | goMatlab::doubleToVariable (goDouble d, const char *name) |
bool | goMatlab::variableToSignal (goSignal3D< void > *sig, const char *name) |
bool | goMatlab::variableToArray (goArray< goDouble > *vector, const char *name) |
bool | goMatlab::variableToDouble (goDouble &d, const char *name) |
bool | goMatlab::variableToSignal (goSignal3DBase< void > *sig, const char *name) |
mxArray * | goMatlab::matlabCreateSparse (int rows, int columns, int elements) |
mxArray * | goMatlab::matlabCreateMatrix (int rows, int columns) |
bool | goMatlab::copyToMatlab (const goSignal3DBase< void > *sig, mxArray *matrix) |
bool | goMatlab::copyToMatlab (const goArray< goDouble > *array, mxArray *matrix) |
bool | goMatlab::copyToMatlab (const goMath::Vectord *array, mxArray *matrix) |
bool | goMatlab::copyToMatlab (const goMath::Vectorf *array, mxArray *matrix) |
bool | goMatlab::copyToMatlab (const goDouble *array, goSize_t length, mxArray *matrix) |
bool | goMatlab::copyToMatlab (goSparseMatrix *sp, mxArray *matrix) |
bool | goMatlab::copyFromMatlab (mxArray *matrix, goSignal3DBase< void > *sig) |
bool | goMatlab::copyFromMatlab (mxArray *matrix, goArray< goDouble > *array) |
bool | goMatlab::copyFromMatlab (mxArray *matrix, goMath::Vectord *array) |
bool | goMatlab::copyFromMatlab (mxArray *matrix, goMath::Vectorf *array) |
bool | goMatlab::matlabCall (const char *command, goString *resultBuffer=0) |
Execute matlab command. More... | |
bool | goMatlab::call (const char *command, goString *resultBuffer=0) |
Synonym for matlabCall. More... | |
virtual bool | goMatlab::callObjectMethod (int methodID, goObjectMethodParameters *param=NULL) |
Call an object method by identifier. More... | |
goMatlab offers an interface to the matlab engine and some convenience functions to get and put golib object from and to the matlab engine. It is in the separate library Gomatlab
, which can be built optionally. Also available are a few mex
modules for some tasks. The only interesting will probably be the video4linux interfaces.
bool goMatlab::call | ( | const char * | command, |
goString * | resultBuffer = 0 |
||
) |
Synonym for matlabCall.
command | Command |
resultBuffer | Result buffer. |
|
virtual |
Call an object method by identifier.
See the file goobjectmessage.h for messages and add messages there if needed. External applications building on this class should use identifiers starting with GO_OBJECTMETHOD_USER.
methodID | ID of the method. See goobjectmethod.h |
param | Pointer to parameters for the method, if any. |
Reimplemented from goObjectBase.
bool goMatlab::get2DPoints | ( | goList< goMath::Vectord > & | l, |
const char * | variableName | ||
) |
Get a matrix of 2d points from matlab into a list.
Stores the points from a matrix that looks like described in the documentation of goMatlab::put2DPoints() into a list.
l | The list. |
variableName | The matlab variable name of the matrix containing the coordinates. |
bool goMatlab::get2DPoints | ( | goList< goMath::Vectorf > & | l, |
const char * | variableName | ||
) |
Get a matrix of 2d points from matlab into a list.
Stores the points from a matrix that looks like described in the documentation of goMatlab::put2DPoints() into a list.
l | The list. |
variableName | The matlab variable name of the matrix containing the coordinates. |
bool goMatlab::getArray | ( | goArray< goDouble > * | array, |
const char * | name | ||
) |
Get array from matlab.
array | Holds the array on successful return. |
name | Matlab variable name. |
bool goMatlab::getDouble | ( | goDouble & | d, |
const char * | name | ||
) |
Get a double from matlab.
d | Variable to hold the result. |
name | Matlab variable name. |
Engine * goMatlab::getEngine | ( | ) |
Get the matlab engine structure.
Engine
structure. const Engine * goMatlab::getEngine | ( | ) | const |
Get the matlab engine structure.
Engine
structure. bool goMatlab::getSignal | ( | goSignal3D< void > * | sig, |
const char * | name | ||
) |
Get a matlab matrix as goSignal3D.
sig | Pointer to a goSignal3D<void> that holds the data on successful return. If the size of sig does not match the matrix, or if its type is not GO_FLOAT, the type is set to GO_FLOAT and it is resized. |
name | Name of the matlab variable. |
bool goMatlab::getString | ( | goString & | str, |
const char * | name | ||
) |
Get a string variable from matlab.
str | Holds the string on successful return. |
name | Name of the matlab variable. |
bool goMatlab::getVector | ( | goMath::Vectord * | vec, |
const char * | name | ||
) |
bool goMatlab::getVector | ( | goMath::Vectorf * | vec, |
const char * | name | ||
) |
bool goMatlab::matlabCall | ( | const char * | command, |
goString * | resultBuffer = 0 |
||
) |
Execute matlab command.
command | Command string, any valid matlab script will do. |
resultBuffer | If not 0, will be filled with the string output of the call, up to the length of resultBuffer. If 0 (default), no output buffer is used. |
bool goMatlab::put2DPoints | ( | const goList< goMath::Vectord > & | l, |
const char * | variableName | ||
) |
Put 2d points from list to matlab matrix.
The x and y coordinates of the points are stored in a matlab matrix of size 2xN, where N is the number of points. The first row contains the x coordinates, the second row contains the y coordinates of the points.
l | List of points (only x and y coordinates are used). |
variableName | Name of matlab matrix. |
bool goMatlab::put2DPoints | ( | const goList< goMath::Vectorf > & | l, |
const char * | variableName | ||
) |
Put 2d points from list to matlab matrix.
The x and y coordinates of the points are stored in a matlab matrix of size 2xN, where N is the number of points. The first row contains the x coordinates, the second row contains the y coordinates of the points.
l | List of points (only x and y coordinates are used). |
variableName | Name of matlab matrix. |
bool goMatlab::putArray | ( | const goArray< goDouble > * | array, |
const char * | name | ||
) |
Put a resizable array to matlab.
array | Array to put. |
name | Matlab variable name. |
bool goMatlab::putArray | ( | const goDouble * | p, |
goSize_t | length, | ||
const char * | name | ||
) |
Put a C array to matlab.
p | Pointer to first element. |
length | Length of the array (number of elements). |
name | Matlab variable name. |
bool goMatlab::putDouble | ( | goDouble | d, |
const char * | name | ||
) |
Put a double value to matlab.
d | Value to put. |
name | Matlab variable name. |
bool goMatlab::putRGBImage | ( | const goSignal3DBase< void > * | sig, |
const char * | name | ||
) |
Puts a multichannel signal as RGB image to matlab.
The image created in matlab is of type mxUINT8_CLASS and has 3 channels (R,G,B). The data type of sig does not matter, the data is simply cast to goUInt8. No quantisation is done.
sig | goSignal3DBase to put into matlab (multi-channel) |
name | Name of the matlab variable. |
bool goMatlab::putSignal | ( | const goSignal3DBase< void > * | sig, |
const char * | name | ||
) |
Put a single channel of sig
as matrix to matlab.
sig | Signal to put to matlab. |
name | Variable name in matlab. |
bool goMatlab::putSparse | ( | goSparseMatrix * | sm, |
const char * | name | ||
) |
Put a sparse matrix stored in a goSparseMatrix.
goSparseMatrix objects can be used to assemble a sparse matrix quicker than in matlab itself. Its computational possibilities are limited.
sm | Sparse matrix to put. |
name | Matlab variable name. |
bool goMatlab::putString | ( | const goString & | str, |
const char * | name | ||
) |
Put a string to the matlab engine.
str | String to put. |
name | Name of the matlab variable. |
bool goMatlab::putVector | ( | const goMath::Vectord * | vec, |
const char * | name | ||
) |
Put a goVector to matlab.
vec | Vector to put. |
name | Matlab variable name. |
bool goMatlab::putVector | ( | const goMath::Vectorf * | vec, |
const char * | name | ||
) |
Put a goVector to matlab.
vec | Vector to put. |
name | Matlab variable name. |
bool goMatlab::startEngine | ( | ) |
Starts a new matlab engine.
bool goMatlab::stopEngine | ( | ) |
Stops the matlab engine.