public final class ImageConverter
extends java.lang.Object
Constructor and Description |
---|
ImageConverter() |
Modifier and Type | Method and Description |
---|---|
javafx.scene.image.Image |
convert(org.opencv.core.Mat mat)
Convert a BGR-formatted OpenCV
Mat into a JavaFX Image . |
public javafx.scene.image.Image convert(org.opencv.core.Mat mat)
Mat
into a JavaFX Image
. JavaFX understands ARGB
pixel data, so one way to turn a Mat into a JavaFX image is to shift around the bytes from the
Mat into an int array of pixels.mat
- An 8-bit OpenCV Mat containing an image with either 1 or 3 channels