API Reference >> skvideo.measure.scenedet
Fork me on GitHub

skvideo.measure.scenedet

skvideo.measure.scenedet(videodata, method='histogram', parameter1=None, min_scene_length=2)[source]

Scene detection algorithms

Given a sequence of frames, this function is able to run find the first index of new scenes.

Parameters:
videodatandarray

an input frame sequence, shape (T, M, N, C), (T, M, N), (M, N, C) or (M, N)

methodstring

“histogram” –> threshold-based (parameter1 defaults to 1.0) approach using intensity histogram differences. [1]

“edges” –> threshold-based (parameter1 defaults to 0.5) approach measuring the edge-change fraction after global motion compensation [2]

“intensity” –> Detects fast cuts using changes in colour and intensity between frames. Parameter1 is the threshold used for detection, which defaults to 30.0.

parameter1float

Number used as a tuning parameter. See method argument for details.

min_scene_lengthint

Number used for determining minimum scene length.

Returns:
sceneCutsndarray, shape (numScenes,)

The indices corresponding to the first frame in the detected scenes.

References