diff options
Diffstat (limited to 'SD-VBS/common/toolbox/lagrcv/calcImgBlurMex.cc')
-rwxr-xr-x | SD-VBS/common/toolbox/lagrcv/calcImgBlurMex.cc | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/SD-VBS/common/toolbox/lagrcv/calcImgBlurMex.cc b/SD-VBS/common/toolbox/lagrcv/calcImgBlurMex.cc new file mode 100755 index 0000000..5e2f1da --- /dev/null +++ b/SD-VBS/common/toolbox/lagrcv/calcImgBlurMex.cc | |||
@@ -0,0 +1,30 @@ | |||
1 | |||
2 | /* compile with | ||
3 | rm liblagrcv.a | ||
4 | gcc -c lagrcv.cpp | ||
5 | ar rc liblagrcv.a lagrcv.o | ||
6 | ranlib liblagrcv.a | ||
7 | mex7 calcTextureMex.cc -L/home/ikkjin/LagrMatlab/opencv/matlab -llagrcv -I/home/ikkjin/LagrMatlab/opencv/matlab/ | ||
8 | */ | ||
9 | |||
10 | #include "mex.h" | ||
11 | #include "lagrcv.h" | ||
12 | #include <stdio.h> | ||
13 | #include <math.h> | ||
14 | |||
15 | // TODO: add number of corners parameter | ||
16 | void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { | ||
17 | // usage: [IBlur] = | ||
18 | // calcImgBlurMex(image) | ||
19 | |||
20 | double *image, *retImg; | ||
21 | const int *imdims; | ||
22 | |||
23 | image=(double*)mxGetPr(prhs[0]); | ||
24 | imdims = mxGetDimensions(prhs[0]); | ||
25 | |||
26 | plhs[0] = mxCreateNumericMatrix(imdims[0], imdims[1], mxDOUBLE_CLASS, mxREAL); | ||
27 | retImg=(double*)mxGetPr(plhs[0]); | ||
28 | |||
29 | calcImgBlur(image, imdims[0], imdims[1], retImg); | ||
30 | } | ||