The package is an open source utility to remove specularity in Images captured from multiple viewpoints.
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.
- Numpy
- OpenCV
Works with both Python 2.7+ and Python 3+
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)