kyamagu/mexopencv — pull request #100 by sapus (2014-02-20 17:25:31+00:00)
Title: struct mextypes and changes on constructor MxArray

I have added the struct mextypes. With this class is it easier to get the matlab id of an object with the type. I have Changed the constructor : MxArray::MxArray(const std::vector& v). I have tested it and it return the right values.
Test:

std::vector test(10);
test[0]=1;
test[1]=2;
test[2]=3;
test[3]=4;
test[4]=-5;
std::vector test2(10);
test[0]=1;
test[1]=2;
test[2]=3;
test[3]=4;
test[4]=-5;
plhs[0] = MxArray(test);
plhs[1] = MxArray(test);
The old function returned cells. This solution could be usefull for other thins and not just opencv.

I have moved the ClassIDOf and DepthOf maps to the header since I think they could be usefullt elsewhere. If you like this solution you should delete this maps from the cpp file ! I just wannted to pull request on this file.