Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Java Camera Feed to Laptop (http://www.chiefdelphi.com/forums/showthread.php?t=99512)

Ian Kaplan 08-01-2012 15:58

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.

Derek012 08-01-2012 19:51

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.

sand500 10-01-2012 14:36

Re: Java Camera Feed to Laptop
 
Quote:

Originally Posted by Ian Kaplan (Post 1099630)
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.

sand500 10-01-2012 14:42

Re: Java Camera Feed to Laptop
 
Is it possible to use a usb breakout board and connect it to the sidecar?

GuitarPlayerTim 12-01-2012 16:57

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

RufflesRidge 12-01-2012 17:41

Re: Java Camera Feed to Laptop
 
Quote:

Originally Posted by GuitarPlayerTim (Post 1103684)
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");


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

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