Back to Aurora Vision Library website

You are here: Start » Function Reference » Image » Image Conversions » SplitChannels

SplitChannels


Header: AVL.h
Namespace: avl
Module: FoundationLite

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

Syntax

C++
C#
 
void avl::SplitChannels
(
	const avl::Image& inImage,
	atl::Optional<avl::Image&> outMonoImage1 = atl::NIL,
	atl::Optional<avl::Image&> outMonoImage2 = atl::NIL,
	atl::Optional<avl::Image&> outMonoImage3 = atl::NIL,
	atl::Optional<avl::Image&> outMonoImage4 = atl::NIL
)

Parameters

Name Type Default Description
Input value inImage const Image& Input image
Output value outMonoImage1 Optional<Image&> NIL Image of the first channel
Output value outMonoImage2 Optional<Image&> NIL Image of the second channel (if exists)
Output value outMonoImage3 Optional<Image&> NIL Image of the third channel (if exists)
Output value outMonoImage4 Optional<Image&> NIL Image of the fourth channel (if exists)

Optional Outputs

The computation of following outputs can be switched off by passing value atl::NIL to these parameters: outMonoImage1, outMonoImage2, outMonoImage3, outMonoImage4.

Read more about Optional Outputs.

Description

The operation extracts the color channels of inImage as separate monochromatic images. Outputs corresponding to non-existing channels of an image are set to empty images.

Examples

An example image used as inImage.

The resulting outMonoImage1.

The resulting outMonoImage2.

The resulting outMonoImage3.

Hardware Acceleration

This operation supports automatic parallelization for multicore and multiprocessor systems.

See Also

  • SelectChannel – Creates an image from a single channel of the input image.
  • MergeChannels – Creates a multichannel image from several monochromatic ones.
  • SplitChannels_OrNil – Creates several monochromatic images from individual channels of the input image and sets Nil for channels that are not present.