will this work for adding camera code to python?

class camera {
#include <WPILib/Vision/AxisCamera.h>

AxisCamera cam = AxisCamera.GetInstance();

as camera.sip? All i need for my team’s robot this year is the Robot’s POV, so this should do it, right?

If you are interested in streaming the camera to the dashboard, you may want to consider connecting it directly to the switch on the robot. By bypassing the cRIO, the dashboard can directly communicate to the camera, and no code on the cRIO is involved.

Greg McKaskle

do you have to mod the dashboard for this to work?

Yes. You would modify the dashboard to directly request jpg or even better an mjpg stream from the camera.

When I get back into town, I’m going to put up another dashboard example written in LV which will do this, will parse headers to extract the jpgs from the mjpg stream, decode them into an image, and display them. I didn’t get to this before I had to leave town.

Greg McKaskle

can you attatch a precompiled version?

I’d be happy to help you understand the approach. I’m out of the country and don’t have the code with me.

As for posting a library, I’d prefer to show and teach you the LV code. It is really just an http request a little string parsing, and then you call NIVision to decode into an image. Then you can decide how you want to build your dashboard, or you can use the LV one.

Greg McKaskle