MikeF1617
14-01-2016, 21:18
I have my code set up to connect to and send camera data to the dashboard. I had it working with the Microsoft LifeCam HD-3000, but when I set it up with an Axis M1011 (since I wanted manual control of exposure and other settings) I got authentication errors. We are programming our robot in Java this year, but in previous years we used LabVIEW. I remember fixing this by setting the camera to either a username/password combo of one of the following:
FRC, FRC
root, pas
root, admin
I found those combinations in the LabVIEW WPIlib vision code. However, none of these fix the error.
This is the error:
ERROR Unhandled exception: VisionException [com.ni.vision.VisionException: IMAQdxError: -1074360268: The camera is configured with password authentication and either the user name and password were not configured or they are incorrect.] at [com.ni.vision.NIVision._IMAQdxConfigureGrab(Native Method), com.ni.vision.NIVision.IMAQdxConfigureGrab(NIVisio n.java:30265), edu.wpi.first.wpilibj.vision.USBCamera.startCaptur e(USBCamera.java:94), edu.wpi.first.wpilibj.CameraServer.startAutomaticC apture(CameraServer.java:187), org.usfirst.frc.team1124.robot.DashboardConnection .initCamera(DashboardConnection.java:16), org.usfirst.frc.team1124.robot.Robot.robotInit(Rob ot.java:40), edu.wpi.first.wpilibj.IterativeRobot.startCompetit ion(IterativeRobot.java:72), edu.wpi.first.wpilibj.RobotBase.main(RobotBase.jav a:241)]
The code getting the camera stream:
CameraServer srv = CameraServer.getInstance();
USBCamera camera = new USBCamera("cam1");
camera.openCamera();
srv.setSize(1); // 320x240
srv.startAutomaticCapture(camera);
Does anyone know how to get this working?
Also: When I set it to allow viewing without password (from the axis config page) the Java code spams out this error:
Error when getting image from the camera: IMAQdxError: -1074360306: No acquisition in progress. at edu.wpi.first.wpilibj.CameraServer.capture(CameraS erver.java:222)
edu.wpi.first.wpilibj.CameraServer$2.run(CameraSer ver.java:192)
java.lang.Thread.run(Thread.java:745)
Edit: I found how to edit the exposure of the Microsoft Camera using the USBCamera class, but I won't be able to test it until tomorrow. If someone has an answer to this issue it would still be appreciated.
FRC, FRC
root, pas
root, admin
I found those combinations in the LabVIEW WPIlib vision code. However, none of these fix the error.
This is the error:
ERROR Unhandled exception: VisionException [com.ni.vision.VisionException: IMAQdxError: -1074360268: The camera is configured with password authentication and either the user name and password were not configured or they are incorrect.] at [com.ni.vision.NIVision._IMAQdxConfigureGrab(Native Method), com.ni.vision.NIVision.IMAQdxConfigureGrab(NIVisio n.java:30265), edu.wpi.first.wpilibj.vision.USBCamera.startCaptur e(USBCamera.java:94), edu.wpi.first.wpilibj.CameraServer.startAutomaticC apture(CameraServer.java:187), org.usfirst.frc.team1124.robot.DashboardConnection .initCamera(DashboardConnection.java:16), org.usfirst.frc.team1124.robot.Robot.robotInit(Rob ot.java:40), edu.wpi.first.wpilibj.IterativeRobot.startCompetit ion(IterativeRobot.java:72), edu.wpi.first.wpilibj.RobotBase.main(RobotBase.jav a:241)]
The code getting the camera stream:
CameraServer srv = CameraServer.getInstance();
USBCamera camera = new USBCamera("cam1");
camera.openCamera();
srv.setSize(1); // 320x240
srv.startAutomaticCapture(camera);
Does anyone know how to get this working?
Also: When I set it to allow viewing without password (from the axis config page) the Java code spams out this error:
Error when getting image from the camera: IMAQdxError: -1074360306: No acquisition in progress. at edu.wpi.first.wpilibj.CameraServer.capture(CameraS erver.java:222)
edu.wpi.first.wpilibj.CameraServer$2.run(CameraSer ver.java:192)
java.lang.Thread.run(Thread.java:745)
Edit: I found how to edit the exposure of the Microsoft Camera using the USBCamera class, but I won't be able to test it until tomorrow. If someone has an answer to this issue it would still be appreciated.