|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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();
}
}
https://s3.amazonaws.com/screensteps...pdf?1484868916 Everything works perfectly well when we use Default. Thanks in advance, Team4536 |
|
#2
|
||||
|
||||
|
Re: Microsoft USB Camera on DashBoard
Have you tried disabling all firewalls and antivirus software?
|
|
#3
|
||||
|
||||
|
Re: Microsoft USB Camera on DashBoard
Quote:
We can try disabling antivirus, but I doubt that is the root problem. |
|
#4
|
|||
|
|||
|
Re: Microsoft USB Camera on DashBoard
We got it to work by specifying the URL that it should be pulling from. I can't remember exactly what it was but I think it was on a different port, I think we found it either somewhere on the old SmartDashboard or the NI one.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|