So you love building your own electronics with Arduino and Raspberry Pi? The Charmed Labs Pixy2 is a smart vision sensor that lets you add object tracking to your projects. You can teach it an object with the press of a button.
The Pixy2 also has an integrated light source and a line following mode. You can use it with a wide variety of microcontrollers. You can find out more about it here.