Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.

  >  Docs Center  >  Libraries  >  Coyote  >  CLIPSCL






      This is a utility routine to perform linear scaling (similar to BYTSCL)
      on image arrays. If differs from BYTSCL only in that a user-specified
      percentage of pixels can be clipped from the image histogram, prior to
      scaling. By default, two percent of the pixels are clipped. Clipping
      occurs at both ends of the image histogram.


      David Fanning, Ph.D.
      1645 Sheely Drive
      Fort Collins, CO 80526 USA
      Phone: 970-221-0438
      E-mail: david@idlcoyote.com
      Coyote's Guide to IDL Programming: http://www.idlcoyote.com



Calling Sequence

      scaledImage = CLIPSCL(image, clipPercent)


      image: The image to be scaled. Written for 2D images, but arrays
                      of any size are treated alike.
      clipPercent: The percent of image clipping. Optional argument is set
                      to 2 by default. Must be value between 0 and 49. Clipping
                      occurs from both ends of image histogram, so a clip of 2
                      linearly scales approximately 96% of the image histogram.
                      Clipping percents are approximations only, and depend
                      entirely on the distribution of pixels in the image. For
                      interactive scaling, see cgStretch.

Input Keywords

      NEGATIVE: If set, the "negative" of the result is returned.
      OMAX: The output image is scaled between OMIN and OMAX. The
                      default value is 255.
      OMIN: The output image is scaled between OMIN and OMAX. The
                      default value is 0.

Output Keywords

      THRESHOLD: A two-element array containing the image thresholds for clipping.

Return Value

      scaledImage: The output, scaled into the range OMIN to OMAX. A byte array.

Common Blocks



      LoadCT, 0 ; Gray-scale colors.
      image = cgDemoData(22) ; Load image.
      TV, ClipScl(image, 4)


    Requires cgScaleVector from the Coyote Library:

Modification History

      Written by: David W. Fanning, 6 September 2007.
      Not sure what this program was doing, but not what I thought. I've reworked
          the algorithm to scale the data appropriately. 25 Oct 2011. DWF.

© 2018 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us