vmos2band(1)

PROGRAM
vmos2band - Converts a mosaic input image to an output image in which each subimage of the input mosaic constitutes a band of the output image.

SYNTAX

vmos2band

-i  input image

-o  resulting output image

-r  number of rows in each subimage (must be same for all subimages)

-c  number of columns in each subimage (must be same for all subimages)

[-bs]
    Subimage border size in pixels (inner borders)

[-bm]
    Mosaic image border size in pixels (outer border)

[-x]
    Horzontal index of first subimage (will be first band)

[-y]
    Vertical index of first subimage (will be first band)

[-s]
    Number of subimages to skip (periodic) when putting subimages into band format

[-n]
    Number of subimages to be put into band format

[-V]
    Gives the version for vmos2band

[-U]
    Gives the usage for vmos2band

[-P]
    Prompts for command line options

[-A [file1]]
    Creates the answer file called vmos2band.ans or file1

[-a [file1]]
    Uses vmos2band.ans or file1 as the answer file

DESCRIPTION
vmos2band converts a mosaic input image to an output image in which each subimage of the input mosaic constitutes a band of the output image.

The output image generated by vmos2band will be (r-2*bs) rows by (c-2*bs) columns with n bands, where r and c are the number of rows and columns per subimage, bs is the subimage border size, and n is the number of subimages that are to be put into band format. Vmos2band assumes that all subimages are same size (r*c) and all subimages have the same border size (bs). Subimages from the input mosaic image are assigned to bands in the multiband output image in the following manner: The first subimage specified is assigned to the first band in the output image. Subsequent bands are assigned subsequent subimages indexed from left to right, top to bottom. Vmos2band accepts VIFF data_types (excluding VFF_TYP_BIT) and returns that same data_type. If a map is associated with the input mosaic image, the same map will be assigned to the output multiband image.

Vmos2band does not work on explicit location data and will return an error when such an image is encountered. No output image will be created.

number of columns and number of rows in subimages

The -r and -c options are used to specify the number of rows and the number of columns, respectively, per subimage. Vmos2band assumes that all subimages in the mosaic image are the same size. The -r and -c values SHOULD include any borders associated with the subimages. The default subimage row and column sizes are 16 pixels.

subimage border size

The -bs option allows the user to specify the subimage border size in pixels. Again, this parameter will be applied to all subimages in the mosaic. When vmos2band converts the mosaic image to a multiband image, the subimage borders will be removed from the subimages before storing them in bands. The size of the output image will therefore be (r-2*bs) rows by (c-2*bs) columns by n bands. The default subimage border size is 0 pixels.

overall mosaic image border size

The -bm option allows the user to specify, in pixels, the size of an outer border that should be removed from the mosaic image before extracting the subimages. The overall mosaic image border and the subimage borders are independent. The default overall mosaic image border size is 0 pixels.

horizontal and vertical offset of first subimage to be banded

The user can specify the first subimage in the mosaic that will be put into the multiband output image by using the -x (horizontal offset) and -y (vertical offset) options. The specified subimage will then be the first band in the output image. The indices, x and y, index through the subimages (they are NOT indices through the input mosaic image rows and columns). Therefore, if a mosaic image contained 9 4-row by 4-col subimages arranged as 3 subimages in the horizontal direction by 3 subimages in the vertical direction, the center subimage would be indexed by x=1, y=1 (not by x=4, y=4). The default first subimage is the first subimage in the mosaic (x=0, y=0).

number of subimages to be put into band format

The user can also specify how many images will be put into band format, starting with the first subimage (described above), by specifying the -n option. If the specified number of subimages cannot be extracted, vmos2band will return an error and the output image will not be created. If the -n option is not specified, vmos2band calculates the number of subimages that will be banded, taking into account both the subimage skip value and the first subimage offsets.

subimage skip value

The subimage skip value option (-s) allows the user to specify that the next s subimages be skipped each time a subimage is stored as a band. For example, a skip value of s=1 in a 3x3 subimage mosaic would band the subimages in a checkerboard pattern (every other subimage is a band in the output image). When applying the subimage skip value, vmos2band looks at the series of subimages as a linear array. Therefore, the row/column arrangement of subimages does not affect how the skipping occurs.

REQUIRED ARGUMENTS

-i  type: infile
    desc: input image

-o  type: outfile
    desc: resulting output image

-r  type: integer
    desc: number of rows in each subimage (must be same for all subimages)

-c  type: integer
    desc: number of columns in each subimage (must be same for all subimages)

OPTIONAL ARGUMENTS

-bs type: integer
    desc: Subimage border size in pixels (inner borders)
    default: 0
    bounds: value >= 0

-bm type: integer
    desc: Mosaic image border size in pixels (outer border)
    default: 0
    bounds: value >= 0

-x  type: integer
    desc: Horzontal index of first subimage (will be first band)
    default: 0
    bounds: value >= 0

-y  type: integer
    desc: Vertical index of first subimage (will be first band)
    default: 0
    bounds: value >= 0

-s  type: integer
    desc: Number of subimages to skip (periodic) when putting subimages into band format
    default: 0
    bounds: value >= 0

-n  type: integer
    desc: Number of subimages to be put into band format
    default: 1
    bounds: value >= 0

EXAMPLES
vmos2band -i mosaic.xv -o band.xv -r 18 -c 18 -bs 1 -n 3
Will return a 3 band image of dimension 16 rows by 16 cols. Since there is a border of 1 (-bs 1) around the image, the resulting image is 16 rows by 16 cols.

SEE ALSO
intro(1), verror(3), vgparms(3), vutils(3), lvmos2band(3)

RESTRICTIONS
Vmos2band does not work on VFF_TYP_BIT data files.

Vmos2band does not work on explicit location data and will return an error when such an image is encountered. No output image will be created.

COPYRIGHT
Copyright 1992, University of New Mexico. All rights reserved.