Go to Post People do amazing things for stuff the have a passion for. - Foster [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 08-01-2012, 15:58
Ian Kaplan Ian Kaplan is offline
Registered User
FRC #1155 (SCiBORGS)
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2010
Location: New York
Posts: 8
Ian Kaplan is an unknown quantity at this point
Java Camera Feed to Laptop

As our first goal for the season, we would like to get a camera feed to the driver's station.

Does anybody know the sample code necessary to accomplish this task?

Thanks.
Reply With Quote
  #2   Spotlight this post!  
Unread 08-01-2012, 19:51
Derek012's Avatar
Derek012 Derek012 is offline
I miss my frisbees
FRC #4564 (Orange Chaos)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2009
Location: Maine
Posts: 25
Derek012 is on a distinguished road
Re: Java Camera Feed to Laptop

There are two methods I know work well. You can connect the Axis Camera via crossover cable to your cRio and from there you can use the AxisCamera class in the wpilibj to get the camera instance. Or you can take another approach and connect it to the DLink directly and get the camera data directly without going through the cRio. If you want to go into image processing going through the cRio would be a slower choice and may introduce lag if you demand to much of it. If you bring it to the classmate you have more processing speed to help you process your image and not "bog down" your Rio.
Reply With Quote
  #3   Spotlight this post!  
Unread 10-01-2012, 14:36
sand500 sand500 is offline
Registered User
FRC #3540 (Wildcat Robotics)
 
Join Date: Jan 2011
Rookie Year: 2011
Location: United States
Posts: 81
sand500 is an unknown quantity at this point
Re: Java Camera Feed to Laptop

Quote:
Originally Posted by Ian Kaplan View Post
As our first goal for the season, we would like to get a camera feed to the driver's station.

Does anybody know the sample code necessary to accomplish this task?

Thanks.


I know that you can view the source code of the diffrent classes so you would probably have to look at the source code of the AxisCamera class and modify it to acommodate the method that Derek012 suggest where you bypass the crio.
Reply With Quote
  #4   Spotlight this post!  
Unread 10-01-2012, 14:42
sand500 sand500 is offline
Registered User
FRC #3540 (Wildcat Robotics)
 
Join Date: Jan 2011
Rookie Year: 2011
Location: United States
Posts: 81
sand500 is an unknown quantity at this point
Re: Java Camera Feed to Laptop

Is it possible to use a usb breakout board and connect it to the sidecar?
Reply With Quote
  #5   Spotlight this post!  
Unread 12-01-2012, 16:57
GuitarPlayerTim GuitarPlayerTim is offline
Mechanical
AKA: Timm
FRC #3171 (Best of the East)
Team Role: Mechanical
 
Join Date: Jan 2012
Rookie Year: 2006
Location: Westhampton Beach
Posts: 5
GuitarPlayerTim is an unknown quantity at this point
Re: Java Camera Feed to Laptop

connect your computer to your ethernet bridge through a straight-through CAT5. connect the camera to the bridge with a crossover cable.
set your computer IP to 192.168.0.6
enter the camera through a web browser by typing 192.168.0.90 to make sure you can connect.
then use the Setup Axis Camera program.
keep IP as 192.168.0.90
make subnet 255.0.0.0


in your code:
inside public *INSERT CLASS NAME HERE*(){

AxisCamera camera = AxisCamera.getInstance();

}

once everything is saved, plug the camera into CRIO port 2.
change computer IP to 10.TE.AM.5
make sure your driverstation is updated, run the code in, and you should get feed.

a little gift from team 3171: Westhampton Beach Hurricanes
Reply With Quote
  #6   Spotlight this post!  
Unread 12-01-2012, 17:41
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Java Camera Feed to Laptop

Quote:
Originally Posted by GuitarPlayerTim View Post
connect your computer to your ethernet bridge through a straight-through CAT5.
....
This procedure will not work as listed. The camera code in WPILibJ is defaulting to 10.xx.yy.11 for the camera. You can either use the Robot Radio option of the Camera tool and plug the camera into the robot radio or your first call to GetInstance should be:
AxisCamera camera = AxisCamera.getInstance("192.168.0.90");
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 11:17.

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