Giter Site home page Giter Site logo

lingxiao1 / specularity-removal Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gmichaeljaison/specularity-removal

0.0 1.0 0.0 4.48 MB

Removing specularity in images captured from multiple view points

License: GNU General Public License v3.0

Python 100.00%

specularity-removal's Introduction

Specularity removal in multi-viewpoint images

The package is an open source utility to remove specularity in Images captured from multiple viewpoints.

Disclaimer

The method uses Homography to find the best pixels available in other viewpoint images which are specular-free. It works only for planar and textured objects.

Requirements:

  • Numpy
  • OpenCV

Works with both Python 2.7+ and Python 3+

Usage

The package is pip installable. The easiest way to install is by using pip.

$pip install specularity_removal

You can also download the git repo and install by running the below command.

$python setup.py

To use the specularity removal module in your code, follow the below sample snippet. It accepts an array of image path names. Some constraints are,

  • It should be in same order as the object is in real.
  • All the images should be of equal resolution.
  • Images should have enough textures.
  • It is faster if you pass the downscaled version of actual images.
import specularity_removal as sp

fnames = [
    'data/pshycology-book-1.jpg',
    'data/pshycology-book-2.jpg',
    'data/pshycology-book-3.jpg'
]
sp.remove_specularity(fnames)

Example 1

Using two input images

Calculus Book 1

Calculus Book 2

Output

Calculus Book 1

Calculus Book 2

Example 2

Using three input images

Calculus Book 1

Calculus Book 2

Calculus Book 2

Output

Calculus Book 2

Calculus Book 2

Calculus Book 2

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.