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

white balance problem for USB camera

asked 2018-05-30 14:20:23 -0500

mzWang gravatar image

Hi All,

I have an Orbbec Astra Pro camera and I can get the RGB image using libuvc_camera package. However, the RGB image I get doesn't look very good. You can see the image below. image description

It looks like there's one yellow layer on top of the image. I was told this is due to a bad white balance. I tried to enable the auto_white_balance setting in libuvc but it makes no difference. This is the launch file I ran:

<launch>
  <group ns="camera">
    <node pkg="libuvc_camera" type="camera_node" name="mycam">
      <!-- Parameters used to find the camera -->
      <param name="vendor" value="0x0"/>
      <param name="product" value="0x0"/>
      <param name="serial" value=""/>
      <!-- If the above parameters aren't unique, choose the first match: -->
      <param name="index" value="0"/>

      <!-- Image size and type -->
      <param name="width" value="640"/>
      <param name="height" value="480"/>
      <!-- choose whichever uncompressed format the camera supports: -->
      <param name="video_mode" value="uncompressed"/> <!-- or yuyv/nv12/mjpeg -->
      <param name="frame_rate" value="15"/>

      <param name="timestamp_method" value="start"/> <!-- start of frame -->
      <param name="camera_info_url" value="file:///tmp/cam.yaml"/>

      <param name="auto_exposure" value="3"/> <!-- use aperture_priority auto exposure -->
      <param name="auto_white_balance" value="true"/>
    </node>
  </group>
</launch>

Does anyone known how to solve this while balance problem with my astra pro camera? I'm running this on Ros-Kinetic with Ubuntu 16.04. Thanks!

edit retag flag offensive close merge delete

Comments

1

Hi! first step when messing is to make sure that the issue lays with ROS/libuvc driver and not the camera.

To do this, use whatever viewer/driver came with the orbtec camera. Also use guvcview (sudo apt install guvcview) and play with the settings.

psammut gravatar image psammut  ( 2018-05-30 15:45:01 -0500 )edit

Thank you! I think what you suggested makes sense. I used guvcview and tuned the white balance, the best result (lowest white balance temperature) I can get is not much better than what I have here. Does that mean this is a hardware problem?

mzWang gravatar image mzWang  ( 2018-05-30 17:05:17 -0500 )edit

BTW, I saw some other people can get a "whiter" image with Astra Pro. I have four of those cameras here but all of them have this "Yellow" image problem.

mzWang gravatar image mzWang  ( 2018-05-30 17:09:45 -0500 )edit

What happens if you use the astra_camera?

NEngelhard gravatar image NEngelhard  ( 2018-05-30 17:57:21 -0500 )edit

Hi NEngelHard, are you referring to the astra_camera package? Since I'm using Astra Pro, which has a separate uvc camera, I have to use libuvc to get the rgb image. With the astra_camera, I can only get the depth and ir image.

mzWang gravatar image mzWang  ( 2018-05-30 18:18:18 -0500 )edit

The astra_camera-package also supports rgb-streaming

NEngelhard gravatar image NEngelhard  ( 2018-05-31 01:27:34 -0500 )edit

Hi NEngelhard, can you give me more details? I tried to run "roslaunch astra_launch astrapro.launch" but no rgb topic was published. I read here that I a need a separate driver for RGB stream: https://answers.ros.org/question/2465...

mzWang gravatar image mzWang  ( 2018-05-31 10:47:50 -0500 )edit

I am using the Astra Mini S, I assumed that they behave the same, but it looks like I'm simply wrong :(

NEngelhard gravatar image NEngelhard  ( 2018-05-31 14:33:41 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-05-31 11:37:09 -0500

psammut gravatar image

This is a camera problem and not a ros driver issue. You can confirm this by using a dedicated viewer such as guvcview or the Orbbec Astra Pro's camera and seeing if the picture looks the same. If there is any check box or slider that relates to white balance, try messing with it. If it doesn't change anything, rest assured that that is the best you will get with that camera.

If you would like a better RGB image you should use a better dedicated RGB camera such as the logitech C920. Another slightly more pro and not much more expensive would be a USB3 color camera like this one: https://www.e-consystems.com/wide-tem...

Good luck!

PS. Always look for the more reasonable solution to the problem before committing endless hours to going into the rabbit hole that is messing with linux uvc drivers ;p

edit flag offensive delete link more

Comments

Thanks for the tips! :)

mzWang gravatar image mzWang  ( 2018-06-01 21:31:19 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2018-05-30 14:20:23 -0500

Seen: 1,680 times

Last updated: May 31 '18