This project develops an algorithm to detect shot changes in three videos (news, climate, ngc) and assesses its performance. Notably, the climate and ngc videos involve gradual transitions.
- Grayscale Image
- Histogram (64-bin gray-level)
The following algorithm is designed to detect shot changes in the videos:
- Convert each frame to a grayscale image and compute its histogram.
- Calculate the Bhattacharyya distance between histograms of consecutive frames.
- Detect a shot change if the distance exceeds a threshold tb.
- Detect a shot change if cumulative distances between ts and tb exceed tb
- Clone or download this project.
- Install the required dependencies:
pip install -r requirements.txt
- Run the main script:
python main.py