Class OpenCVHelper


  • public class OpenCVHelper
    extends Object
    Helper methods for OpenCV.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    • Field Detail

      • m_Available

        protected static Boolean m_Available
        whether OpenCV is available.
    • Constructor Detail

      • OpenCVHelper

        public OpenCVHelper()
    • Method Detail

      • isAvailable

        public static boolean isAvailable()
        Checks whether OpenCV is available.
        Returns:
        true if available
      • toBufferedImage

        public static BufferedImage toBufferedImage​(org.bytedeco.opencv.opencv_core.Mat mat)
        Converts the Mat object into a BufferedImage one.
        Parameters:
        mat - the matrix to convert
        Returns:
        the generated image
      • toMat

        public static org.bytedeco.opencv.opencv_core.Mat toMat​(BufferedImage image)
        Converts the BufferedImage into a Mat object.
        Parameters:
        image - the image to convert
        Returns:
        the generated object