Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rossgoodwin/hmap
Image histogram remapping
https://github.com/rossgoodwin/hmap
Last synced: about 1 month ago
JSON representation
Image histogram remapping
- Host: GitHub
- URL: https://github.com/rossgoodwin/hmap
- Owner: rossgoodwin
- License: other
- Created: 2014-06-08T01:14:49.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2019-11-04T06:19:32.000Z (about 5 years ago)
- Last Synced: 2024-08-01T19:55:15.425Z (4 months ago)
- Language: Python
- Homepage: http://rossgoodwin.com/hmap
- Size: 3.16 MB
- Stars: 212
- Watchers: 9
- Forks: 25
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-python-resources - GitHub
README
Hmap
====An image histogram remapping script written in Python 2.7 by [Anthony Kesich](http://kesi.ch) and [Ross Goodwin](http://rossgoodwin.com). Changes source image so that source image's histogram matches target image's histogram. Requires PIL/Pillow:
$ sudo pip install Pillow
To run Hmap, cd into the directory where hmap.py (for black and white images) or hmap_c.py (for color images) is located. Ensure source and target images have the same height and width dimensions (in pixels), and place them in the directory. Run the script with 2 additional arguments (source and target image files) as shown in the following example.
Example:
$ python hmap_c.py source_image.jpg target_image.jpg
hmap.py
=======Source Image:
![Source Image](http://imgur.com/MGCUWZo.jpg "Source Image")
Target Image:
![Target Image](http://imgur.com/vuGrjAY.jpg "Target Image")
Result:
![Result](http://imgur.com/KavoDjf.jpg "Result")
*Photographs by Ansel Adams*
hmap_c.py
=========Color Source Image:
![Color Source Image](http://imgur.com/2KzkN8p.jpg "Color Source Image")
Color Target Image:
![Target Image](http://imgur.com/VyaVBkQ.jpg "Target Image")
Result:
![Result](http://imgur.com/kiNBR57.jpg "Result")
*Photographs by Steve McCurry*