I have built a reverse vending machine, to recover pet bottles and aluminum cans. Everything has been done with recycled electronic components and arduino.
The recognition softeware uses a webcam and openCV to recognize the bar codes in the containers.
Then they separate into different outputs depending on the color or type of container. This software has been written in python and can run on raspberry pi or on any pc.