Changing camera settings on the Microsoft Lifecam in code

When instantiating the cameraServer, I tried to set the resolution of the camera and other aspects, to no effect. The CameraStream Viewer on the SmartDashboard doesn’t seem to change in accordance to my code.
Note: I am using the Microsoft Lifecam HD-3000 and Java.

public void cameraInit(){
            serverOne = CameraServer.getInstance();
        //serverOne.startAutomaticCapture();
        //serverOne.startAutomaticCapture(0);
        camera = serverOne.startAutomaticCapture(0);
        camera.setResolution(RobotMap.IMG_WIDTH, RobotMap.IMG_HEIGHT);
        camera.setBrightness(50);
        camera.setExposureManual(50); 

    }

The errors that appear in the driver station are as follows:

  ERROR: ioctl VIDIOC_S_FMT failed at UsbCameraImpl.cpp:756: Device or resource busy (UsbUtil.cpp:122) 
    WARNING: USB Camera 0: could not set format 1 res 320x240 (UsbCameraImpl.cpp:758) 
    ERROR: ioctl VIDIOC_S_FMT failed at UsbCameraImpl.cpp:756: Device or resource busy (UsbUtil.cpp:122) 
    WARNING: USB Camera 0: could not set format 1 res 320x240 (UsbCameraImpl.cpp:758) 
    ERROR: ioctl VIDIOC_S_PARM failed at UsbCameraImpl.cpp:777: Device or resource busy (UsbUtil.cpp:122) 
    WARNING: USB Camera 0: could not set FPS to 30 (UsbCameraImpl.cpp:778) 

How I’m accessing the method is through a Vision subsystem, in which I set a certain command as a default command to run that method through the initialize() method.

Another question I have was whether or not to use OpenCV to change the camera settings on the image such as brightness and exposure.
Any help is appreciated.

If you notice, your errors all include “Device or resource busy”. This can occur if you are using settings that are too high for USB to support (especially with multiple cameras).

Was this ever resolved? I’m trying to figure out how I can turn down the MS LifeCam 3000 camera’s brightness. We are using Red and Blue Ring LED lights (together) to make a purple light. However, GRIP is seeing it as white since it is so bright.

I found that a parameter in the range of 10-20 to setBrightness() works well.