Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 1.07 KB

File metadata and controls

39 lines (26 loc) · 1.07 KB

Microscopy blob detection

Detects dark holes and the brightest blob in grayscale microscopy images.

Example detection result

Red circles = dark holes  |  Cyan circle = brightest blob


Setup

python -m pip install -r requirements.txt

Run

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

How it works

  1. Enhance — two Gaussian background-subtraction passes highlight dark holes and bright blobs separately.
  2. Detect — OpenCV SimpleBlobDetector finds blob candidates in each enhanced image.
  3. Filter — border blobs are discarded; top dark candidates (up to 8) and the single brightest blob are kept.
  4. Annotate — detected blobs are drawn as circles on the original image and saved as masks.