Display OpenCV Mat with JavaFX
问题 I would like to display Mat objects from OpenCV directly with JavaFX. I have seen that it is possible to convert a Mat object into a BufferedImage . But as far as I know you can't display a BufferedImage with JavaFX, so another conversion would have to take place. Is there a way to directly convert it into a data structure that is displayable by JavaFX? 回答1: I have found a direct way to convert a Mat object to a JavaFX Image object. MatOfByte byteMat = new MatOfByte(); Highgui.imencode(".bmp"