https://github.com/rossgoodwin/hmap
Image histogram remapping
https://github.com/rossgoodwin/hmap
Last synced: 21 days 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 (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2019-11-04T06:19:32.000Z (over 5 years ago)
- Last Synced: 2024-08-01T19:55:15.425Z (9 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:

Target Image:

Result:

*Photographs by Ansel Adams*
hmap_c.py
=========Color Source Image:

Color Target Image:

Result:

*Photographs by Steve McCurry*