public class XuggleVideoWriter extends VideoWriter<MBFImage>
frameRate, height, width
Constructor and Description |
---|
XuggleVideoWriter(String filename,
int width,
int height,
double frameRate)
Default constructor that takes the frame size and frame rate
of the resulting video.
|
Modifier and Type | Method and Description |
---|---|
void |
addFrame(MBFImage frame)
Add a frame to the video stream.
|
void |
close()
Close the video stream
|
static BufferedImage |
convertToType(BufferedImage sourceImage,
int targetType)
Convert a
BufferedImage of any type, to BufferedImage of
a specified type. |
void |
initialise()
Initialise the writer
|
void |
processingComplete()
A hook for subclasses to be called when processing for the video has
completed to clean up after themselves.
|
void |
reset()
No implementation.
|
getFPS, getTimeStamp, processFrame
countFrames, getCurrentFrame, getHeight, getNextFrame, getWidth, hasNextFrame, process, process
getCurrentFrameIndex, iterator, seek, setCurrentFrameIndex
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public XuggleVideoWriter(String filename, int width, int height, double frameRate)
filename
- The filename to write the video towidth
- The width of the video frame in pixelsheight
- The height of the video frame in pixelsframeRate
- The frame rate of the resulting videopublic void initialise()
public void processingComplete()
processingComplete
in class VideoProcessor<MBFImage>
VideoProcessor.processingComplete()
public void close()
public void addFrame(MBFImage frame)
addFrame
in class VideoWriter<MBFImage>
frame
- The frame to add to the video streamVideoWriter.addFrame(org.openimaj.image.Image)
public static BufferedImage convertToType(BufferedImage sourceImage, int targetType)
BufferedImage
of any type, to BufferedImage
of
a specified type. If the source image is the same type as the target
type, then original image is returned, otherwise new image of the correct
type is created and the content of the source image is copied into the
new image.sourceImage
- the image to be convertedtargetType
- the desired BufferedImage typepublic void reset()
VideoProcessor
reset
in class VideoProcessor<MBFImage>