This project analyzes video frame differences to detect potential tampering, such as duplicate or frozen frames. Using OpenCV and NumPy, the script compares a tampered video with a real video and visualizes the results.
The script uses frame difference analysis:
- Convert each video frame to grayscale to simplify processing.
- Calculate the absolute difference between consecutive frames.
- Count the number of non-zero pixels in the difference to measure changes.
- Flag frames with minimal changes (below a threshold) as potential duplicates or frozen frames.
This approach highlights anomalies that may indicate video tampering.
- Python 3.x
- Required Libraries:
- OpenCV (
cv2
) - NumPy (
numpy
) - Matplotlib (
matplotlib
)
- OpenCV (
Install dependencies using:
pip install opencv-python-headless numpy matplotlib