>  Docs Center  >  Libraries  >  JHU/APL/S1R  >  IMG_SCALE
Libraries

IMG_SCALE

IMG_SCALE

Name


      IMG_SCALE

Purpose


      Scale given image for display.

Category


Calling Sequence


      out = img_scale(in,sc,par)

Inputs


      in = Input image (2-d or 3-d). in
      sc = scaling option (0 to n). in
        0: No scaling.
        1: Scale to image min/max: bytscl(img).
        2: Scale to specified min/max: scalearray(v,mn,mx)
        3: Percentile scaling: ls(img,lo,hi)
        4: Variance scaling: bytscl(varf(img,wid)<thresh)
        5: Unsharp masking: ls(img-wt*smooth(img,wid),lo,hi)
        6: Interactive scaling. BYT, INT, UNIT images only.
        7: Apply scaling from last interactive.
      par = Parameter structure. in
        Depends on scaling option (values shown are defaults):
        0: Not used.
        1: Not used.
        2: {min:min, max:max}
        3: {lo:min, hi:max, nbins:2000, quiet:0}
        4: {width:3, thresh:100}
        5: {wt:0.5, width:5, lo:1, hi:1, nbins:2000, quiet:0}
        6: Returned with scaling info.
        7: Send returned structure from option 6.

Keyword Parameters


Keywords


        ERROR=err Error flag: 0=ok.

Outputs


Common Blocks


Notes


      Note: make sure the correct tag names are used in the
        par structure, no checking is done. Any or all missing
        parameter values are defaulted.
     
        Also note that color images are split into Hue, Saturation,
        and Value. Scaling is applied to Value which ranges from
        0 to 1. So use values appropriate for that range.

Modification History


      R. Sterner, 2003 Jul 08
      R. Sterner, 2003 Sep 23 --- Added error flag. Also fixed opt 7.
  Copyright (C) 2003, Johns Hopkins University/Applied Physics Laboratory
  This software may be used, copied, or redistributed as long as it is not
  sold and this copyright notice is reproduced on each copy made. This
  routine is provided as is without any express or implied warranties
  whatsoever. Other limitations apply as described in the file disclaimer.txt.



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