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?
WritableImage
. Either by copying pixels from theMat
to theWritableImage
'sPixelWriter
, or by implementing aPixelReader
backed by theMat
, and use that for instantiating theWritableImage
directly. – Reis