Giter VIP home page Giter VIP logo

sparse-inpainting's Introduction

Image Inpainting via Sparse Reconstruction

This code is submission for assginment 1 for the course EE698K: Modeling and Representation Techiques for Images.


  • ./code/src: contains all of the source files, which are
    • irls.cxx and omp.cxx : Function Implementation for IRLS and OMP
    • sparse_inpainting.cxx : Sparse reconstruction based Inpainting implementation.
    • main.cxx : The main driver code for the program
    • create_mask.cxx : OpenCv based program that lets you create masks on custom images.
  • ./code/include: contains the corresponding header files.
  • ./tools/ : contains various python scripts.
    • makegrey.py : Take images stored in ./images/color/ and creates their corresponding grayscale images and stores them in ./images/gray
    • samplepatch.py : Takes the images stored in ./images/gray, randomly samples 256 different 8x8 patches and stores them in ./images/dictionary/ in a numbered fashion. It also creats an image ./images/dictionary/dictionary.png whoes columns are the 8x8 patches vectorized.
    • makemosaic.py : Takes the images produced from the previous script and generates ./images/dictionary/dictionary128.png and ./images/dictionary/dictionary256.png which have 16x8 and 16x16, 8x8 original patches as their elements.
    • assessquality.py : Runs the NIQE assessment on the images inside the ./images/results folder and displays the results on terminal.

  • Requirements

    • python, g++
    • OpenCV
    • skimage, numpy, scipy
  • To Compile
    From the root folder run the following commands

    • mkdir build
    • cd build
    • cmake ..
    • make
  • To Create Mask

    • ./create_mask PATH_TO_IMAGE
      In PATH_TO_IMAGE specify the locaiton of source image. Draw using a continuous line.
      As of now the limitation on this part is that the mask being drawn has to begin and end close by on the image. This is dut to the fact that I have stored the mask as contrours first.
  • To Run Sparse Inpaint

    • ./sparse_inpaint METHOD VALUE DICT_SIZE
      METHOD = IRLS or OMP
      VALUE = epsilon for IRLS and spasity for OMP
      DICT_SIZE = 128 or 256
      This will start displaying three images, which are: the current selected patch, the proposed edited patch and the state of the modified image at present. This will also store the results in a directory ./images/results/

sparse-inpainting's People

Contributors

harshsinh avatar

Stargazers

 avatar

Watchers

 avatar  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.