Package inputOutput

Class FilestreamSource


public class FilestreamSource extends AbstractImageSource
provides the footage from a file with these formats: mp4, avi, mkv, mov, 3GP, mpg, jpg and png
  • Constructor Details

    • FilestreamSource

      public FilestreamSource(String path)
      constructs a new FilestreamSource object with the transmitted path.
      Parameters:
      path - describes the path of the file
  • Method Details

    • openConnection

      public boolean openConnection()
      initializes a new VideoCapture object using the path. The video or image is opened.
      Specified by:
      openConnection in class AbstractImageSource
      Returns:
      whether the connection was successful or not
    • getNextMat

      public org.opencv.core.Mat getNextMat()
      Transmits the matrix of the picture
      Specified by:
      getNextMat in class AbstractImageSource
      Returns:
      frameMatrix
    • closeConnection

      public boolean closeConnection()
      sets isConnected = false
      Specified by:
      closeConnection in class AbstractImageSource
      Returns:
      isConnected = false
    • getTotalFrameNumber

      public int getTotalFrameNumber()
      returns the frame total number of the selected file.
      Returns:
      frameTotalNumber