ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

uvc_camera applies max values for brightness and contrast

asked 2013-04-12 04:11:12 -0600

updated 2013-04-14 20:12:00 -0600

I have been using uvc_camera to capture image streams in ROS before. It has changed its behavior recently and I can't figure out why or how to revert it.

When opening my capture device, rosrun uvc_camera camera_node _device:=/dev/video1, it will print out its parameters as usual. The parameters of interest are:

  int (Brightness, 0, id = 980900): -16 to 16 (1)
  int (Contrast, 0, id = 980901): 1 to 32 (1)

Looking at the stream with rosrun image_view image_view image:=image_raw shows an image that is by far too white, contradicting the zero values for both brightness and contrast. Looking at the camera device, after turning of the uvc_camera node, with guvcview shows that the Brightness and Contrast parameters are set to their max values, 16 and 32, respectively.

Using the same application, guvcview, I can revert the parameters to their default values. However, when turning on the uvc_camera node again, the image will again be too white.

As I mentioned, I have used uvc_camera before on the same and other webcams. The faulty behavior does not change when changing webcams.

I am stuck here, any suggestions on how to get a proper image stream are more than welcome.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2013-04-14 21:48:25 -0600

My current workaround is to use gscam: "http://ros.org/wiki/gscam". It does not provide an easy configuration of device and settings, but it at least doesn't apply incorrect settings.

edit flag offensive delete link more
2

answered 2014-03-09 20:59:25 -0600

Girts L gravatar image

I was trying uvc_camera with my cheap webcam, but the images came out all white. After that, until plugged out and in again the webcam was outputting white even with usb_cam. You mentioned that it might be messing with parameters. And indeed, uvc_cam.cpp has like 15 hardcoded calls to set various parameters my webcam has probably never heard about. So, I commented out all those calls and it worked!

edit flag offensive delete link more

Comments

Nice, good that you share. I'm currently not working with webcam anymore, but I'll keep this in mind.

RafBerkvens gravatar image RafBerkvens  ( 2014-03-09 21:31:50 -0600 )edit

Hi, I'm experiencing the same effects using uvc_camera on Hydro. Looking for uvc_cam.cpp I can't find it. Any suggestions ?

hvn gravatar image hvn  ( 2014-06-25 05:25:47 -0600 )edit

Ok, thank you. I found the hardcoded settings, but how should I proceed from here ?

hvn gravatar image hvn  ( 2014-06-25 08:56:57 -0600 )edit

Well, what I did was stop using uvc_camera and start using gscam.

RafBerkvens gravatar image RafBerkvens  ( 2014-06-25 09:52:36 -0600 )edit

Ok, I used gscam before and that didn't work out for me. So I started using uvc_camera although I'm using Hydro not Groovy

hvn gravatar image hvn  ( 2014-06-25 10:18:07 -0600 )edit
1

I've removed the hardcoded values. Now it'll just use whatever defaults the camera provides. If your camera is USB Video Class compliant (most webcams are), you should try http://wiki.ros.org/libuvc_camera , which is my replacement for uvc_camera.

Ken gravatar image Ken  ( 2014-06-26 11:17:13 -0600 )edit

Question Tools

Stats

Asked: 2013-04-12 04:11:12 -0600

Seen: 706 times

Last updated: Mar 09 '14