GithubHelp home page GithubHelp logo

yuhsienchiang / semi-global-matching Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 25.93 MB

Stereo disparity estimation by Normalized Cross Correlation, SGM algorithms, and performance optimization.

Python 0.87% Jupyter Notebook 99.13%
computer-vision normalized-cross-correlation semi-global-matching

semi-global-matching's Introduction

Stereo Disparity: Semi-Global-Matching and Normalized Cross-Correlation

Stereo matching is the problem of finding correspondences between two images that are taken simultaneously from two cameras that are mounted so that they are parallel and separated along their x-axis. The output of stereo matching is a disparity image that, for every pixel in the left image (x), indicates how many pixels to the left its correspondence (xโ€™) is in the right image, giving the disparity (x-xโ€™).

The primary objective of this project is to address the stereo disparity problem by integrating the Normalized Cross-Correlation (NCC) algorithm with the Semi-Global Matching (SGM) algorithm. In addition to this integration, this project focuses on optimising the performance of these algorithms.

One aspect of optimisation involves re-formulating the NCC function for improved efficiency. Furthermore, I implement caching mechanisms to store reused data, thereby reducing computational overhead. For accelerating the SGM algorithm, I employ tensor operations in NumPy rather than conventional pixel-by-pixel iteration. This approach significantly enhances the computational efficiency of the algorithm.

Results

Left Image Right Image
Original
NCC Disparity
SGM Disparity

Runtime Improvement

Standard NCC Accelerated NCC
Runtime 517.14 (s) 255.15 (s)

Usage

The main code is in semi_global_match.ipynb

Dependencies

The project uses python==3.12.2, and the dependencies can be installed by running:

pip install -r requirements.txt

Credits

  • Yu Hsien Chiang, Thomas Chen

References

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.