A DIY M&Ms and Skittles sorting machine
Here's the commercial version.[1] This machine is sorting peas by color. Peas. Individual peas. Each individual pea is examined by cameras for size, color, and looking like a pea.  Rejects are kicked into the reject hopper by an air jet. There are machines like this for most fruit.  Typical throughput is a <i>ton per hour.</i>  Most fruit and berries go through such machines today.  That's why the fruit at the supermarket is so consistent.<p>The process looks like magic.  Color-mixed items go in, and single-color items come out, on a line going so fast that no human can see what's happening.  It's amazing to see computer vision systems that fast.<p>These machines work by putting the items on a conveyor belt, then dropping them on a much faster conveyor to spread them out. The fast conveyor goes past cameras, and at the end, launches the items into free flight for a few inches.  While in flight, computer-controlled air jets knock out the rejects.<p>[1] <a href="https://www.youtube.com/watch?v=JyGR6A5MWG0" rel="nofollow">https://www.youtube.com/watch?v=JyGR6A5MWG0</a>