how can i convert datat to matrix ?

asked 2015-12-10 09:47:37 -0500

msucv gravatar image

updated 2015-12-10 09:48:20 -0500

Hi My data is actually a image. Here is stored.

char* img; int size;

how can i convert this img with size to matrix? thanks.

edit retag flag offensive close merge delete

Comments

take a look at http://answers.opencv.org/question/8202

if the given link has the answer of your question then you can delete this question.

sturkmen gravatar imagesturkmen ( 2015-12-10 11:39:41 -0500 )edit

To map an external buffer to a cv::Mat as suggested by @sturkmen you need of full size means you need to know rows and cols. Otherwise you can map the buffer as a col vector size x 1 or a row vector 1 x size

It's funny but this question is same of this other... are you same user too ?

pklab gravatar imagepklab ( 2015-12-12 12:39:49 -0500 )edit