Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to extract 2D Mat from a 4D Mat

I have a Cv::Mat calle Prob

prob = deepLearningModel.forward();

This mat have 4 dimensions , and the size of each dimensions are tipically 1-1-nDetections-detectionsParameter

So I want is a 2D Mat based on the last dimensions , I mean nDetections*detectionsPameteter How can I achieve it??

Thanks.

click to hide/show revision 2
retagged

updated 2017-10-24 03:06:09 -0600

berak gravatar image

How to extract 2D Mat from a 4D Mat

I have a Cv::Mat calle Prob

prob = deepLearningModel.forward();

This mat have 4 dimensions , and the size of each dimensions are tipically 1-1-nDetections-detectionsParameter

So I want is a 2D Mat based on the last dimensions , I mean nDetections*detectionsPameteter How can I achieve it??

Thanks.