Compiling using Matlab Compiler 2012a and MS Visual Studio 2010 on Windows 7 worked well for me with no modifications to the code. Successful registration of two 1000x783 pixel images achieved. Thanks for the useful program!
Compiling using Matlab Compiler 2012a and MS Visual Studio 2010 on Windows 7 worked well for me with no modifications to the code. Successful registration of two 1000x783 pixel images achieved. Thanks for the useful program!
Hi, All,
I had the same segment fault problem. But I found after did
the following it worked:
==================================
At the bottom of the file, in function void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { },
REMOVE this line:
pTranslate = (double *)mxGetPr(prhs[2]);
We ONLY have 2 input parameters. prhs is the array of pointers to the input mxArrays. The above line read the
third parameter and caused segment faults.
After remove the line, I compiled with Open Watcom 1.9
in Matlab Version 7.8.0.347(R2009a) 32-bit edition.
It worked nicely.
Jun
My way to fix this code:
1. when input image size<256, error occurs...
you can change 256 in the for loops to nX or nY
2. when image size is too small, registration accuracy gets worse..
when image size is too small. the 256-bin histogram gets less samples. We can use less intensity bins, say, change from uint8 (0-255) to(0-80).
Running Xp 32bit the mex files in the zip does not work (Segmentation violation detected) !
I tried to compile again the .cpp with "mex mi_hpv_2d.cpp" but it seems that lcc compiler is not able to compile it. Does someone already encountered this problem ? Is there any solution, installing visual c++ compiler ? other solutions ?
Thanks a lot !
Comment only