Click or drag to resize

IMcThresholdChannelMask Property

A bitmask allowing only a subset of all channels to be used for the thresholding during the Execute operation.

Namespace:  MediaCy.IQL.Features
Assembly:  MediaCy.IQL.Features (in MediaCy.IQL.Features.dll) Version: 10.0.6912.0
Syntax
VB
Property ChannelMask As Integer
	Get
	Set

Property Value

Type: Int32
Remarks
By default, when ChannelMask is -1, all channels of a multichannel Interpretation are used to determine if a pixel is foreground or not. Otherwise, each bit of the ChannelMask, starting with the low order bit masks a corresponding color channel (e.g., for an RGB interpretation, bit 0 is the Red channel, bit 1 the Blue and bit 2 the Green). The ChannelMask is applied to the image channels during the Execute operation after any Interpretation property cast is made. Where a bit of the ChannelMask is zero, then any pixel value for that channel is accepted as foreground. You may use this to, for example, threshold on only Hue while accepting any Saturation or Luminance (see example).
Note Note
This property is ignored for any monochrome image or if the Interpretation property is mctiMonochrome.
Examples
VB
'Threshold on only Hue's between 10 and 50, accepting any Saturation or Luminance
With ThisApplication.ActiveImage.RegionFeatures.Threshold
.Interpretation = mctiHSL
.IntensityRange = Array( 10,50, 0,0, 0,0) ' supply dummy pairs for S and L
.ChannelMask = &H1& 'Mask only the Hue channel
.Execute    'Do it
End With
See Also