Skip to content
Image histogram remapping
Python
Branch: master
Clone or download

Latest commit

Catacola Update README.md
Fixed my website
Latest commit 50450a5 Nov 4, 2019

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE added license Jun 9, 2014
README.md Update README.md Nov 4, 2019
bw_src.jpg added color image files Jun 9, 2014
bw_tgt.jpg added color image files Jun 9, 2014
color_src.jpg changed example images Jun 13, 2014
color_tgt.jpg changed example images Jun 13, 2014
hmap.py fixed part that was throwing errors for some images Jun 12, 2014
hmap_c.py fixed part that was throwing errors for some images Jun 12, 2014

README.md

Hmap

An image histogram remapping script written in Python 2.7 by Anthony Kesich and Ross Goodwin. 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

Target Image:

Target Image

Result:

Result

Photographs by Ansel Adams

hmap_c.py

Color Source Image:

Color Source Image

Color Target Image:

Target Image

Result:

Result

Photographs by Steve McCurry

You can’t perform that action at this time.