Existing image data width, height, Imagedata, nChannels, Daniel, help!
CodePudding user response:
Mat YouImg (height, width, CV_8UC3, ImageData),
Or a for loop assignment
CodePudding user response:
Direct copy
Unsined char YourData (1024 * 800),
Mat yourMat (800102 4, CV_8UC1);
Memcpy (yourMat the data , YourData, 1024 * 800 * (unsined char));
CodePudding user response: