Detects dark holes and the brightest blob in grayscale microscopy images.
Red circles = dark holes | Cyan circle = brightest blob
python -m pip install -r requirements.txt
Place PNG images in images/, then:
python src/hole_detection.py
Results are saved to results/:
| File | Description |
|---|---|
<name>_annotated.png |
Original with detection circles |
<name>_mask.png |
Combined binary mask |
<name>_dark_mask.png |
Dark holes mask |
<name>_bright_mask.png |
Brightest blob mask |
- Enhance — two Gaussian background-subtraction passes highlight dark holes and bright blobs separately.
- Detect — OpenCV
SimpleBlobDetectorfinds blob candidates in each enhanced image. - Filter — border blobs are discarded; top dark candidates (up to 8) and the single brightest blob are kept.
- Annotate — detected blobs are drawn as circles on the original image and saved as masks.
