Himikda Dastidar Dylan Wheeler Jeremy Stuart
The Edge Cases
Project Made For:
Calgary Hacks 2019
Python (image parsing, barcode reading), Java (GUI and main program)
Adrian Rosebrock, author of pyimagesearch.com, for the implementation of the opencv/zbar reader.
First: If you're here, we're really very honoured. We are but lowely first year compsci scrubs. Babes in the woods. So thanks for taking an interest in our litle project. If you're here completely by accident: Hi!
The idea was to build a program that would use machine vision to parse video and images to recognize objects and make decisions about how it should be sorted for recycling. This is entirely do-able today, and is within the programming reach of an advanced and competent team of university students. But...we are not those students (yet).
As a proof of concept (within our abilities), we built a program that can take a picture, recognize a barcode, and output the sort decision based on it's materials and the recycling standards of the local city.
Execute Recyclr from your command line. This should open a window in which you must: 1) Select the city that you are recycling the item in 2) Click browse to find a picture with a barcode
the program should them display the picture (with the barcode identified and labelled, but this is difficult to see on large pictures), and display the correct choices for sorting that item. Three cities are avialable so you can see how the items characteristics are checked against the cities requirements for different items and grades of materials.
Reasons It Might Not Work
This program uses two python modules that must be installed (opencv and zbar). The program will likely crash if you do not have these. (Note: if it takes you less than 2 hours to figure out how to add these modules, you've already lapped The Edge Cases!)
How it works
The program takes a picture and passes it to opencv, an open source library for real-time computer vision. The image is parsed for the barcode and then passed to zbar, an open source module for reading barcodes from video streams and image files. The program then outputs your picture with the barcode framed with a box and the code displayed. The program also writes the barcode to a text file. The program then takes the barcode in the test file and checks it against the test cases in an array. When a match is found it gets the characteristcs for that item and checks them against the characteristics acceptable for recycling in the city selected. The program then displays, with check marks and x's, what is possible with the item (recyclable, refundable, compostable, or trash).