-
Notifications
You must be signed in to change notification settings - Fork 70
How Shot Detection Works
cbdmaul edited this page Sep 29, 2016
·
6 revisions
The webcam feed is provided using OpenCV and processed using a custom algorithm. Webcam discovery is proved by Sarxos' webcam-capture.
- The most recent frame is read from the webcam
- The brightness is threshold using a moving average of 1/3 of the FPS (333ms)
- The pixels that are brighter than this threshold are collected into a bright pixel list
- The bright pixels are clustered
- Clusters of 6 or more pixels are checked to verify a high density (Closely resembling circles)
- The surrounding edge pixels are compared to the previous frame to determine the net change in color