lvbandcomb(3)

LIBRARY ROUTINE
lvbandcomb - Combine all bands from m images into one multiband image

LIBRARY CALL
#include "vinclude.h"
int
lvbandcomb(newimage, images, image_num, mapping_type, cs_model)
struct xvimage **newimage, *images[];
int image_num, mapping_type, cs_model;

INPUT

images
    An array of input images.

image_num
    The number of input images.

mapping_type
    Integer representing type of mapping to occur.

cs_model
    Integer representing the color space model of the output image.

OUTPUT

newimage
    The resulting band combined image.

MODIFICATIONS
Jan 21 1991 - added map transfer and map data options
                to the routine. (Tom & Charlie)

DESCRIPTION
lvbandcomb combines all bands from m images (in separate files) into one image that contains all data bands. The input images are passed in as an array of pointers to xvimage structures. There is no limit to the number of images that may be used as input to the routine. Each input image may be either a single band or multiband image with a map scheme of NONE, ONEPERBAND, or SHARED. The options for this program include, map option, and color space model.

The map options (-m) corresponding to the integer mapping_type include,

0   - ignore maps

1   - map data through the maps

2   - transfer map information

If the mapping_type option is set to 0, then the maps are ignored. That is, only the data from the input images are combined into a single multiband image. The resulting map scheme will be NONE.

If the mapping_type option is set to 1, then the the data is mapped through the bands before combining the bands. If the map scheme for an input image is set to NONE, then that image is not mapped (ie. it has already been mapped). The resulting map scheme will be set to NONE.

If the mapping_type option is set to 2, then the maps are transferred to the resulting multiband output image. If the map scheme for an input image is set to NONE, then a linear map is generated for that image. Input images with map schemes of ONEPERBAND and SHARED will have their maps transferred to the new multiband image. Note that if the maps are of different sizes, then the smaller maps will be expanded to the size of the largest map from all the input images. The resulting map scheme will be set to ONEPERBAND.

The concatenation will be to tack the second image band to the bottom of the first image, and the third image band to the bottom of the second image band, etc.

If the color space model (cs_model) option is set to something other than NONE and the resulting image does not contain 3 bands, the color space model passed in will be overridden and set to NONE.

The input to lvbandcomb:

struct xvimage *images[]

    This is an array that will contain the pointers to all the images that need to be conbined. There is no limit on the number of images bands to combine.

int image_num

    This is the number of pointers to images. The size of *images[].

int mapping_type

    This flag denotes whether or not to ignore the maps (mapping_type = 0), map the data through the maps (mapping_type = 1) before combining the bands, or to transfer the maps to the resulting image (mapping_type = 2).

int cs_model

    This specifies the color space model of the resulting image. Where valid parameters for cs_model are 0 to 15:

    0. None (default)
    1. ntsc RGB
    2. ntsc CMY
    3. ntsc YIQ
    4. HSV
    5. HLS
    6. IHS
    7. cie RGB
    8. cie XYZ
    9. cie UVW
    10. cie ucs UVW
    11. cie ucs SOW
    12. cie ucs Lab
    13. cie ucs Luv
    14. GENERIC
    15. generic RGB
lvbandcomb will return a 1 upon success and a 0 upon failure.

SEE ALSO
vbandcomb(1), intro(3), vipl(3), verror(3), vutils(3) lvmapdata(3)

RESTRICTIONS
If m_flag is set to 1 (map data through the maps) and all input images are not of type BYTE, lvbandcomb will fail. All of the input image data must be of the same storage type, otherwise lvbandcomb will fail.

AUTHOR
Tom Sauer, Mark Young

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