View Single Post
  #1   Spotlight this post!  
Unread 19-01-2017, 20:42
Keyla Nguenkam Keyla Nguenkam is offline
Registered User
FRC #4536
 
Join Date: Jan 2017
Location: US
Posts: 1
Keyla Nguenkam is an unknown quantity at this point
Microsoft USB Camera on DashBoard

We have been trying to figure out how to use an HD Microsoft Camera on the SmartDashboard with Java but it doesn't work. It only works when the SmartDashboard on Default.
The code we have for the Camera:

Code:
public void robotInit() {
new Thread(() -> {
UsbCamera camera = CameraServer.getInstance().startAutomaticCapture();
camera.setResolution(640, 480);
CvSink cvSink = CameraServer.getInstance().getVideo();
CvSource outputStream = CameraServer.getInstance().putVideo("Blur", 640,
480);
Mat source = new Mat();
Mat output = new Mat();
while(true) {
cvSink.grabFrame(source);
Imgproc.cvtColor(source, output, Imgproc.COLOR_BGR2GRAY);
outputStream.putFrame(output);
}
}).start();
}
}
We got it from
https://s3.amazonaws.com/screensteps...pdf?1484868916
Everything works perfectly well when we use Default.
Thanks in advance,
Team4536
Reply With Quote