Your Pi is way more capable then you think it is.
An earlier version of this automatic gateman system, built around a camera-based design, was published on the Electronics For ...