[HELP NEEDED] IMAQdx USB camera settings

Using the LifeCam-3000, we are attempting to send a feed to the SmartDashboard. To do this, we grab from it using the IMAQdx methods of com.ni.vision.NIVision. We also need to alter the exposure of the camera, so added the line:

(new USBCamera("cam0")).setExposureManual(20);

The issue is that using both on the same camera leads to the following error:


ERROR Unhandled exception: VisionException [com.ni.vision.VisionException: IMAQdxError: -1074360310: Camera is already in use.] at
[com.ni.vision.NIVision._IMAQdxOpenCamera(Native Method),
com.ni.vision.NIVision.IMAQdxOpenCamera(NIVision.java:30334),
edu.wpi.first.wpilibj.vision.USBCamera.openCamera(USBCamera.java:72),
edu.wpi.first.wpilibj.vision.USBCamera.<init>(USBCamera.java:63),
org.usfirst.frc.team1719.robot.Robot.robotInit(Robot.java:78),
edu.wpi.first.wpilibj.IterativeRobot.startCompetition(IterativeRobot.java:72),
edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:241)]
WARNING: Robots don't quit!

There is no way that we found to use the IMAQdx session to change the exposure, so we ask here for aid.

Usually when we get the “Robots don’t quit” error, it is because we are initializing one sensor in more than one place. If that’s not it, then we got nothing.

That’s exactly what the problem is. We are trying to figure out a way to either convert an IMAQdx session ID to a USBCamera object or to set the exposure directly from the IMAQdx session ID.

My team used this same kind of camera, our code is here: https://github.com/frc2399/2015-code/blob/master/src/org/usfirst/frc/team2399/robot/Robot.java

The main camera code is on lines 95-98, take a look at it and ask me if you have any questions!

Thank you, but our problem lies with our images coming back overexposed, which the CameraServer can’t fix. We need to change the webcam’s settings.

Could you possibly change the settings of the camera?

https://wpilib.screenstepslive.com/s/4485/m/24194/l/288984-camera-settings

It’s a LifeCam 3000, not an Axis. We don’t have the Ethernet port space for an access with the new radio.

After you make the cam0, make a new line and call the method to set the exposure there. Try messing around with higher and lower values to see what happens. Other then that, I’m not really sure what else there is I can do without seeing your code.

Thanks for the input, but we tried that. We are probably going to offload this process anyway, so I’ll get back to you.