Feature request: Histogram Matching

Jul 7, 2013 at 6:24 PM
I first use Image Magick to auto-rotate my scanned images, then I realized that I can do much more whit it. I was trying to process Landsat Satellite images and it worked.

Basic Landsat 8 Pansharpening workflow:
  1. combine three Landsat bands (usually 2,3,4) to RGB image
  2. change the Color Space to LAB(or a similar one, with one channel representing light(gray) values)
  3. scale image to 200%
  4. separate channels
  5. replace the Lightness channel with the Landsat Panchromatic Band (in Landsat 8 it’s Band 8)
  6. recombine channels to previous Color Space
  7. change the Color Space back to RGB
Consequence: The final product resolution is 15m, the original was 30m.

Due to the different sensor and/or spectral characteristic of the bands (the panchromatic band tend to be a bit darker) it is suggested to do a histogram match between Lightness channel and Band 8 in step 5.

In Landsat 7 the difference was so big that it was nearly impossible to reproduce the original RGB image. In Landsat 8 the difference is much smaller so a simple histogram match can reproduce the original image with just a little shift in the overall colors. (no more need to hire a magician to do some “Magick”)

I found a script already doing this in the Image Magick shell version:
http://www.fmwconcepts.com/imagemagick/histmatch/index.php

I would be great if this function is implemented in Magick.NET but I don’t know how useful it would be in general image processing tasks.
Coordinator
Jul 7, 2013 at 6:55 PM
Maybe you should create a MagickScript file for this operation? You can find information about MagickScript here: https://magick.codeplex.com/wikipage?title=MagickScript&referringTitle=Documentation. I am thinking about including some default scripts in Magick.NET and this could be one of them. It might be possible that you cannot perform all the actions at this moment. If you can tell me what is not possible at this moment I will try to make it possible :) Feel free to contact me trough codeplex if you want to.
Jul 8, 2013 at 1:24 AM
I don't realize that it can be done with scripts. I will try it. Thanks!