Class OpenCvUtil

java.lang.Object
com.serinity.accesscontrol.util.OpenCvUtil

public final class OpenCvUtil extends Object
Utility class providing OpenCV-to-JavaFX conversion helpers.

Bridges the gap between OpenCV's Mat image format and JavaFX's Image, enabling frames captured from the camera service to be displayed in the UI.

NOTE: This class is final and cannot be instantiated.

Since:
2026-02-27
Version:
1.0
Author:
@ZouariOmar (zouariomar20@gmail.com)
See Also:
  • Method Details

    • matToImage

      public static javafx.scene.image.Image matToImage(org.opencv.core.Mat frame)
      Converts an OpenCV Mat frame to a JavaFX Image by encoding it as PNG in memory.
      Parameters:
      frame - the OpenCV image matrix to convert
      Returns:
      a JavaFX Image ready for display