Open purva98 opened 6 years ago
I got exactly same error here, is there any solutions?
Me too...
Hi,
I don't know exactly about your errors, but it seems the same error we fixed with: Push Request: #38.
This errors are related to a recent change in Matlab in the mex types (Matlab 2017?). In the P. Dollar code they are hardcoded to C++ types. In my fix I changed this types to Matlab C++ types, and then everything works.
On the other hand, I don't know exactly if in your case it would be fixed with the Push Request, but I bet if not, the fix would be similar.
I am not able to resolve this issue. If I just pull the code and try to run the mex commands, I get the following error:
mex private/edgesDetectMex.cpp -outdir private CXXFLAGS="\$CXXFLAGS -fopenmp" LDFLAGS="\$LDFLAGS -fopenmp" Building with 'g++'. Error using mex edges/private/edgesDetectMex.cpp: In function ‘void mexFunction(int, mxArray, int, const mxArray)’: edges/private/edgesDetectMex.cpp:99:63: error: cannot convert ‘const int’ to ‘const size_t {aka const long unsigned int}’ for argument ‘2’ to ‘mxArray mxCreateNumericArray(size_t, const size_t, mxClassID, mxComplexity)’ pl[0] = mxCreateNumericArray(3,outDims,mxSINGLE_CLASS,mxREAL); ^ edges/private/edgesDetectMex.cpp:101:63: error: cannot convert ‘const int’ to ‘const size_t {aka const long unsigned int}’ for argument ‘2’ to ‘mxArray mxCreateNumericArray(size_t, const size_t, mxClassID, mxComplexity)’ pl[1] = mxCreateNumericArray(3,indDims,mxUINT32_CLASS,mxREAL); ^ edges/private/edgesDetectMex.cpp:103:71: error: cannot convert ‘const int’ to ‘const size_t {aka const long unsigned int}’ for argument ‘2’ to ‘mxArray mxCreateNumericArray(size_t, const size_t*, mxClassID, mxComplexity)’ if(nl>2) pl[2] = mxCreateNumericArray(5,segDims,mxUINT8_CLASS,mxREAL); ^
If I change the types from const int to const size_t or const mwSize, then the mex code compiles successfully with some warnings.
But then when I try to use the edgeBoxes(img, model, opts) function, I get the same error as mentioned in the issue.
Error using imPadMex Requested 137438953888x512x7598263500303858035 (17179869184.0GB) array exceeds maximum array size
If anyone found a solution to this then please share. I am not sure if this is a version compatibility issue, I am using a 64-bit Linux machine with Matlab2017b.
I have the same error with Matlab2017b on 64-bit Linux machine.
this error is caused by mwSize
type. mwSize
is equivalent to int
in C when <= matlab2016b.
However, from matlab2017b, mwSize
is equivalent to size_t
. On 64bit system, int
is 32bit, and size_t
is 64bit.
Error using imPadMex Requested 137438953888x512x7598263500303858035 (17179869184.0GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information.
Error in imPad (line 39) J = imPadMex( I, pad, type );
Error in edgesDetect (line 52) I = imPad(I,p,'symmetric');
Error in edgesDemo (line 25) tic, E=edgesDetect(I,model); toc