OpenCv create 3 channel Mat from continuous data array
问题 I'd like to create an OpenCV 3-channel Mat using data allocated elsewhere where the pixels of each channel are together, unlike the data for an OpenCV Mat where the data from different channels is interleaved. Mat outputMat = Mat(dimY, dimX, CV_8UC3, rawData); // This works only if rawData interleaves channel data like an OpenCv Mat Is there a way to create an OpenCV Mat without having to resort to the below solution of splitting channels from a temporary Mat and copying the right channel