[Documentation] [TitleIndex] [WordIndex

Note: This tutorial assumes that you have completed the previous tutorials: Connecting to an IEEE 1394 Camera, Setting Parameters Dynamically.
(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

How to Set IEEE 1394 Camera Bayer Parameters

Description: This tutorial explains how to set color decoding parameters for IEEE 1394 cameras with Bayer encoding.

Tutorial Level: BEGINNER

Next Tutorial: Configuring IEEE 1394 Camera Features

Overview

Many IIDC cameras provide color images in a Bayer encoding.

If your camera does not use Bayer color encoding, skip this tutorial and go on to Configuring IEEE 1394 Camera Features.

Preliminary Steps

Start the camera1394 driver, image_view, image_proc, and dynamic_reconfigure GUI as described in the previous Connecting to an IEEE 1394 Camera and Setting Parameters Dynamically tutorials.

To view the color images, view the image_proc color output using image_view:

$ rosrun image_view image_view image:=camera/image_color

Since we have not yet set the color decoding options, the image_proc window will log a warning that no color information is available.

That's OK at this point, we're about to fix it.

Bayer Decoding Options

For cameras of this type, set video_mode to an appropriate mono8 or mono16 value.

The driver provides two alternate mechanisms for decoding Bayer information:

In both cases the camera/image_raw image stream is compatible with the ROS image_pipeline. To start with, leave bayer_method set to the default.

Bayer Pattern Options

Once bayer_decoding is set, select the correct bayer_pattern for your camera. IIDC does not provide any way for the camera driver to discover the correct pattern automatically. The technical manual for the camera will list the correct pattern, or you can discover it experimentally.

Possible bayer_pattern values are: "" (no Bayer encoding), "rggb" , "gbrg" , "grbg", and "bggr".

If you're not sure what value to use, try them all one at a time while viewing the image_color window. Incorrect patterns will cause strange colors to appear. The correct one shows a valid color image.

Setting Other Features

Now continue with the Configuring IEEE 1394 Camera Features tutorial.


2019-12-07 12:28