Go to Post Truly listening to the wealth of advice around you is so important. Don't work in a vacuum all season long. - OZ_341 [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 12-01-2015, 21:55
SquishyIce's Avatar
SquishyIce SquishyIce is offline
Registered User
FRC #1405 (Finney Falcons)
Team Role: Electrical
 
Join Date: Dec 2013
Rookie Year: 2012
Location: New York
Posts: 39
SquishyIce can only hope to improve
Re: Vision in Java

If you're just looking for getting vision on your dashboard with a USB camera, I stripped down the SimpleVision template to 3 lines of code that you run when initializing everything:

Code:
CameraServer camera = new CameraServer();
camera.setQuality(50);
camera.startAutomaticCapture("cam0");
When you start up the driver station while connected to a RoboRIO running this code, go to the FRC PC Dashboard. In the bottom left of the "drive" pane, there should be a dropdown menu with the options of no camera, SW camera, HW camera, and IP camera. I believe you set this to SW camera (If that doesn't work, try HW camera. It's one of the two. I honestly cant remember, even though I was using it literally 2 hours ago). This should give you a live camera feed in what was formerly a big empty space of the dashboard. One thing I did notice tonight about that string "cam0"; this does not name the camera, it determines what camera to get the feed from. I believe the first camera you connect is automatically addressed as "cam0". I could be wrong on this, I haven't tested using multiple cameras. I learned this the hard way by replacing "cam0" with "PotatoCam", then not understanding why I couldn't get any feed whatsoever.

Good luck!
__________________
"MAKE IT WORK, DAVID"
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:41.

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