select_grayvalues_from_channelsselect_grayvalues_from_channelsSelectGrayvaluesFromChannelsSelectGrayvaluesFromChannels (Operator)
Name
select_grayvalues_from_channelsselect_grayvalues_from_channelsSelectGrayvaluesFromChannelsSelectGrayvaluesFromChannels
— Selection of gray values of a multi-channel image using an index image.
Signature
Description
The operator select_grayvalues_from_channelsselect_grayvalues_from_channelsSelectGrayvaluesFromChannelsSelectGrayvaluesFromChannelsSelectGrayvaluesFromChannels
selects gray
values from the different channels of MultichannelImageMultichannelImageMultichannelImageMultichannelImagemultichannelImage
.
The channel number for each pixel is determined from the corresponding
pixel value in IndexImageIndexImageIndexImageIndexImageindexImage
.
If MultichannelImageMultichannelImageMultichannelImageMultichannelImagemultichannelImage
and IndexImageIndexImageIndexImageIndexImageindexImage
contain the
same number of images, the corresponding images are processed pairwise.
Otherwise, IndexImageIndexImageIndexImageIndexImageindexImage
must contain only one single image.
In this case, the gray value selection is performed for each image of
MultichannelImageMultichannelImageMultichannelImageMultichannelImagemultichannelImage
according to IndexImageIndexImageIndexImageIndexImageindexImage
.
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Automatically parallelized on tuple level.
- Automatically parallelized on domain level.
Parameters
MultichannelImageMultichannelImageMultichannelImageMultichannelImagemultichannelImage
(input_object) (multichannel-)image(-array) →
objectHImageHImageHobject (byte)
Multi-channel gray value image.
IndexImageIndexImageIndexImageIndexImageindexImage
(input_object) singlechannelimage(-array) →
objectHImageHImageHobject (byte)
Image, where pixel values are interpreted as
channel index.
Number of elements: IndexImage == MultichannelImage || IndexImage == 1
SelectedSelectedSelectedSelectedselected
(output_object) singlechannelimage(-array) →
objectHImageHImageHobject * (byte)
Resulting image.
Example (C++ (HALCON 5.0-10.0))
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);
Possible Predecessors
depth_from_focusdepth_from_focusDepthFromFocusDepthFromFocusDepthFromFocus
,
mean_imagemean_imageMeanImageMeanImageMeanImage
Possible Successors
disp_imagedisp_imageDispImageDispImageDispImage
See also
count_channelscount_channelsCountChannelsCountChannelsCountChannels
Module
Foundation