T
- The image typeANNOTATION
- The annotation typepublic abstract class VideoAnnotator<T extends Image<?,T>,ANNOTATION> extends VideoProcessor<T>
VideoProcessor
that is able to also provide annotations for
the video it is processing. The type of the annotation that it provides is
given in the generic arguments of the class.
As a video is being processed, the annotator may be asked to reset itself -
to start the annotation process anew. The reset()
method should be
called to do this, which will in turn call the resetAnnotator()
method which may be overridden in subclass implementations.
Modifier and Type | Field and Description |
---|---|
protected Set<ANNOTATION> |
annotations
The list of annotations generates for this video since the last reset
|
Constructor and Description |
---|
VideoAnnotator() |
Modifier and Type | Method and Description |
---|---|
Set<ANNOTATION> |
getAnnotations()
Returns the list of annotations generated for this annotator.
|
void |
reset()
No implementation.
|
protected void |
resetAnnotator()
Reset the annotator.
|
protected void |
updateAnnotations()
Update the annotations list.
|
countFrames, getCurrentFrame, getFPS, getHeight, getNextFrame, getTimeStamp, getWidth, hasNextFrame, process, process, processFrame, processingComplete
close, getCurrentFrameIndex, iterator, seek, setCurrentFrameIndex
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
protected Set<ANNOTATION> annotations
public VideoAnnotator()
public final Set<ANNOTATION> getAnnotations()
protected void updateAnnotations()
annotations
member
is a Set
, so you should be able to add annotations without
being concerned about duplicates, as long as the ANNOTATION type
is Comparable
.protected void resetAnnotator()
public final void reset()
reset
in class VideoProcessor<T extends Image<?,T>>
VideoProcessor.reset()