Hello
I have function foo accessed via mex interface and when I try to pass matrix to foo function through octave, I get following error:
error: can't perform indexing operations for <unknown type> type
Any idea why I would be getting this error?
In octave script:
template = rand(templateSize); % template with random entries
img = rand(imgHeight, imgWidth); % image
res = foo(template, img, 'same'); %Error happens here
Description of foo function:
% FOO
% RESULT = foo(TEMPLATE, IMAGE, SHAPE)
%
% TEMPLATE - type double, size <= size of image
% IMAGE - type double
% SHAPE - one of: 'valid', 'same', 'full'.
%
% RESULT - type double, values in [-1,1]. size depends on SHAPE
Function foo is implemented in foo.cpp file under mex interface function:
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Thanks for any help.
--
Vikram