This Python script uses OpenCV to detect and count bacteria in a video file. It applies thresholding and contour detection to identify bacteria clusters in each frame.
The script reads frames from a video file, converts each frame to grayscale, applies thresholding, and then identifies contours. The contours are drawn on the original frame, and the count of detected bacteria is displayed on the video window.
- Python 3.8
- OpenCV