I would like to display
I have found a direct way to convert a
Mat object to a JavaFX
MatOfByte byteMat = new MatOfByte(); Highgui.imencode(".bmp", mat, byteMat); return new Image(new ByteArrayInputStream(byteMat.toArray()));
You can also encode it to .jpg but .bmp is faster.