Performs systematic pixel or cluster sampling of an image
Performs systematic pixel or cluster sampling of an image based on a user-specified sample cell size and sampling increment between the cells. Each of the sample regions of the input image are stored in a different area of the output image. The input image may be BYTE, INTEGER*2, INTEGER*4, or REAL*4 data type. The output image data type is determined by the ODTYPE parameter.
- IN
- Input image. The input image may be BYTE, INTEGER*2, INTEGER*4, or REAL*4 and must have more lines and samples in it than is specified in the KERNDIM parameter.
- OUT
- Output image. The output image may be a multi-band image with the same data type as that specified in the ODTYPE parameter.
- KERNDIM(10,10)
- Kernel dimensions (nl,ns). The window area to be systematically extracted for sampling. The KERNDIM dimensions can be from 1 to the image size.
- SKIPPIX(100,100)
- Number of pixels to skip. Incremental values for changing the upper-left corner line and sample coordinates of the sample cell (line,sample). The new window is offset based upon the beginning of the previous window. The number of pixels to skip must be at least 1; the upper limit is the size of the image.
- ODTYPE(SAME)
- Output data type. The data type of the output image.
= SAME: Same as input = BYTE: BYTE (8-bit unsigned integer) (0 through 255) = I*2: INTEGER*2 (16-bit signed integer) (-32768 through 32767) = I*4: INTEGER*4 (32-bit signed integer) (-2147483648 through 2147483647) = R*4: REAL*4 (32-bit signed real) (System dependent)
The image MYIMG.IN is resampled using the values of 10 x 10 for the cell size and 50 for the horizontal and vertical step sizes. The output image is written to the file IMG.DAT and is of data type INTEGER*2.
The image FOUR.IN is resampled using a 2 x 2 sample cell with a step of 10 in the vertical direction and a step of 20 in the horizontal direction. The output image is written to the file MAG.OUT.
SYSSAMP does a systematic sampling of the input image. The output image has the pixels extracted from the input image by moving the kernel of size KERNDIM to each successive starting sample location. The cell is moved in the horizontal directions after each sampling and in the vertical direction at the end of each set of image lines, as specified by SKIPPIX. The first sample cell selected starts at image location (1,1); the second sample cell start is based upon the beginning of the previous window (location 1 + SKIPPIX(1)). Partial cells near the edges of the image are ignored. The first sample cell goes into the output image at location (1,1). The second sample is placed in the output image at the row 1 sample location equal to the number of samples specified in KERNDIM + 1. See User Note 2 for the formula to calculate the dimensions (NL,NS) of the output image.
A nonfatal error occurred during the processing of the history information.
The minimum and maximum information within the DDR file could not be updated.
An error occurred in closing the image files.
Unable to get input image.
Message indicates that the number of lines or samples in image IN are not equal. To correct the error, use the window option to indicate the lines and samples to be used.
Unable to get output image.
Unable to open <XXXXX> image. Verify that the image exists.
Cannot access dynamic memory buffer.
Restart, using SKIPPIX values greater than the KERNDIM values.
Restart, using an input image with a larger dimension than the KERNDIM parameters.
NL = INT [(NLIN - KERNDIM(1)) / SKIPPIX(1) + 1] * KERNDIM(1) NS = INT [(NSIN - KERNDIM(2)) / SKIPPIX(2) + 1] * KERNDIM(2) where NSIN = number of samples per line in the input image NLIN = number of lines in the input image