Ask Your Question

Revision history [back]

The easiest way is to use the constructor that take a pointer to data to initialize a mat.

cv::Mat myImg = cv::Mat( ROWS, COLS, CV_16UC3, ptrToVuforia );

Where ROWS and COLS are the height and width of your image respectively, and ptrToVuforia the pointer of data (aka pixels) from Vuforia. I assume here, that your image is in color (C3) and short is 16 bits, adapt if needed.