The computer science sub-system has three primary functions: automation control, computer vision image analysis and user interface. All three of these functions are implemented on the RaspberryPi microcontroller. The user interface was created using PyQT and is used to input various pieces of data such as how many samples are to be analyzed and also where the user starts/stops/resets the analysis process. The user interface is updated throughout the process and displays the current sample image as well as relevant data about the sample. The automation controls are calculated by the RaspberryPi which then sends the control messages via serial interface to the ATmega328 where they are decoded and used to set the motors to the proper angles. The image analysis is handled using OpenCV and can analyze approximately 5 samples per minute. It counts the number of microbial growths if any are present. After the data has been collected it is output to a .csv file that is easily transferred into a spreadsheet report.
The computer vision portion of the project was implemented on the RaspberryPi using OpenCV. It looks at a variety of parameters to identify microbial colonies including (but not limited to) circularity, convexity and area. Once a colony has been identified the software places a keypoint around the colony (the yellow circles seen above) all the while keeping a count of the number of colonies that are found. The collected data is then output to the GUI and to a database that can be used to generate a report.
The user interface was developed using PyQt and QtDesigner. Using some of the threading capabilities of PyQt5 the interface updates to display an image and relevant data about the current sample. The interface software runs the automation controls in the background and sends control messages to the other PCB's that handle the motor controls.