Git Product home page Git Product logo

sgm's Introduction

SPS-Stereo: Slanted Plane Smoothing Stereo

SPS-Stereo is a dense stereo method employing a slanted plane model. It jointly estimates a superpixel segmentation, boundry labels (such as occlusion boundaries), and a dense depth estimate from a pair of stereo images.

Citation

@inproceedings{Yamaguchi14,
author = {Koichiro Yamaguchi and David McAllester and Raquel Urtasun},
title = {Efficient Joint Segmentation, Occlusion Labeling, Stereo and Flow Estimation},
booktitle = {ECCV},
year = {2014}
}

Building SPS-Stereo

  1. Prerequisites
  2. Building CPU Version
    1. type 'cmake .'
    2. type 'make'
  3. Building GPU Version
    1. type './build.sh' or 'make'

Usage of demo code

First, download KITTI stereo/flow dataset from KITTI Vision Benchmark Suite homepage and extract it.

Run SPS-Stereo
> ./spsstereo data_stereo_flow/training/image_0/000000_10.png data_stereo_flow/training/image_1/000000_10.png

Outputs

  • 000000_10_disp.png
    Disparity image (PNG 16bit grayscale format)
    (Disparity value) = (Pixel value)/256.0

  • 000000_10L_seg.png
    Segmentation image (PNG 16bit grayscale format)
    (Segment ID) = (Pixel value)

  • 000000_10L_plane.png
    Estimated disparity planes
    the number of lines = the number of segments
    Each line includes parameters of disparity plane of a segment: (A_i, B_i, C_i)

  • 000000_10L_label.txt
    Boundary labeling result
    the number of lines = the number of boundaries
    Each line includes three entries: SegmentID1 SegmentID2 boundary_label
    boundary_label: 0 (Occlusion, SegmentID1 is front), 1 (Occlusion, SegmentID2 is front), 2 (Hinge), 3 (Coplanar)

  • 000000_10L_boundary.png
    Visualization of segmentation result
    Boundary color means a type of relationship between neighboring segments: Red/Blue-Occluion (Red side is front), Green-Hinge, Gray- Coplaner

Exmaples

Teddy Car
Left
Right
SGM_disparity
SPS_disparity
ground_truth NA

Notice

  1. In the GPU version, the width or height of the input images can't be larger than 1024.
  2. Change DISPARITY_TOTAL to set maximum disparity.
  3. Change CONSISTENCY_THRESHOLD to set constraint for left and right consistency.

Running time comparison

Setting the maximum disparity to 128, GPU version is about 5 times faster than CPU version, as shown in the table below.

Image Size GPU Version CPU Version
640*480 0.12s 0.50s
450*435 0.06s 0.30s
433*381 0.06s 0.30s

License

SPS-Stereo is licensed under the GNU General Public License Version 3 (GPLv3), see http://www.gnu.org/licenses/gpl.html.

sgm's People

Stargazers

 avatar  avatar TyFang-CV avatar  avatar  avatar

Watchers

 avatar

Forkers

lizhaodong

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.