Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Idl-pvware > Re: linear-spac...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 6 Topic 5458 of 6266
Post > Topic >>

Re: linear-space image converted to log-space

by jkj <kevin@[EMAIL PROTECTED] > Feb 23, 2008 at 07:33 PM

On Feb 23, 8:26 pm, "ben.bighair" <ben.bigh...@[EMAIL PROTECTED]
> wrote:
> On Feb 23, 5:45 pm, jkj <ke...@[EMAIL PROTECTED]
> wrote:
>
>
>
> > Hi,
>
> > I have a need to reproduce an image like this:
>
> >http://diamondhead.org/linear_logspace.png
>
> > beginning with data like this:
>
> >http://diamondhead.org/linear_linearspace.png
>
> > Using logarithmic scaling, the first image (produced by a custom
> > graphics package) expands lower frequency components while contracting
> > the higher frequency components.  To do this in object graphics, I
> > believe I will have to reconstruct the image data so that the lower
> > frequency [the bottom] information is replicated according to a log
> > scaling scheme.
>
> > I can think of some [tortured] ways to do this but keep thinking there
> > must be some sophisticated way to handle this in IDL.  Any thoughts
> > would be appreciated.
>
> > Thanks,
> > -Kevin
>
> Hi,
>
> I think I would use a flat filled IDLgrSurface that is projected as
> one might view an image - with a log scaled y axis.  Then use the
> TEXTURE_MAP property to show the image data.
>
> The example below uses XOBJVIEW to show the same image twice.  The
> bottom is "regular" and the top is stretched like in your example.
> Note that I had to stretch the second model so you can see the
> effect.  I can't recall at this late hour how to get better control of
> that, but it can be done much better.
>
> Ben
>
> **BEGIN
> rose = READ_IMAGE(FILEPATH('rose.jpg',
> SUBDIRECTORY=['examples','data']))
> dim = SIZE(rose,/DIM)
> nx = dim[1] & ny = dim[2]
> x = findgen(nx)+1
> y = findgen(ny)+1
> s = replicate(1,nx,ny)
>
> ;the first surface is "regular"
> o1 = OBJ_NEW("IDLgrSurface", s, x, y, $
>   color = [255,255,255], style = 2, $
>   texture_map = obj_new("IDLgrImage", rose))
> model_1 = OBJ_NEW("IDLgrModel")
> model_1->Add,o1
> model_1->Translate, 0, -ny/2. - 10, 0
>
> ;the second surface is log scale in y
> o2 = OBJ_NEW("IDLgrSurface", s, x, alog10(y), $
>   color = [255,255,255], style = 2, $
>   texture_map = obj_new("IDLgrImage", rose))
> model_2 = OBJ_NEW("IDLgrModel")
> model_2->Add,o2
> model_2->Scale, 1, 100, 1 ;<<<< cheat here to make effect big enough
> to see
> model_2->Translate, 0,ny/2. + 10, 0
>
> xobjview, [model_1, model_2] , /BLOCK
>
> OBJ_DESTROY, [model_1, model_2]
> **END

My hero! :-)

Very gracious of you - thanks!
-Kevin
 




 6 Posts in Topic:
linear-space image converted to log-space
jkj <kevin@[EMAIL PROT  2008-02-23 14:45:07 
Re: linear-space image converted to log-space
Vince Hradil <hradilv@  2008-02-23 15:32:02 
Re: linear-space image converted to log-space
jkj <kevin@[EMAIL PROT  2008-02-23 18:04:47 
Re: linear-space image converted to log-space
"ben.bighair" &  2008-02-23 18:26:12 
Re: linear-space image converted to log-space
jkj <kevin@[EMAIL PROT  2008-02-23 19:33:36 
Re: linear-space image converted to log-space
jkj <kevin@[EMAIL PROT  2008-02-23 20:46:31 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Oct 14 11:11:52 CDT 2008.