Package inputOutput

Class ImageWriter

java.lang.Object
inputOutput.ImageWriter

public class ImageWriter extends Object
saves the imported frames as Mat Objects (OpenCV). For the saving process the VideoWriter class from the OpenCV library is used.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    This method is for saving one single Image given as a parameter on the computer.
    void
    saveVideo(String path, int fps, int width, int height)
    This method needs a filename, frames-per-second and width and height of the matrix for creating an object of VideoWriter.
    void
    writeMat(org.opencv.core.Mat frameMatrix)
    This method is for saving the video by storing each Mat object that is received.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • ImageWriter

      public ImageWriter()
  • Method Details

    • saveVideo

      public void saveVideo(String path, int fps, int width, int height)
      This method needs a filename, frames-per-second and width and height of the matrix for creating an object of VideoWriter.
      Parameters:
      path -
      fps -
      width -
      height -
    • writeMat

      public void writeMat(org.opencv.core.Mat frameMatrix)
      This method is for saving the video by storing each Mat object that is received. It only works if saveVideo was called before for setting the parameters.
      Parameters:
      frameMatrix -
    • saveImage

      public void saveImage(BufferedImage bufImg, String path)
      This method is for saving one single Image given as a parameter on the computer. A destination path is also necessary here as a parameter.
      Parameters:
      bufImg -
      path -