Automated Detection and Removal of Corrupted Video Frames Using OpenCV and DBSCAN
Automated detection and removal of corrupted video frames using OpenCV, feature extraction (color histograms, SIFT, ORB), and DBSCAN clustering, followed by frame reordering and video reconstruction.

Context & Background
This project aimed to automatically detect, isolate, and remove corrupted or parasitic frames from a damaged video file. The approach combined computer vision feature extraction with unsupervised clustering to identify abnormal frames. Once detected, the corrupted frames were removed and the cleaned video was reconstructed in the correct frame order.
Challenge
Corrupted videos can contain visually distorted frames that break continuity and degrade quality. Manual inspection is inefficient, especially for long videos, and traditional methods fail to distinguish between natural content variation and actual corruption. The challenge was to design an automated solution capable of detecting and removing these anomalies while preserving valid frames and the correct playback sequence.
Solution
Frames were extracted from the video using OpenCV and analyzed with multiple feature extraction techniques. For each frame, color histograms for the blue, green, and red channels were computed, and additional descriptors were obtained with SIFT and ORB to capture texture and structural details. These feature vectors were combined and clustered with DBSCAN to separate normal frames from anomalies. Detected corrupted frames were removed, and the remaining frames were reordered using similarity matching before reconstructing the cleaned video.
Results & Impact
Appendix
Original Corrupted Video
Technologies Used
Project Details
Personal Project
1 week
1 person
Individual Project
Interested in Similar Work?
Let's discuss how I can help your team with data science and ML projects.
Get In Touch