A CUDA implementation of Segmentation SGM
Segmentation SGM is an implementation of segmentation algorithm that utilizes Semi-Global Matching.
From a given disparity map, it extracts segments that cover obstacles. It is implemented using C++ and CUDA.
- The detailed algorithm is here (currently Japanese only).
- CUDA
- OpenCV 3.0 or later
- CMake 3.10 or later
$ git clone https://github.com/fixstars/segmentation-sgm.git
$ cd segmentation-sgm
$ mkdir build
$ cd build
$ cmake ..
$ make
If you have installed libSGM, you can run sample/movie_with_libsgm
and sample/benchmark
by following command.
cmake -DWITH_LIBSGM=ON -DDCMAKE_MODULE_PATH=path/to/libSGM -DCMAKE_INSTALL_PREFIX=path/to/libSGM ..
./segmentation_sgm_sample_movie left-image-format right-image-format camera.xml
- left-image-format
- the left image sequence
- right-image-format
- the right image sequence
- camera.xml
- the camera intrinsic and extrinsic parameters
./segmentation_sgm_sample_movie img_c0_%09d.pgm img_c1_%09d.pgm daimler_gt_stixel.xml
The sample images available at Daimler Urban Scene Segmentation Benchmark Dataset 2014 and Daimler Ground Truth Stixel Dataset are used to test the software.
The Segmentation SGM performance obtained from benchmark sample
Device \ Width x Height x Max Disparity | 1024 x 440 x 64 | 1024 x 440 x 128 |
---|---|---|
Tegra X2 | 16 [ms] (64FPS) | 23[ms] (44FPS) |
The "SGM Team"
Fixstars Corporation
Apache License 2.0