|
Re: Using the Raspberry Pi for Vision Processing
It depends on how much work you want to do on the PI - so far, we are trying to do as much vision work as possible on the PI, and let the RoboRIO do what it does best - operate the robot. This means that all of the vision work is delegated to the PI - name, acquiring the image and running the GRIP (opencv) pipeline.
The path we are taking is:
1) install (aka "build") opencv native for the pi.
2) Write the PI side of the code, which consists of:
- capture the image
- use the GRIP pipeline code to apply the transforms that may identify the target
- do some math on the output of the pipeline
- put some info in NetworkTables
3) On the RoboRIO side of things, write code that
- adds an event listener for NetworkTables changes
- when a Networktable change occurs, decide if any action is required, and take the action if it is needed
So, basically we have 2 java programs, one running on the PI doing the vision processing, and one "traditional" program running on the RoboRIO, using NetworkTables to communicate between them.
Ours is still in progress, BTW, but this describes the high level "architecture"
|