INPUT
- OUTPUT
- public abstract class VideoTranslator<INPUT extends Image<?,INPUT>,OUTPUT extends Image<?,OUTPUT>> extends Video<OUTPUT>
Constructor and Description |
---|
VideoTranslator(Video<INPUT> in)
Construct a new VideoTranslator that will translate the given input
video.
|
Modifier and Type | Method and Description |
---|---|
long |
countFrames()
Return the number of frames in the whole video.
|
OUTPUT |
getCurrentFrame()
Get the current frame
|
double |
getFPS()
Get the frame rate
|
int |
getHeight()
Get the height of the video frame.
|
OUTPUT |
getNextFrame()
Get the next frame.
|
long |
getTimeStamp()
Get the timestamp of the current frame in milliseconds
|
int |
getWidth()
Get the width of the video frame
|
boolean |
hasNextFrame()
Returns whether this video has another frame to provide.
|
void |
reset()
Reset the video - putting the frame counter back to the start.
|
abstract OUTPUT |
translateFrame(INPUT nextFrame)
Translate the given input frame to the appropriate output frame.
|
close, getCurrentFrameIndex, iterator, seek, setCurrentFrameIndex
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public VideoTranslator(Video<INPUT> in)
in
- The input video.public OUTPUT getCurrentFrame()
Video
getCurrentFrame
in class Video<OUTPUT extends Image<?,OUTPUT>>
public int getWidth()
Video
public int getHeight()
Video
public long getTimeStamp()
Video
getTimeStamp
in class Video<OUTPUT extends Image<?,OUTPUT>>
public boolean hasNextFrame()
Video
hasNextFrame
in class Video<OUTPUT extends Image<?,OUTPUT>>
public long countFrames()
Video
countFrames
in class Video<OUTPUT extends Image<?,OUTPUT>>
public void reset()
Video
public OUTPUT getNextFrame()
Video
getNextFrame
in class Video<OUTPUT extends Image<?,OUTPUT>>
public abstract OUTPUT translateFrame(INPUT nextFrame)
nextFrame
- The input frame.