Accessing USB camera on driver station laptop w/o Dashboard

Hi,

Our team had set up vision processing to be done on the driver station laptop using OpenCV in Java. While all of that vision code is done, we very recently made the switch from the Axis IP camera to the Lifecam USB camera. Right now, I’m at a bit of a loss on how to grab images from that camera.

Is NetworkTables the way to go in this case? Are there any examples out there?

Thanks.

You need to stream the images over with some sort of streamer. mjpg_streamer is pretty good, and so are the streaming options of ffmpeg.

That said, I would suggest processing the images on board, because you’ll have to pay two wireless network latency penalties, one getting the images to the dashboard, and the other sending the results back to the robot.

mjpg-streamer is probably the right solution, but if you’re using CameraServer, this is how the protocol works.

Not sure if this is what you’re looking for but it’s a way to go about this.

That was precisely what I was looking for. I was able to implement it and get it displayed on a JFrame. Thanks.

Running it with the Simple Vision code, I ran into issues with the lack of a Huffman table. That was resolved when I switched to Intermediate Vision.

We plan on switching to processing on a Jetson TK1 after our first regional, but for now, this is great.

You can look at the smartdashboard source for how it deals with the lack of a huffman table.