Package inputOutput
Class ImageWriter
java.lang.Object
inputOutput.ImageWriter
saves the imported frames as Mat Objects (OpenCV). For the saving process the VideoWriter class from the OpenCV library is used.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
saveImage
(BufferedImage bufImg, String path) This method is for saving one single Image given as a parameter on the computer.void
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.
-
Field Details
-
path
-
-
Constructor Details
-
ImageWriter
public ImageWriter()
-
-
Method Details
-
saveVideo
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
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
-
-