Friday, April 20, 2012
Contrast enhancement is a useful tool so I thought I'd do a simple illustration of the procedure involved. Below is a Mathcad function, contrast(img,lbnd,ubnd), that I wrote for this purpose. One just needs to specify which image to enhance and give the upper and lower bounds of the pixel values. The function then stretches these bounds to fit within the 0 - 255 range of values allowed for an image. image histogram can be used to select the upper and lower bounds. In the histogram below the right peak was produced by pixels from the Sun's disk and the left from the surrounding area so it is easy to select the bounding values.