Skip to content

ImageProcessing-ElectronicPublications/patchmatch_inpainting

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PatchMatch for inpainting

Introduction

This repository borrows most of the code from younesse-cv. However that repository is C style, which cannot be compiled using opencv 3.x. What I did is wrapping the code using opencv 3.x API in C++ style. Thanks zvezdochiot for suggestion.

Dependencies

  • cmake > 2.8
  • opencv 3.x
  • g++-4.7

How to use

  • Download this repository

    git clone https://github.com/ZQPei/patchmatch_inpainting.git
  • Compile

    mkdir build
    cd build
    cmake ..
    make
    cd ..
  • Run
    As what does in run.sh.

    for i in 0 1 2; do
      ./build/patchmatch image_files/inpainting/image/image_0000$i.png \
                         image_files/inpainting/mask/mask_0000$i.png \
                         image_files/inpainting/output/output_0000$i.png \
                         image_files/inpainting/metrics.log \
                         $i;
    done

    Or simple:

      ./build/patchmatch image_files/forest/forest.bmp \
                         image_files/forest/forest_mask.png \
                         image_files/forest/forest_inpaint.png

Demo

mask masked image inpainting image using PatchMatch origin image

See all demo for PatchMatch for inpainting

References

https://github.com/younesse-cv/PatchMatch

About

Implention of PatchMatch for image inpainting in cpp

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 89.3%
  • C 7.6%
  • CMake 2.1%
  • Shell 1.0%