Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Accessing USB camera on driver station laptop w/o Dashboard (http://www.chiefdelphi.com/forums/showthread.php?t=144329)

ricar144 02-21-2016 11:30 AM

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.

pensono 02-21-2016 06:37 PM

Re: Accessing USB camera on driver station laptop w/o Dashboard
 
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.

ThomasClark 02-21-2016 11:42 PM

Re: Accessing USB camera on driver station laptop w/o Dashboard
 
mjpg-streamer is probably the right solution, but if you're using CameraServer, this is how the protocol works.

Ozuru 02-22-2016 12:01 AM

Re: Accessing USB camera on driver station laptop w/o Dashboard
 
http://www.chiefdelphi.com/forums/sh...45&postcount=5

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

ricar144 02-22-2016 05:03 PM

Re: Accessing USB camera on driver station laptop w/o Dashboard
 
Quote:

Originally Posted by ThomasClark (Post 1544032)
mjpg-streamer is probably the right solution, but if you're using CameraServer, this is how the protocol works.

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.

Joe Ross 02-24-2016 03:30 PM

Re: Accessing USB camera on driver station laptop w/o Dashboard
 
Quote:

Originally Posted by ricar144 (Post 1544521)
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.

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


All times are GMT -5. The time now is 08:00 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi