// memory for HOG features int out[3]; out[0] = max(blocks[0]-2, 0); out[1] = max(blocks[1]-2, 0); out[2] = 27+4+1; mxArray *mxfeat = mxCreateNumericArray(3, out, mxDOUBLE_CLASS, mxREAL); double *feat = (double *)mxGetPr(mxfeat);
Matlab keeps reporting error:
>> compilecompiling features.ccBuilding with 'Microsoft Visual C++ 2015 Professional'.Error using mexfeatures.ccE:\...\HOG\ihog-master\internal\features.cc(47): error C2440: 'initializing': cannot convert from'const size_t *' to 'const int *'E:\...\HOG\ihog-master\internal\features.cc(47): note: Types pointed to are unrelated; conversionrequires reinterpret_cast, C-style cast or function-style castE:\...\HOG\ihog-master\internal\features.cc(67): error C2664: 'mxArray*mxCreateNumericArray_730(std::size_t,const size_t *,mxClassID,mxComplexity)': cannot convert argument 2 from 'int [3]' to 'constsize_t *'E:\...\HOG\ihog-master\internal\features.cc(67): note: Types pointed to are unrelated; conversionrequires reinterpret_cast, C-style cast or function-style castError in compile (line 5) mex -O internal/features.cc -output internal/features
>> compilecompiling features.ccBuilding with 'Microsoft Visual C++ 2015 Professional'.Error using mexfeatures.ccE:\...\HOG\ihog-master\internal\features.cc(47): error C2440: 'initializing': cannot convert from'const size_t *' to 'const int *'E:\...\HOG\ihog-master\internal\features.cc(47): note: Types pointed to are unrelated; conversionrequires reinterpret_cast, C-style cast or function-style castError in compile (line 5) mex -O internal/features.cc -output internal/features>>
I have tried every means to change the type, but with no luck. Could you please give me some help to work around this? Thanks a lot!
Best Answer