comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: I have committed a sin CONGRID
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: I have committed a sin CONGRID [message #28380] Thu, 06 December 2001 07:35
dmarshall is currently offline  dmarshall
Messages: 23
Registered: December 1997
Junior Member
Jaco, yes, you are right.
I thought I was wrong but I was wrong about being wrong
hoo boy
Thanks for setting me straight.
This little test will let me sleep now.
The [1,*,*] plane remains 0's.
Dave.
---------
pro congridtest

RGBimage=intarr(3,10,10)
RGBimage[0,*,*]=3
RGBimage[2,*,*]=5
RGBimage[1,*,*]=0
print, RGBimage[0,*,*]
print, RGBimage[2,*,*]
print, RGBimage[1,*,*]

RGBimage=CONGRID(RGBimage,3,13,13)

print, RGBimage[0,*,*]
print, RGBimage[2,*,*]
print, RGBimage[1,*,*]
END


---------------------------------
In article <3C0F7F33.F3766F58@fz-juelich.de>, Jaco van Gorkom <j.c.van.gorkom@fz-juelich.de> writes:
> dmarshall@ivory.trentu.ca wrote:
>> I was using CONGRID to resize an RGB image array which is [3,x,y] large
>> I just realized CONGRID will not resize the R,G, and B planes separately.
>> I will get a kind of smeared/diluted image, which looks OK, but....
>> I _know_ it's obvious ... now.
>
> Is it obvious? If you resize to CONGRID(image, 3, newx, newy) ?
> From the online help (IDL 5.4):
> [...] when shrinking an array, [...] CONGRID just resamples the array.
> [when expanding an array,] CONGRID automatically uses linear interpolation
> if the input array is 3-dimensional.
> So, as long as you do not resize the first dimension (3), shouldn't you be
> ok?
>
> Jaco
Re: I have committed a sin CONGRID [message #28384 is a reply to message #28380] Thu, 06 December 2001 06:22 Go to previous message
Jaco van Gorkom is currently offline  Jaco van Gorkom
Messages: 97
Registered: November 2000
Member
dmarshall@ivory.trentu.ca wrote:
> I was using CONGRID to resize an RGB image array which is [3,x,y] large
> I just realized CONGRID will not resize the R,G, and B planes separately.
> I will get a kind of smeared/diluted image, which looks OK, but....
> I _know_ it's obvious ... now.

Is it obvious? If you resize to CONGRID(image, 3, newx, newy) ?
From the online help (IDL 5.4):
[...] when shrinking an array, [...] CONGRID just resamples the array.
[when expanding an array,] CONGRID automatically uses linear interpolation
if the input array is 3-dimensional.
So, as long as you do not resize the first dimension (3), shouldn't you be
ok?

Jaco
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: [Offtopic] Re: Strange problem
Next Topic: Re: convert string into the name of a variable

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:36:35 PDT 2025

Total time taken to generate the page: 0.00585 seconds