Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgbConvertMex change the 3rd dimesion from 3 to 48512332255694123 values #29

Open
HamzaKhribi opened this issue Jun 7, 2017 · 6 comments

Comments

@HamzaKhribi
Copy link

i'm having this error:

Error using convConst
A must be a 4x4 or bigger 2D or 3D float array.

while debugging the code i found out that I=160903 after calling rgbConvertMex become 160901277669775489321 and this is why Convcost show me this error.
how can i fix this error please

@DavidSongGitHub
Copy link

I got this error either.

@ChongYunPeng
Copy link

Same here.

@jmbuena
Copy link

jmbuena commented Feb 5, 2018

This problem is in recent version of Matlab. I managed to fix a similar problem but I don't remember the details. Is something related to the size of integers and matrix dimensions in the mex. The problem is in the types used (int instead of mwSize matlab defined type).

@jmbuena
Copy link

jmbuena commented Feb 5, 2018

Finally found the change I did:

171,172c171
<   const mwSize *dims; int nDims, n, d; void *I; void *J; int flag;
<   mwSize dims1[3];
---
>   const int *dims; int nDims, n, d, dims1[3]; void *I; void *J; int flag;
178c177
<   dims = (const mwSize*) mxGetDimensions(pr[0]); n=dims[0]*dims[1];
---
>   dims = (const int*) mxGetDimensions(pr[0]); n=dims[0]*dims[1];

Yo have to change other C/C++ files with the same idea. In my linux 64 bits the int is no longer valid in Matlab 2017b to represent a Matlab matrix and it should be changed by mwSize in several mex files in the toolbox.

@jmbuena
Copy link

jmbuena commented Mar 22, 2018

You can find the changes I did in order to fix this issue to my own version of the toolbox here (a lot of .cpp files need to be changed):

https://github.com/jmbuena/toolbox.badacost.public

In this version we have added the detection with our BAdaCost algorithm (Cost-sensitive multi-class Boosting) from our Pattern Recognition 2018 paper.

Hope it will be useful.

yakiro-nvg pushed a commit to yakiro-nvg/toolbox that referenced this issue Mar 29, 2018
@yakiro-nvg
Copy link

Thanks, jmbuena

PR without BAdaCost #38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants