How to map Java's List<Mat> to vector of vectors?

asked 2016-06-16 12:00:16 -0600

dharezlak gravatar image

The decode method of the contributed structured_light module uses an InputArrayOfArrays parameter which is mapped to a List<Mat> type in the Java wrapper. In the method the parameter is cast to a vector of verctors with the following line:

std::vector<std::vector<Mat> >& acquired_pattern = *( std::vector<std::vector<Mat> >* ) patternImages.getObj();

How should I properly construct Java's Mat object (being a single item in the list parameter) for the cast to work correctly? I suppose the intention is for the single Java's Mat instance to map to a single vector in C.

edit retag flag offensive close merge delete