Package algorithm

Class ImageDataProcessor

java.lang.Object
algorithm.ImageDataProcessor

public class ImageDataProcessor extends Object
ImageDataProcessor accesses AbstractImageSource to control the connection and read images.
  • Constructor Details

    • ImageDataProcessor

      public ImageDataProcessor()
  • Method Details

    • setTopCrop

      public void setTopCrop(int topCrop)
    • setBottomCrop

      public void setBottomCrop(int bottomCrop)
    • setLeftCrop

      public void setLeftCrop(int leftCrop)
    • setRightCrop

      public void setRightCrop(int rightCrop)
    • setFilePath

      public void setFilePath(String filePath)
    • getFilePath

      public String getFilePath()
    • isConnected

      public boolean isConnected()
    • Mat2BufferedImage

      public static BufferedImage Mat2BufferedImage(org.opencv.core.Mat matrix)
    • Mat2Image

      public static javafx.scene.image.Image Mat2Image(org.opencv.core.Mat matrix, String extension)
    • readImg

      public javafx.scene.image.Image readImg()
      Reads an image from video source and crops it. The matrix is then converted to a JavaFx image
      Returns:
      Image
    • readMat

      public org.opencv.core.Mat readMat()
    • openConnection

      public boolean openConnection(VideoSource source)
    • openConnection

      public boolean openConnection(VideoSource source, int deviceId)
      Sets the type of image source depending on parameters source and deviceId and prepares the connection.
      Parameters:
      source - Input device
      deviceId - ID of the device (default: 0)
    • closeConnection

      public boolean closeConnection()