public class FaceShotTypeAnnotator extends VideoAnnotator<MBFImage,String>
CLMFaceTracker
)
to track the face in the frame and determine whether the face stays within
certain size boundaries to determine shot type.
The shot types detected are:
If the tracker loses track of any of the faces, then the face is removed from the set that is used to produce the annotations.
The cumulative moving average is used to store the size of each face during the tracking of the faces.
The CLMFaceTracker
is also able to provide pose information about
the subject. From this we are able to determine some extra annotations
about the subject - such as whether they appear to be talking to an off-screen
person (interviewee or interviewer), or talking to the camera (presenter
or anchor).
annotations
Constructor and Description |
---|
FaceShotTypeAnnotator()
Constructor
|
Modifier and Type | Method and Description |
---|---|
MBFImage |
displayAveragePoseImage(MBFImage frame)
Shows (and returns) an image containing the current average poses of all the
faces in the video shot so far.
|
MBFImage |
processFrame(MBFImage frame)
Process a frame in this video.
|
protected void |
resetAnnotator()
Reset the annotator.
|
protected void |
updateAnnotations()
Update the annotations list.
|
getAnnotations, reset
countFrames, getCurrentFrame, getFPS, getHeight, getNextFrame, getTimeStamp, getWidth, hasNextFrame, process, process, processingComplete
close, getCurrentFrameIndex, iterator, seek, setCurrentFrameIndex
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public FaceShotTypeAnnotator()
public MBFImage processFrame(MBFImage frame)
processFrame
in class VideoProcessor<MBFImage>
frame
- The frame to process.VideoProcessor.processFrame(org.openimaj.image.Image)
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
.updateAnnotations
in class VideoAnnotator<MBFImage,String>
VideoAnnotator.updateAnnotations()
public MBFImage displayAveragePoseImage(MBFImage frame)
frame
- (optional) Frame to place in the background of the visualisationprotected void resetAnnotator()
resetAnnotator
in class VideoAnnotator<MBFImage,String>
VideoAnnotator.resetAnnotator()