“BREAD Vision” utilizes vision software in conjunction with a BREAD system to judge physical characteristics and analyze the material characteristics of an object, and then return a pass or fail. The device is designed to be an open-source, affordable option for quality control applications.
To accomplish this goal, seven functional requirements were created to be completed in four months. The goals are as follows: The entire device will have design files originated entirely from free and open source software. The Raspberry Pi will communicate its results with the BREAD loaf. Multiple vision programs can be run from the same camera, i.e. color detection and silhouette detection. The device can identify object defects by detecting inconsistencies in its color, i.e. dents, bruises, discoloration. The OpenCV slice will be completely autonomous. The OpenCV slice does not connect to the internet. The Pi will be able to receive information about spectroscopy of an object. At the end of the semester, all of these goals were reached.
Additionally, three value added goals were created and are as follows: The Pi will be able to send meaningful data to the BREAD Slice about the spectroscopy of an object. The cascade system design will be simplified, hopefully removing the need for the SD card communication. Ensure expandability for the platform. The SD card was successfully removed as a requirement for this product, and it is in a state where all programs and software are completely customizable and expandable. The only goal that was not reached was the spectrometer sending data to the BREAD loaf. This goal will be carried over as a priority for next semester.
In our system, the Raspberry Pi communicates with the BREAD loaf by establishing an I2C connection and sending its results as responses to commands. The main Python program in the Pi is responsible for handling this communication and can call multiple Python modules to analyze images and send the results back to the BREAD loaf.
A Pi camera can further expand these capabilities. Color detection can be accomplished through the use of the libraries OpenCV, numpy, time, and the PiCamera library. With a given color that the object is supposed to be, the current integration compares a point central on the camera window to the tolerance computed from the given nominal value and determines if the image from the camera falls within specifications. This can easily be expanded to incorporate multiple different points with different tolerance values for each point.
Utilizing a diffraction spectroscope and an M12 CCTV zoom lens, a spectrometer can be integrated into the Raspberry Pi. This spectrometer, once calibrated, is able to view the specific operating wavelengths of light sources or the absorption bands of a material, allowing one to view the specific characteristics of a material. Many functions and libraries are required to make this spectrometer work, and all the code is available in the OSF repository.
To replicate our system, the first step is to acquire a BREAD system and a Raspberry Pi 4, along with a compatible camera that works with the Pi. Before installing OpenCV, it is essential to install Raspberry Pi Bullseye 3.10+ to gain access to the PiCamera2 library.
Note that if Python is reinstalled, all libraries, including OpenCV, must be reinstalled as well. A complete list of the required libraries can be found in the OSF repository. Once all of the necessary libraries have been installed, simply run main.py.
Depending on the available cameras, the code in the OSF repository can be configured to output spectrograms or compare color values. By following these steps, anyone can replicate our system and utilize it for affordable and accessible quality control applications. The OSF repository can be found here: https://osf.io/2htbm/
|Raspberry PI 4||55$-105$|
|M12 CCTV zoom lens||15$|