How can I convert a BufferedImage to a Mat in OpenCV?
BufferedImage
Mat
OpenCV
I\'m using the JAVA wrapper for OpenCV(not JavaCV
One simple way would be to create a new using
Mat newMat = Mat(rows, cols, type);
then get the pixel values from your BufferedImage and put into newMat using
newMat.put(row, col, pixel);