Skip to content

Library providing methods for the automatic detection and characterization of bacterial colonies in petri dishes on the colony-picking robot design project

License

Notifications You must be signed in to change notification settings

msudesigncpr/libcolonyfind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The CPRs Occipital Lobe

This is a library for the automatic detection of colonies for the Colony-Picking Robot MSU senior design project. This library provides a ColonyFinder class that creates coordinates and annotated images for images of petri dishes. See the documentation for more information.

Getting Started

Usage of a virtual environment is highly recommended.

Install with pip directly from this repository:

python -m venv .venv
.\.venv\Scripts\activate 
pip install "git+https://github.com/msudesigncpr/libcolonyfind.git"

Warning

OpenCFU running on WSL is necesary for this library to work. The path to this instance of OpenCFU will need to be specified in constants.py

Minimal Usage Example

To get started quickly, the following code will ingest images and spit out coords to a maximum of 96 colonies in mm offsets from the center of those images. In the CPR process control code, this happens here.

from libcolonyfind.colony_finder import ColonyFinder
import cv2

def find_some_colonies():
    raw_image_path='../../some-images'             # images sent to OpenCFU
    csv_out_path='output\cfu-csv'                  # coords generated by OpenCFU are sent here


    # process images, create annotated images
    cf = ColonyFinder(raw_image_path, csv_out_path)
    cf.run_full_proc() 

    # get annotated images and save
    images = cf.annotate_images()                  
    for index, image in enumerate(images):
        cv2.imwrite('output\\annotated-images\\' + str(index) + ".jpg", images)

if __name__ == "__main__":
    find_some_colonies()

About

Library providing methods for the automatic detection and characterization of bacterial colonies in petri dishes on the colony-picking robot design project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages