-
Notifications
You must be signed in to change notification settings - Fork 2
Software
The two main components of the software are a classification algorithm to detect the colour of the falling glass and a menu system which allows for the calibration of certain parameters. The system is always in either of these states, depending if a bottle has been detected at the input or not.
OpenCV is used to process the captured images. A thresholding was impleneted based on the HSV values extracted from these images.
Add a bit more to it, e.g. building up of a baseline, waiting for a few classification until the motor is turned
The menu has three options:
- calibrating the resting position of the exit chute,
- the angle between the rest position and the positions the chute turns to upon detecting amber or green glasses
- and the length of time the chute spends at each position after a bottle has been classified.
These calibration values are then saved and loaded upon the boot-up of the system. When a bottle is detected at the input the Menu is immediately terminated and the classification starts.
The real-time responsiveness of the Glassify device is necessitated by the unimpeded fall of the bottles to be sorted. The software must be able to classify the images taken by the camera quickly enough to be able to signal the servo to move to the right angle before the bottle hits the bottom of the tube. The quick processing required for this is achieved by utilising threads to delegate tasks to in order to be able to run these simultaneously. The resolution of the images to be classified were also reduced in order to save processing time. The switch activating the classification upon the inputting of a bottle is polled continuously in order to be able to start sampling immediately after the bottle has entered the device.