Cut Aggregators

Aggregate frame level information to detect cuts.

The aggregator functions here take local information about frames and estimates where cuts in the video occur.

class dvt.aggregate.cut.CutAggregator(**kwargs)[source]

Bases: dvt.abstract.Aggregator

Uses difference between successive frames to detect cuts.

This aggregator uses information from the difference annotator to detect the cuts.

min_len

minimum allowed length of a cut.

Type:int
ignore_vals

Dictionary of cutoffs that cause a frame to be ignored for the purpose of detecting cuts. Keys indicate the variables in the differences output and values show the minimum value allowed for a frame to be considered for a cut. Typically used to ignore frames that are too dark (i.e., during fades). Set to None (default) if no ignored values are needed.

Type:dict
cut_vals

Dictionary of cutoffs that cause a frame to be considered a cut. Keys indicate the variables in the differences output and values are the cutoffs. Setting to None (default) will return no cuts.

Type:dict
name

A description of the aggregator. Used as a key in the output data.

Type:str
aggregate(ldframe, **kwargs)[source]

Aggregate difference annotator.

Parameters:ldframe (dict) – A dictionary of DictFrames from a FrameAnnotator. Must contain an entry with the key ‘diff’, which is used in the annotation.
Returns:A dictionary frame giving the detected cuts.
name = 'cut'