-
Notifications
You must be signed in to change notification settings - Fork 0
Raspberry Pi Vision
This year, we have decided to run vision tracking on our robot in an effort to score more goals with less user error. We are doing it on a Raspberry Pi in order to lessen the processing load on the RoboRIO. Currently, our camera is an Axis M1013 camera.
You need python for this, therefore you need python on your development computer. I use a Macbook Pro, running OS X 10.11.6. https://www.python.org/downloads/ <- install python from here. You want python 3. Trust me.
You will also need pip to get the pynetworktables. Installing this was a serious pain, but many stackoverflow searches later brings me to
sudo python -m ensurepip
Type this in and you should be good to go. (Keep in mind these are OS X instructions though. I don't like Windows, and I'm using a Macbook Pro, so I'm just going to put here the things that work for me. It's build season, I don't have time for cross-platform compatibility. I'm sorry. Maybe in the offseason?)
If that did not work for you, here ya go! http://stackoverflow.com/questions/17271319/how-to-install-pip-on-mac-os-x
Also, there is google.
Then, type this into terminal
pip3 install pynetworktables
(Whenever I say 'type', I actually mean copy and paste.)
I am using PyDev to develop. Their instructions are very nice and complete. They are here: http://www.pydev.org/manual_101_root.html
##Setting Up OpenCV
Someone wonderful has made this precompiled binary of OpenCV for Pi!
https://github.com/jabelone/OpenCV-for-Pi
I didn't have any major problems setting this up, but remember to use the command python3
and pip3
instead of python
and pip
(assuming you're using Python 3, which, again, you really should be).
Excellent! Now you have OpenCV on your Pi! OpenCV can be annoying, and sometimes the documentation is confusing. Most often, the documentation is hard to find. Here is the documentation for OpenCV: http://docs.opencv.org/2.4/modules/refman.html
And here is the Python 3.6 documentation: https://docs.python.org/3/