select_grayvalues_from_channelsselect_grayvalues_from_channelsSelectGrayvaluesFromChannelsSelectGrayvaluesFromChannelsselect_grayvalues_from_channels (Operator)

Name

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

Signature

select_grayvalues_from_channels(MultichannelImage, IndexImage : Selected : : )

Herror select_grayvalues_from_channels(const Hobject MultichannelImage, const Hobject IndexImage, Hobject* Selected)

Herror T_select_grayvalues_from_channels(const Hobject MultichannelImage, const Hobject IndexImage, Hobject* Selected)

void SelectGrayvaluesFromChannels(const HObject& MultichannelImage, const HObject& IndexImage, HObject* Selected)

HImage HImage::SelectGrayvaluesFromChannels(const HImage& IndexImage) const

static void HOperatorSet.SelectGrayvaluesFromChannels(HObject multichannelImage, HObject indexImage, out HObject selected)

HImage HImage.SelectGrayvaluesFromChannels(HImage indexImage)

def select_grayvalues_from_channels(multichannel_image: HObject, index_image: HObject) -> HObject

Description

The operator select_grayvalues_from_channelsselect_grayvalues_from_channelsSelectGrayvaluesFromChannelsSelectGrayvaluesFromChannelsselect_grayvalues_from_channels selects gray values from the different channels of MultichannelImageMultichannelImageMultichannelImagemultichannelImagemultichannel_image. The channel number for each pixel is determined from the corresponding pixel value in IndexImageIndexImageIndexImageindexImageindex_image. Note, IndexImageIndexImageIndexImageindexImageindex_image is allowed to have an arbitrary number of channels for reasons of backward compatibility, but only the first channel is considered.

Execution Information

Parameters

MultichannelImageMultichannelImageMultichannelImagemultichannelImagemultichannel_image (input_object)  (multichannel-)image(-array) objectHImageHObjectHObjectHobject (byte)

Multi-channel gray value image.

IndexImageIndexImageIndexImageindexImageindex_image (input_object)  singlechannelimage(-array) objectHImageHObjectHObjectHobject (byte)

Image, where pixel values are interpreted as channel index.

Number of elements: IndexImage == MultichannelImage || IndexImage == 1

SelectedSelectedSelectedselectedselected (output_object)  singlechannelimage(-array) objectHImageHObjectHObjectHobject * (byte)

Resulting image.

Example (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);

Possible Predecessors

depth_from_focusdepth_from_focusDepthFromFocusDepthFromFocusdepth_from_focus, mean_imagemean_imageMeanImageMeanImagemean_image

Possible Successors

disp_imagedisp_imageDispImageDispImagedisp_image

See also

count_channelscount_channelsCountChannelsCountChannelscount_channels

Module

Foundation