Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Camera Code (http://www.chiefdelphi.com/forums/showthread.php?t=154394)

generaldgibson 28-01-2017 16:20

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!

MuskieProgramme 28-01-2017 18:13

Re: Camera Code
 
Code:

public void robotInit(){
  CameraServer.getInstance().startAutomaticCapture( 0 );
}


ProffessorGordo 28-01-2017 18:24

Re: Camera Code
 
Quote:

Originally Posted by MuskieProgramme (Post 1637553)
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

AutomationFTW 28-01-2017 19:24

Re: Camera Code
 
try:

Code:

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

//under robotInit
camera = CameraServer.getInstance().startAutomaticCapture()



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

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