>  Docs Center  >  Libraries  >  Coyote  >  CLIPSCL
Libraries

CLIPSCL

CLIPSCL

Name


      CLIPSCL

Purpose



      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.

Author



      FANNING SOFTWARE CONSULTING
      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

Category



      Utilities

Calling Sequence



      scaledImage = CLIPSCL(image, clipPercent)

Arguments



      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 XSTRETCH.

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


      None.

Examples



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

Restrictions



    Requires SCALE_VECTOR from the Coyote Library:
        http://www.idlcoyote.com/programs/scale_vector.pro

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.



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us