Go to Post I guess I'm a bit of an apple fanatic. - Austin [more]
Home
Go Back   Chief Delphi > Technical > Programming
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 28-01-2017, 16:20
generaldgibson generaldgibson is offline
generaldgibson
AKA: Daniel Gibson
FRC #3397 (FRC Robolions)
Team Role: Programmer
 
Join Date: Aug 2015
Rookie Year: 2015
Location: University City
Posts: 26
generaldgibson is an unknown quantity at this point
Camera Code

I've been trying to use the CameraServer class to get the camera to send feed to the SmartDashboard, but I haven't managed to get it to work. I'm using a Microsoft LifeCam HD-3000 which I know works; I'm programming in Java with the WPILib plugin up to date. Any help on how to use the CameraServer would be appreciated. Thanks!
Reply With Quote
  #2   Spotlight this post!  
Unread 28-01-2017, 18:13
MuskieProgramme MuskieProgramme is online now
Registered User
FRC #6420
Team Role: Programmer
 
Join Date: Dec 2016
Rookie Year: 2014
Location: Muscatine, IA
Posts: 33
MuskieProgramme is an unknown quantity at this point
Re: Camera Code

Code:
public void robotInit(){
  CameraServer.getInstance().startAutomaticCapture( 0 );
}
Reply With Quote
  #3   Spotlight this post!  
Unread 28-01-2017, 18:24
ProffessorGordo ProffessorGordo is offline
Registered User
FRC #2883
 
Join Date: Jan 2015
Location: Warroad MN
Posts: 3
ProffessorGordo is an unknown quantity at this point
Smile Re: Camera Code

Quote:
Originally Posted by MuskieProgramme View Post
Code:
public void robotInit(){
  CameraServer.getInstance().startAutomaticCapture( 0 );
}
This should also work with C++.

if you ever want to do multiple, try this thread:
https://www.chiefdelphi.com/forums/s...d.php?t=154213
Reply With Quote
  #4   Spotlight this post!  
Unread 28-01-2017, 19:24
AutomationFTW's Avatar
AutomationFTW AutomationFTW is offline
Registered User
FRC #5829
 
Join Date: Jan 2017
Rookie Year: 2016
Location: Houston
Posts: 17
AutomationFTW can only hope to improve
Re: Camera Code

try:

Code:
//All under robot.java
import edu.wpi.first.wpilibj.CameraServer;

//under robotInit
camera = CameraServer.getInstance().startAutomaticCapture()
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 15:32.

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