Image enhancement with histogram stretching in Actionscript
Yesterday’s update to the CleVR Stitcher has a number of new features. One of these is image enhancement for the finished panorama. This corrects under- or over-exposed images, and works in a similar way to “Auto levels” in Photoshop, or Enhance in iPhoto. See below for more details and a demo.
This is called histogram stretching, and works by finding the lightest and darkest parts of the image and then “stretching” all of the colours so that the lightest part is white, the darkest is black, and all the others are distributed evenly between those. I’ve added a slider that allows you to set the threshold for this, which basically sets a minimum number of pixels that are required for it to count as the lightest or darkest area. You can adjust the slider to get the best results. There’s a little demo version below. Install the Stitcher below if you want to try the whole thing.
I’ve added the Histogram class to the other code that we’ve released, and bundled it all up as a library. You can get it from here: CleVR Actionscript Library. The class calculates a histogram for a bitmap image, and generates ColorMatrixFilters and ColorTransforms that can be used to correct the images.


July 31st, 2007 at 2:31 pm GMT
Hi, this would be fantastically useful for what I’m working on right now… the link above is broken, though!
July 31st, 2007 at 2:55 pm GMT
Which link? The link to as3-clevrlib.zip seems to be working for me.
November 28th, 2011 at 1:13 pm GMT
clinica para bajar de peso…
[...]CleVR » Panoramic photography and image stitching blog » Blog Archive » Image enhancement with histogram stretching in Actionscript[...]…