GithubHelp home page GithubHelp logo

peterzs / depth-aware-motion-deblurring Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kahlertfr/depth-aware-motion-deblurring

0.0 0.0 0.0 4.07 MB

Mirror from https://square-src.de/gitlab/franzi/study-thesis. This is my study thesis - a reference implementation of the depth-aware motion deblurring algorithm by Xu and Jia.

CMake 2.82% C++ 97.18%

depth-aware-motion-deblurring's Introduction

Study Thesis

My study thesis (Belegarbeit) in computer vision based on the paper "Depth-Aware Motion Deblurring" of Xu and Jia.

They use spatially-varying point spread functions to deblur the image depending on the depth layer. The results can be found here: website.

conclusion: It wasn't possible to reconstruct the results from the paper. :( The estimated PSFs are too blurry. The second pass isn't possible because the disparity map ins't refined but downgraded.

Structure of the code

motion-deblurring contains the depth-aware motion deblurring algorithm together with the a disparity estimation, region tree and edge map implementation. The top-level PSF estimation isn't working (see used two-phase kernel estimation) so there is a work-around. And the mid-level PSF estimation produces very blurry kernel.

two-phase-kernel This code isn't finished! Until now it contains the first phase of the two phase kernel estimation. This algorithm would be used for the top-level PSF estimation.

utils contains useful matlab conversion like conv2, the deconvolution with FFT and the spatial deconvolution from Levin and an implementation of the coherence shock filter from Weickert.

tools provides small programs to use same parts of the motion-deblurring algorithm like convolution, deconvolution and other to show their correctness.

external contains the source code for the match disparity algorithm from Kolmogorov which is slightly changed to fit my needs to work with OpenCV (the image data can be copied directly from OpenCV to the match algorithm).

Building

You can build all components from the toplevel following the next steps.

Requirements

CMake configuration

CMake is the used build tool. Use an additional build folder to have clean source folders.

# create a build directory (all CMake Files will be saved there)
mkdir build
cd build

# Create a build configuration
# CMAKE_BUILD_TYPE= Release for disabling output (doesn't show/save images ...)
cmake -D CMAKE_BUILD_TYPE=Release ..

# use make for building all make targets or specify the needed target
make

Make targets

motion-deblurring

This is the main algorithm. Some tasks can be done in parallel so the number of threads can be specified.

make motion-deblurring

# Executable can be found in build/bin
# the default values can be used together with the mouse images
bin/motion-deblurring ../images/mouse-left.jpg ../images/mouse-right.jpg [--psf-width <n>] [--layers <n>] [--threads <n>] [--max-top-nodes <n>] [--max-disparity <n>] [--fft/--irls] [--help]

Work-around for missing top-level psf estimation: top-level kernels will be loaded instead of computed. So use the sample top-level kernels - place them in the folder where you starts the algorithm.

Literature on Motion Deblurring

Books

  • A. N. Rajagopalan, Rama Chellappa - Motion Deblurring: Algorithms and Systems (ISBN 9781107044364)

Paper (sorted by relevance)

Main Referemces of "Depth-Aware Motion Deblurring"

Additional Papers

depth-aware-motion-deblurring's People

Contributors

alessandro-gentilini avatar kahlertl avatar kruegerfr avatar

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.