This is a ros driver package for Bumblebee xb3 stereocameras. This node receive images from camera and publish image topics and camera service info.
This package publishes the following topics
Here is an example on how to use xb3 package.
<launch> <!-- This is an arpua lauch file for starting up xb3. --> <group ns="/snr/scam"> <node name="xb3" pkg="xb3" type="xb3"> <remap from="/xb3_optical_frame" to="/atc/camera/xb3/left"/> </node> <param name="width" type="int" value="640" /> <param name="height" type="int" value="480" /> </group> </launch>
You can use the full camera resolution 1280x960 or 640x480.
If you change your resolution, remember to change also your calibration files.
You can use the following as a launch file to run stereo_image_proc for both baselines.
<group ns="/snr/scam/short"> <node name="stereoproc" pkg="stereo_image_proc" type="stereo_image_proc" args="_prefilter_size:=255 _prefilter_cap:=63 _correlation_window_size:=31 _min_disparity:=0 _disparity_range:=32 _uniqueness_ratio:=10 _texture_threshold:=100 _speckle_size:=400 _speckle_range:=15"> </node> </group> <group ns="/snr/scam/wide"> <node name="stereo_image_proc" pkg="stereo_image_proc" type="stereo_image_proc" args="_prefilter_size:=255 _prefilter_cap:=63 _correlation_window_size:=31 _min_disparity:=0 _disparity_range:=32 _uniqueness_ratio:=10 _texture_threshold:=100a _speckle_size:=400 _speckle_range:=15 __name:=xb3_wide_stereo_proc" /> </group>
Here is a brief description on what does each parameter from opencv block match stereo processing.
I take this description from the book: Learning OpenCV (page: 438:444).
There are three stages to the block-matching stereo correspondence algorithm.
prefilter_size (5, 255) (5x5, 21x21)
-Reduce lighting differences and to enhance image texture.
-The center pixel Ic under the window is replaced by min[max(Ic - I , Icap), Icap],
where I is the average value in the window and Icap is
a positive numeric limit whose default value is 30 (prefilter cap).
prefilter_cap (1, 63) (about 1/4 of image range (0-255))
-definition above (prefilter_size)
correlation_window_size (5, 255)
-With smaller windows the processing speed is much higher
-SAD matching window size. (5x5,...,21x21).
min_disparity (-128, 128)
-Minimum disparity (=0)
-Minimum value where the matching search will start
uniqueness_ratio (0, 100)
-The minimum margin in percents between the best (minimum) cost function value and
the second best value to accept the computed disparity.
texture_threshold (0, 100)
-Minimum value for texture to compute disparity.
-That is, if the sum of absolute values of x-derivatives
computed over SADWindowSize by SADWindowSize pixel neighborhood
is smaller than the parameter, no disparity is
computed at the pixel.
-The maximum area of speckles to remove (set to 0 to disable speckle filtering)
-Set a speckle detector over a speckle window to prevent speckles.