There's nothing truly as horrible and offensive as seeing pineapple on your pizza. Too often have innocent university students 'pitched in' to order a pizza from Dominos with their friends, only to realize that one of their friends had the audacity to order Hawaiian.

We decided to fix this problem by building a robot that could detect and pick off pineapples from your pizza slice. The general idea was that a camera would take a picture of a pizza slice from a fixed, upward position, and your computer would be able to detect and locate any pineapples in the picture. It would mark where each pineapple was on a Cartesian coordinate system and then send those accursed coordinates to a robotic arm which would pick the pineapples off. With this, the user would not have to touch, smell, see, or be anywhere close to any pineapples throughout the operation of the machine.

We built the robotic arm using an Arduino Uno with three servo motors and copious amounts of cardboard. We used OpenCV on python to perform the image processing and then sent the information through the serial port from our computer to the Arduino. Our computer would use a reference picture of a pineapple to scan the picture taken for any collection of pixels that were the most similar. Once found, the target and its surrounding area would be erased in white. Then the computer would search for the next 'most similar' collection of pixels and so forth. Once done, the coordinates would be sent through the serial connection to the Arduino where they'd be converted to angle sweeps for each servo motor.

Challenges we faced were: while our computer could detect where pineapples were located, we could not find a way to keep it from stopping after the last pineapple was found, that is, prevent it from targeting similarly yellow things after all pineapples were found. We also had trouble sending the information accurately through the serial connection to the Arduino.

Ultimately while we did not finish this project, we all learned a lot about image processing and working with Arduino. Pineapples may have won this time but we have not given up.

Share this project:

Updates