https://github.com/loopglitch26/flashdetect
Photosensitive Detection Algorithm Using Adaptive Thresholding and Contrast Analysis
https://github.com/loopglitch26/flashdetect
Last synced: about 1 year ago
JSON representation
Photosensitive Detection Algorithm Using Adaptive Thresholding and Contrast Analysis
- Host: GitHub
- URL: https://github.com/loopglitch26/flashdetect
- Owner: LoopGlitch26
- License: mit
- Created: 2023-03-14T12:51:15.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-15T12:17:51.000Z (over 3 years ago)
- Last Synced: 2025-07-06T10:04:10.285Z (about 1 year ago)
- Language: Jupyter Notebook
- Size: 72.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Project Title: Photosensitive Detection Algorithm Using Adaptive Thresholding and Contrast Analysis
Photosensitive epilepsy is a neurological disorder that affects a small percentage of the population. People with this disorder experience seizures triggered by visual stimuli such as flashing lights or contrasting light and dark patterns. To prevent triggering seizures, videos with photosensitive content should be identified and flagged. However, manually reviewing videos is time-consuming and costly. Therefore, an automated algorithm for detecting videos with photosensitive content is necessary.
The algorithm described is a photosensitive detection algorithm that analyzes a video for flashing lights or contrasting light and dark patterns. The algorithm uses OpenCV, NumPy, Matplotlib, and the YouTube API to read frames from a YouTube video, convert them to grayscale, and apply adaptive thresholding to the frames.
# Result:
[Example](https://youtu.be/pOnwPiL42Qw)

# FlashDetect Package
FlashDetect is a Python package for detecting the presence of a flash in a video. It is built on top of OpenCV and PyTube.
## Installation
`pip install git+https://github.com/LoopGlitch26/FlashDetect.git`
## Usage
```
import flashdetect
url = '' # Insert Video Link
result = flashdetect.analyze_video(url)
print(result)
```
## Contributing
If you find a bug or have a suggestion for a new feature, please submit an issue on GitHub. Pull requests are also welcome!
## License
FlashDetect is licensed under the MIT License. See the LICENSE file for more information.