Code Monkey home page Code Monkey logo

disparity-map-using-ssd-and-dynamic-programming's Introduction

Stereo-Map-Using-SSD-and-Dynamic-Programming

Overview

The objective of this project is to compute the stereo map from the stereo pair of two scan-line aligned images (tsukuba_l.png and tsukuba_r.png) compute the disparity map of the stereo pair.

Two methods to achieve this are :

  1. Sum of Squared Differences (SSD) as a patch similarity measure with a fixed window.

  2. Improving the baseline obtained from SSD matching using Dynamic Programming.

Dependencies

  1. MATLAB R2017b

MATLAB R2017b can be dowloaded from the link.

Input Images

Below are the two stereo pair images on which the system evaluation has been done.

Left image

Right image

Pipeline and Output

Sum of Squared Differences (SSD) Approach

The MATLAB code for this part is in file ssd.m. Window should be large enough to have sufficient intensity variation, yet small enough to contain only pixels with about the same disparity. There is always an trade off between them. Window size was chosen to be 11x11 for simple block matching. Image map was not smooth with 7x7 window. As obvious the lamp is the front most part in the image,so its disparity is highest, Since disparity is inversely proportional to depth in the image. The code will give output as below :

SSD output

SSD with Dynamic Programming

This technique improves the accuracy of the disparity map by taking into account the disparities of neighboring pixels Dynamic Programming basically introduces a smoothness constraint.

DP output

Note

Note: The code given here gives the output as greyscale image. To see the color map please reset the All Axes Colormaps from Colormap editor menu. The menu will be opened along with the output grayscale map after code is executed

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.