On Mon, 4 Dec 2006, David Fanning wrote:
> Folks,
>
> With no answers to my weekend questions about logarithmic
> color bars I'm flying blind this morning. And I seem to be
> running into theoretical difficulties. Can anyone help?
>
> Suppose I had a color table (color table 33 comes to mind)
> where each color vector had a min of 0 and a max 0f 255.
>
> IDL> Loadct, 33, /Silent
> IDL> TVLCT, r, g, b, /Get
> IDL> MinMax, r
> 0 255
> IDL> MinMax, g
> 0 255
> IDL> MinMax, b
> 0 255
>
> And suppose I also have an image that is scaled in
> the same way:
>
> IDL> image = Loaddata(7)
> IDL> MinMax, image
> 0 255
>
> And finally, suppose I have a way to scale such data
> sets in a logametric way, say a function LOGSCL.
>
> IDL> .compile LOGSCL
> Compiled module: LOGSCL.
>
> My hypothesis is that there are two ways to display this
> data "logarithmically". I can leave the color table vectors
> alone, and scale the image data. Or, I can leave the image
> alone and scale the color vectors. Either way should result
> in exactly the same display.
>
> The problem is, it doesn't. :-(
>
> Window, XSize=400, YSize=350, 0
> Loadct, 33, /Silent
> TVImage, image
>
> Window, XSize=400, YSize=350, 1
> Loadct, 33, /Silent
> TVImage, LogScl(image)
>
> Window, XSize=400, YSize=350, 2
> Loadct, 33, /Silent
> TVLCT, r, g, b, /Get
> TVLCT, LogScl(r), LogScl(g), LogScl(b)
> TVImage, image
>
> Does anyone have a good idea for why not?
>
> Cheers,
>
> David
>
> P.S. And please don't tell me there is something wrong
> with LOGSCL, as this is *not* the answer I want to
> hear. :-(
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
>
Probably log(0)=-inf plays a role in your experiment.
Does LOGSCL handle it?
regards,
lajos
|