Skip to content

select_grayvalues_from_channelsSelectGrayvaluesFromChannelsSelectGrayvaluesFromChannelsselect_grayvalues_from_channelsselect_grayvalues_from_channels🔗

Short description🔗

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

Signature🔗

select_grayvalues_from_channels( image MultichannelImage, image IndexImage, out image Selected )void SelectGrayvaluesFromChannels( const HObject& MultichannelImage, const HObject& IndexImage, HObject* Selected )static void HOperatorSet.SelectGrayvaluesFromChannels( HObject multichannelImage, HObject indexImage, out HObject selected )def select_grayvalues_from_channels( multichannel_image: HObject, index_image: HObject ) -> HObject

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 )

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

HImage HImage.SelectGrayvaluesFromChannels( HImage indexImage )

Description🔗

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

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on domain level.

Parameters🔗

MultichannelImagemultichannelImagemultichannel_image (input_object) (multichannel-)image(-array) → object (byte)HObject (byte)HImage (byte)HObject (byte)Hobject (byte)

Multi-channel gray value image.

IndexImageindexImageindex_image (input_object) singlechannelimage(-array) → object (byte)HObject (byte)HImage (byte)HObject (byte)Hobject (byte)

Image, where pixel values are interpreted as channel index.

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

Selectedselectedselected (output_object) singlechannelimage(-array) → object (byte)HObject (byte)HImage (byte)HObject (byte)Hobject * (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)\;

Combinations with other operators🔗

Combinations

Possible predecessors

depth_from_focusDepthFromFocus, mean_imageMeanImage

Possible successors

disp_imageDispImage

See also

count_channelsCountChannels

Module🔗

Foundation