| blkavg | images.imgeom | blkavg |
blkavg -- block average or sum n-dimensional images
blkavg input output b1 b2 b3 b4 b5 b6 b7
The list of input images are block averaged or summed to form the output images. The output image names are specified by the output list. The number of output image names must be the same as the number of input images. An output image name may be the same as the corresponding input image in which case the block averaged image replaces the input image. The last column, line, etc. of the output image may be a partial block. The option parameter selects whether to block average or block sum.
It requires approximately 10 cpu seconds to block average a 512 by 512 short image by a factor of 8 in each direction (Vax 11/750 with fpa).
1. To block average a 2-d image in blocks of 2 by 3:
cl> blkavg imagein imageout 2 3
2. To block sum two 2-d images in blocks of 5 by 5:
cl> blkavg image1,image2 out1,out2 5 5 op=sum
3. To block average a 3-d image by 4 in x and y and 2 in z:
cl> blkavg imagein imageout 4 4 2
or
cl> blkavg imagein imageout b1=4 b2=4 b3=2