CS6825: Computer Vision word cloud

Contrast Stretching

    Low contrast images can result from poor illumination, lack of dynamic range in the image sensor, or wrong setting of the lens aperture.  The result of a low contrast image is that not all of the possible grey level range is used and possibly only a relatively small part of the possible grey level range is used.  By too small,  it is meant that the range of grey levels used in the image out of the possible that could be used is not large enough to clearly capture the detail and variation in the original scene.

 

Original Constrast Stretched
Original Constrast Stretched

 

     Contrast stretching, will take an image and produce another image that uses more of the possible grey levels.  For example, you may have an image with 256 possible grey levels that only uses grey levels from 0 to 120.  You can use contrast stretching to produce an image that uses all 256 possible grey levels, and thus “stretches” the range of grey levels.

 

      The act of contrast stretching can be describe by a mapping or transformation of original to final grey levels.  For example. a typical transformation involves choosing 2 grey level correspondences and “stretching” between those values as discussed below and illustrated by the diagram.


Example Contrast Stretching:

 

Suppose we designate a grey level in the original image by orgin j and a grey level in the final contrast stretched image as final j.   Suppose that we have a possible of 256 grey levels and we set up the following two original/final grey level correspondences to stretch between:

                      p1 =  (orig 10,  final 50)  and  
                    p2 = (orig 40, final 170)

 

Then, the contrast stretch mapping/transformation is described by the following diagram:

 contrast stretch

     

  For consistency,  the orig value of p1 <= orig value of p2  and  final value of p1 <= final value of p2.   

                        

                               

 

   

 

© Lynne Grewe