First time here? Check out the FAQ!
answered 2017-09-27 09:38:40 -0600
you can use reshape for this:
img.convertTo(img, CvType.CV_32F); Mat samples = img.reshape(1, img.total()); // 1 channel, each pixel is a row of 3 elements now