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.
Code:
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:
Code:
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.