Automated Counting of Bacterial Colonies

A function to automate bacterial colony counting in images of plated agar in a Petri dish.


Updated 2 Apr 2012

View License

Provides colony_count.m to automate counting of bacterial colonies.

The approach is as follows:

1. Use Hough transform to locate Petri dish.
2. Threshold with Otsu's method.
3. Count colonies as regional maxima in the original image which are present in the segmentation.

David Young's circular Hough transform functions are required. They are available here:

Currently, a range of Petri dish radii is required as a parameter.

This program was originally developed for a Stack Overflow question found here:

Future plans are to increase versatility by automating parameter selection and reducing sensitivity to experimental and imaging conditions (lighting, bright/dark field, media color). Features suggested in comments will be considered for addition.

Cite As

Daniel Asarnow (2023). Automated Counting of Bacterial Colonies (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired by: Hough transform for circles

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes