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






      Return a log lookup table useful for scaling images.


Calling Sequence

      lut = loglut(lo,hi)


      lo = image value to map to 0. in
      hi = image value to map to 255. in
        where lo GE 0, hi GT lo.

Keyword Parameters


        EXPONENT=ex Controls curvature of transformation (def=1).
          Use values in the range -15 to 15, 0 gives a straight
          line, <0 negative curvature.
        GLO=glo Min color to use: image value lo maps to glo.
          Default is 0.
        GHI=ghi Max color to use: image value hi maps to ghi.
          Default is top available color.
        /REVERSE means reverse color table.
        /ROUND means round lookup table values to nearest integer.


      lut = resulting lookup table. out

Common Blocks


      Note: image values beyond given lo and hi get clipped.
        Ex: let A be a 16 bit image with values ranging from
        850 to 12000. Assume the image values from 900 to
        2000 are to be scaled to 0 to 255 using a log curve.
        lut = loglut(900,2000,exp=1.5) ; Set up table.
        b = lut(a) ; Do scaling.

Modification History

      R. Sterner, 1998 Nov 6
      R. Sterner, 1998 Nov 10 --- Added /TOP.
      R. Sterner, 2010 Jun 07 --- Converted arrays from () to [].
  Copyright (C) 1998, 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.

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