VisionWorks Toolkit Reference

September 29, 2015 | 1.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Stereo Matching Demo App

Stereo Matching Demo user guide.

Introduction

nvx_demo_stereo_matching is a simple stereo matching demo that uses Semi-Global Matching algorithm to evaluate disparity. It performs color conversion and downscaling prior to evaluating stereo for better quality and performance. The input images are expected to be undistorted and rectified.

The pipeline can be illustrated by the following diagram:

      (left frame)              (right frame)
           |                          |
      [ScaleImage] (down)        [ScaleImage] (down)
           |                          |
     [ColorConvert] (to gray)   [ColorConvert] (to gray)
           |                          |
           +---------+     +----------+
                     |     |
               [SemiGlobalMatching]
                        |
                  [ConvertDepth] (to 8-bit)
                        |
                   [ScaleImage] (up)
                        |
                    [Multiply]
                        |
                 (disparity image)

In the second step, the demo converts the disparity image into color output using the following pipeline:

                 (disparity image)
                         |
      +------------------+------------------+
      |                  |                  |
[TableLookup]      [TableLookup]      [TableLookup]
      |                  |                  |
(Red Channel)      (Blue Channel)    (Green Channel)
      |                  |                  |
      +------------------+------------------+
                         |
                 [ChannelCombine]
                         |
                  (output image)

Color output is created using linear conversion of disparity values from [0..ndisp) interval into the HSV color space, where the smallest disparity (far objects) corresponds to [H=240, S=1, V=1] (blue color) and the largest disparity (near objects) corresponds to [H=0, S=1, V=1] (red color). The resulting HSV value is then converted to RGB color space for visualization.

nvx_demo_stereo_matching is installed in the following directory:

/usr/share/visionworks/sources/demos/stereo_matching

For the steps to build sample applications, see the Samples and Demos section for your OS.

Executing the Stereo Matching Demo

./nvx_demo_stereo_matching [options]

Command Line Options

This topic provides a list of supported options and the values they consume.

-s, --source

Note
On Vibrante V3Le, V4L platforms hardware accelerated video playback is supported for H.264 elementary streams only.
The V4L platform has a permissions issue. If input data are an H.264 elementary stream, hardware decoder is used and sample must be executed with super user permissions, i.e., with sudo.

-c, --config

-h, --help

Operational Keys