How it works:
Uses a web camera, and breaks each frame into images.
It uses an algorithm to
1.) learn the background (adapt to changes in the background),
2.) detect brightness differences (identified as "blobs")
3.) creates a histogram (like a map) of the blobs location within the picture
4.) compares the histogram in one frame and the next frame to identify movement of targets not normally in the background.
5.) calculate their location within the image, and then translate that into an x/y angle to aim the weapon.
6.) send a message over usb to a microcontroller, which drives 3 servos (pan/tilt/trigger), resulting in the nerf dart gun, targeting, and firing darts at the target
It uses 2 lazy susan's mounted on the center of gravity so standard servos have enough torque to move this massive nerf gun very quickly (upto 800 instructions/second).
The turret stand is 100% custom built
The software is exceptional at locking on targets
Total cost: $150
Total build time: 8 hours
Thanks: To my wife for helping me draw out the base.