select_grayvalues_from_channels ( MultichannelImage, IndexImage : Selected : : )

Selection of gray values of a multi-channel image using an index image.

The operator select_grayvalues_from_channels selects gray values from the different channels of MultichannelImage. The channel number for each pixel is determined from the corresponding pixel value in IndexImage. If MultichannelImage and IndexImage contain the same number of images, the corresponding images are processed pairwise. Otherwise, IndexImage must contain only one single image. In this case, the gray value selection is performed for each image of MultichannelImage according to IndexImage .


Parameters

MultichannelImage (input_object)
multichannel-image(-array) -> object : byte
Multi-channel gray value image.

IndexImage (input_object)
singlechannelimage(-array) -> object : byte
Image, where pixel values are interpreted as channel index.
Number of elements: (IndexImage == MultichannelImage) || (IndexImage == 1)

Selected (output_object)
singlechannelimage(-array) -> object : byte
Resulting image.


Example (Syntax: C++)
compose3(Focus0,Focus1,Focus2,&MultiFocus);
depth_from_focus(MultiFocus,&Depth,&Confidence,'highpass','next_maximum');
mean_image(Depth,&Smooth,15,15);
select_grayvalues_from_channels(MultiChannel,Smooth,SharpImage);

Parallelization Information

select_grayvalues_from_channels is reentrant and automatically parallelized (on tuple level, domain level).


Possible Predecessors

depth_from_focus, mean_image


Possible Successors

disp_image


See also

count_channels


Module

Foundation



Copyright © 1996-2008 MVTec Software GmbH