Go to Post The GDC giveth, the GDC taketh away. Blessed be the name of the GDC. - GaryVoshol [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 21-02-2016, 11:30
ricar144 ricar144 is offline
Registered User
FRC #0865
 
Join Date: Sep 2014
Location: Toronto
Posts: 2
ricar144 is an unknown quantity at this point
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.
Reply With Quote
  #2   Spotlight this post!  
Unread 21-02-2016, 18:37
pensono pensono is offline
Registered User
FRC #5495
 
Join Date: Jan 2015
Location: Snohomish, WA
Posts: 15
pensono is an unknown quantity at this point
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.
Reply With Quote
  #3   Spotlight this post!  
Unread 21-02-2016, 23:42
ThomasClark's Avatar
ThomasClark ThomasClark is offline
Registered User
FRC #0237
 
Join Date: Dec 2012
Location: Watertown, CT
Posts: 146
ThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud of
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.
__________________
GRIP (Graphically Represented Image Processing) - rapidly develop computer vision algorithms for FRC

Last edited by ThomasClark : 21-02-2016 at 23:44.
Reply With Quote
  #4   Spotlight this post!  
Unread 22-02-2016, 00:01
Ozuru's Avatar
Ozuru Ozuru is offline
It's always the programmer's fault.
no team
 
Join Date: May 2013
Rookie Year: 2010
Location: Earth
Posts: 268
Ozuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to behold
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.
Reply With Quote
  #5   Spotlight this post!  
Unread 22-02-2016, 17:03
ricar144 ricar144 is offline
Registered User
FRC #0865
 
Join Date: Sep 2014
Location: Toronto
Posts: 2
ricar144 is an unknown quantity at this point
Smile Re: Accessing USB camera on driver station laptop w/o Dashboard

Quote:
Originally Posted by ThomasClark View Post
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.
Reply With Quote
  #6   Spotlight this post!  
Unread 24-02-2016, 15:30
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,561
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Accessing USB camera on driver station laptop w/o Dashboard

Quote:
Originally Posted by ricar144 View Post
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.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:25.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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