Caveat: I had nothing to do with writing any of this; it was a pair of our student members in 2013. The code has been on line ever since. We used an IP camera communicating over on-robot network from a raspberry pi to the 'RIO, which then sent minimal targeting information over the network to the driver station. The code is all on our github (and has been for years):
https://github.com/frc3946/PyGoalFinder has the raspberry pi side of the code (written by Matt Condon), and several of our robot codes, earliest (and probably cleanest) being
https://github.com/frc3946/UltimateAscent, written by our founder and my son Gixxy are designed to connect with the data from this raspberry pi.
Possibly our newer code also works, but our robot performance has not convinced me of this; we were rock solid in 2013 and quite good in 2014, but I did not see evidence of good end-to-end targeting code in 2015 (when we didn't really try, because there were no targets in appropriate locations) or 2016.