Back to Aurora Vision Library Lite website

You are here: Start » Image » Image Conversions » MergeChannels

MergeChannels


Header: AVL.h
Namespace: avl

Creates a multichannel image from several monochromatic ones.

Syntax

void avl::MergeChannels
(
	const avl::Image& inMonoImage1,
	const avl::Image& inMonoImage2,
	atl::Optional<const avl::Image&> inMonoImage3,
	atl::Optional<const avl::Image&> inMonoImage4,
	avl::Image& outImage
)

Parameters

Name Type Default Description
Input value inMonoImage1 const Image& An image that becomes the first channel
Input value inMonoImage2 const Image& An image that becomes the second channel
Input value inMonoImage3 Optional<const Image&> NIL An image that becomes the third channel
Input value inMonoImage4 Optional<const Image&> NIL An image that becomes the fourth channel
Output value outImage Image& Output image

Requirements

For input inMonoImage1 only pixel formats are supported: 1⨯uint8, 1⨯int8, 1⨯uint16, 1⨯int16, 1⨯int32, 1⨯real.

For input inMonoImage2 only pixel formats are supported: 1⨯uint8, 1⨯int8, 1⨯uint16, 1⨯int16, 1⨯int32, 1⨯real.

Read more about pixel formats in Image documentation.

Description

The operation combines the given monochromatic images to obtain a color image, each of its channels equal to the only channel of the corresponding input image.

Examples

An example image used as inMonoImage1.

An example image used as inMonoImage2.

An example image used as inMonoImage3.

The resulting outImage.

Hardware Acceleration

This operation supports automatic parallelization for multicore and multiprocessor systems.

Errors

List of possible exceptions:

Error type Description
DomainError Image sizes are not equal in MergeChannels.
DomainError Input image is not monochromatic in MergeChannels.
DomainError Pixel types of the input images are not the same in MergeChannels.
DomainError Not supported inMonoImage1 pixel format in MergeChannels. Supported formats: 1xUInt8, 1xInt8, 1xUInt16, 1xInt16, 1xInt32, 1xReal.
DomainError Not supported inMonoImage2 pixel format in MergeChannels. Supported formats: 1xUInt8, 1xInt8, 1xUInt16, 1xInt16, 1xInt32, 1xReal.

See Also

  • SplitChannels – Creates several monochromatic images from individual channels of the input image.