|
Getting Started with IDL: Images |
|
The REBIN function in IDL makes it easy to resize a vector or array to new dimensions. The supplied dimensions must be proportionate (that is, integral multiples or factors) to the dimensions of the original image. Since our original image array here is 768 by 512, we'll need to decide the correct dimensions of our new resized image. If we want to resize the image to half the original size then simply take half of the array's original dimensions.
NEWIMAGE=REBIN(MYIMAGE,384,256)
TV, NEWIMAGE
![]() |
WDELETE
| Note The CONGRID function also shrinks or expands the size of an array. CONGRID differs from REBIN in that where REBIN requires that the new array size must be an integer multiple of the original size, CONGRID will resize an array to any arbitrary size. For more information, see CONGRID. |
IDL Online Help (March 06, 2007)