public class HistogramVideoShotDetector extends VideoShotDetector<MBFImage>
Only the last keyframe is stored during processing, so if you want to store a list of keyframes you must store this list yourself by listening to the ShotDetected event which provides a VideoKeyframe which has a timecode and an image. Each event will receive the same VideoKeyframe instance containing different information. USe VideoKeyframe#clone() to make a copy.
lastFrameWasBoundary, threshold
Constructor and Description |
---|
HistogramVideoShotDetector()
If you use this constructor, your timecodes will be messed up
unless you call
VideoShotDetector.setFPS(double) before you process
any frames. |
HistogramVideoShotDetector(double fps)
Constructor that takes the frame rate of the source material.
|
HistogramVideoShotDetector(Video<MBFImage> video)
Default constructor takes the video to process.
|
HistogramVideoShotDetector(Video<MBFImage> video,
boolean display)
Constructor that determines whether to display the processing.
|
Modifier and Type | Method and Description |
---|---|
protected double |
getInterframeDistance(MBFImage frame)
Checks whether a shot boundary occurred between the given frame
and the previous frame, and if so, it will add a shot boundary
to the shot boundary list.
|
addShotDetectedListener, afterUpdate, beforeUpdate, fireDifferentialCalculated, fireShotDetected, getDifferentials, getLastKeyframe, getLastShotBoundary, getShotBoundaries, getThreshold, process, processFrame, removeShotDetectedListener, reset, setFindKeyframes, setFPS, setStoreAllDifferentials, setThreshold, wasLastFrameBoundary
countFrames, getCurrentFrame, getFPS, getHeight, getNextFrame, getTimeStamp, getWidth, hasNextFrame, process, processingComplete
close, getCurrentFrameIndex, iterator, seek, setCurrentFrameIndex
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public HistogramVideoShotDetector()
VideoShotDetector.setFPS(double)
before you process
any frames.public HistogramVideoShotDetector(double fps)
fps
- The FPSpublic HistogramVideoShotDetector(Video<MBFImage> video)
video
- The videopublic HistogramVideoShotDetector(Video<MBFImage> video, boolean display)
video
- The videodisplay
- Whether to display the video while processingprotected double getInterframeDistance(MBFImage frame)
getInterframeDistance
in class VideoShotDetector<MBFImage>
frame
- The new frame to process.