.\
cgresizeimage.pro
top cgResizeImage
Utilities
result = cgResizeImage(image, cols, rows [, /INTERPOLATE], MINUS_ONE=MINUS_ONE)
Provides a CONGRID like resizing of images, although it performs this service correctly for both 2D and 3D images. Pixel locations do not change in the output image, since the center of the pixel is used for interpolation purposes, rather than the lower-left corner of the pixel. Unlike CONGRID, 3D images can use nearest neighbor interpolation as well as bilinear interpolation.
Parameters
- image in required type=any
The image variable to resize. Must be a 2D or 3D image. If a 3D image, one of the image dimensions must be a 3.
- cols in required type=integer
The number of columns (i.e., XSIZE) in the output image.
- rows in required type=integer
The number of rows (i.e., YSIZE) in the output image.
Keywords
- INTERPOLATE in optional type=boolean default=0
Is set, bilinear interpolation is used to resize the image. Otherwise, nearest neighbor sampling is used instead. minus_one: in, optional, type=boolean, default=0 Identical to CONGRID MINUS_ONE keyword.
- MINUS_ONE
Examples
Used in a similar fashion to the Congrid command, but for images:
IDL> bigEarth = FSC_Resize_Image(cgDemoData(7), 720, 720)
IDL> bigRose = FSC_Resize_Image(cgDemoData(16), 681, 447)
Author information
- Author:
FANNING SOFTWARE CONSULTING:
David W. Fanning 1645 Sheely Drive Fort Collins, CO 80526 USA Phone: 970-221-0438 E-mail: david@idlcoyote.com Coyote's Guide to IDL Programming: http://www.idlcoyote.com
- Copyright:
Copyright (c) 2010, Fanning Software Consulting, Inc.
- History:
Change History:
I have been convinced (conversations with Wayne Landsman) that if the CENTER keyword is set, the MINUS_ONE keyword is not needed, since it was created to solve the same problem. So, I have changed the default setting of MINUS_ONE to 0. 11 Jan 2011. DWF. Eenamed cgResizeImage from FSC_Resize_Image. 20 Oct 2012. DWF.Written, 20 November 2010. DWF.
File attributes
Modification date: | Fri Mar 27 11:07:35 2015 |
Lines: | 162 |
Docformat: | rst rst |