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


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.


videodata : ndarray

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

method : string

“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.

parameter1 : float

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

min_scene_length : int

Number used for determining minimum scene length.


sceneCuts : ndarray, shape (numScenes,)

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


[1]Kiyotaka Otsuji and Yoshinobu Tonomura. Projection-detecting filter for video cut detection. Multimedia Systems 1.5, 205-210, 1994.
[2]Kevin Mai, Ramin Zabih, and Justin Miller. Feature-based algorithms for detecting and classifying scene breaks. Cornell University, 1995.