BUGS · SEE_ALSO
imcompress -- compress the 1st two dimensions of an N-dimensional IRAF image by summing.
imcompress image outimage cfactor
IMCOMPRESS contracts an IRAF image by summing counts in pixels of a specified block size. The image is compressed spatially in the first 2 dimensions. In the case of a 1-d image the compression is by the one and only dimension. The task first runs over an image and then is optionally repeated for an associated error image.
If an image of dimension (64,64,3) is compressed by a factor of 2, then the output image is of dimension (32,32,3), and the total number of image counts is unchanged. If the compress factor doesn't divide into the image evenly, then the output image is the size of the number of evenly divisible bins, and the ends are dropped. If in the example above the compress factor was 3, then the output image would have a dimension of (21,21,3), and the total number of counts in the new image may be slighty fewer than in the old.
- image = prompt = Input Image name
Name of the input image file to be read.
- outimage = prompt = Output Image name
Name of the output image file to be created.
- cfactor = prompt = Compress Factor
The factor by which the image will be contracted.
- (error = "NONE") [string]
Name of the input error image file to be read. An input of NONE will skip the error file.
- (outerror = "NONE") [string]
Name of the output error image to be created. This must be set if the above error image name is not "NONE".
- (clobber = no) [boolean]
Boolean flag specifying whether or not the output IRAF image file can be overwritten, if it already exists.
1. Imcompress a 512x512x3 image name foo by 2 and output an image named goo.
xi> imcompress Input Image name: foo Output Image name: goo Compress Factor (1:): 2 Compressing Image foo by factor of 2Outputs a 256x256x3 image with each pixel of foo compressed by summing consecutive 2x2 boxes. There is no associated error file to compress.
2. Imcompress a 64x32x3 image name foo by 5 and output an image named goo.
xi> imcompress Input Image name: foo Output Image name: goo Compress Factor (1:): 5 Compressing Image foo by factor of 5Outputs a 12x6x3x2 image with each pixel of compressed by summing consecutive 5x5 boxes. Since 5 does not divide evenly into 64 or 32 the output dimension is actually the number of times the the compress factor divide evenly in each dimension.
This task actually invokes the IRAF task blkavg . See help for that task for more information.