Re: I have committed a sin CONGRID [message #28380] |
Thu, 06 December 2001 07:35 |
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  |
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
|
|
|