Python

PhenoCapture Scripting API Reference (Python)


1. Action (ScriptActionHelper) – 119 functions
Color & Channel Actions (24 functions)
Action.AdaptiveContrast(contrastStrengthPercentage, gridTilesX, gridTilesY, contrastClipLimit)

Description: Enhances local contrast using CLAHE.

Syntax: result = Action.AdaptiveContrast(contrastStrengthPercentage, gridTilesX, gridTilesY, contrastClipLimit)

Parameter Description Default
contrastStrengthPercentage (Integer, Optional) Contrast enhancement strength percentage. 20
gridTilesX (Integer, Optional) Number of grid tiles horizontally. 8
gridTilesY (Integer, Optional) Number of grid tiles vertically. 8
contrastClipLimit (Single, Optional) CLAHE histogram clip limit. 1.0F

Return Value: Boolean

Return Description: True if contrast enhancement succeeded; otherwise False.

Example:

success = Action.AdaptiveContrast(20, 8, 8, 1.0F)

Action.AutoContrast(clipPercentage)

Description: Automatically adjusts image contrast.

Syntax: result = Action.AutoContrast(clipPercentage)

Parameter Description Default
clipPercentage (Single, Optional) Histogram clipping percentage. 0.5F

Return Value: Boolean

Return Description: True if contrast adjustment succeeded; otherwise False.

Example:

success = Action.AutoContrast(0.5F)

Action.AutoEqualize()

Description: Equalizes the image histogram across the tonal range.

Syntax: result = Action.AutoEqualize()

Return Value: Boolean

Return Description: True if equalization succeeded; otherwise False.

Example:

success = Action.AutoEqualize()

Action.AutoGamma()

Description: Automatically adjusts image gamma.

Syntax: result = Action.AutoGamma()

Return Value: Boolean

Return Description: True if gamma adjustment succeeded; otherwise False.

Example:

success = Action.AutoGamma()

Action.AutoShadowsHighlights(shadowCorrectionStrengthPercentage, highlightCorrectionStrengthPercentage)

Description: Corrects shadow and highlight regions.

Syntax: result = Action.AutoShadowsHighlights(shadowCorrectionStrengthPercentage, highlightCorrectionStrengthPercentage)

Parameter Description Default
shadowCorrectionStrengthPercentage (Single, Optional) Shadow correction strength percentage. 50.0F
highlightCorrectionStrengthPercentage (Single, Optional) Highlight correction strength percentage. 10.0F

Return Value: Boolean

Return Description: True if correction succeeded; otherwise False.

Example:

success = Action.AutoShadowsHighlights(50.0F, 10.0F)

Action.AutoTone(clipPercentage)

Description: Automatically adjusts the image tonal range.

Syntax: result = Action.AutoTone(clipPercentage)

Parameter Description Default
clipPercentage (Single, Optional) Histogram clipping percentage. 0.5F

Return Value: Boolean

Return Description: True if tone adjustment succeeded; otherwise False.

Example:

success = Action.AutoTone(0.5F)

Action.AutoWhiteBalance()

Description: Automatically corrects white balance and color casts.

Syntax: result = Action.AutoWhiteBalance()

Return Value: Boolean

Return Description: True if white balance succeeded; otherwise False.

Example:

success = Action.AutoWhiteBalance()

Action.BrightContrast(brightnessLevel, contrastLevel, autoBrightness)

Description: Adjusts image brightness and contrast.

Syntax: result = Action.BrightContrast(brightnessLevel, contrastLevel, autoBrightness)

Parameter Description Default
brightnessLevel (Integer, Optional) Brightness adjustment. 0
contrastLevel (Integer, Optional) Contrast adjustment. 0
autoBrightness (Boolean, Optional) Whether to calculate brightness automatically. False

Return Value: Boolean

Return Description: True if the adjustment was applied; otherwise False.

Example:

success = Action.BrightContrast(0, 0, False)

Action.ChangeColor(sourceColorRed, sourceColorGreen, sourceColorBlue, targetColorRed, targetColorGreen, targetColorBlue)

Description: Replaces one RGB color with another.

Syntax: result = Action.ChangeColor(sourceColorRed, sourceColorGreen, sourceColorBlue, targetColorRed, targetColorGreen, targetColorBlue)

Parameter Description Default
sourceColorRed (Integer, Optional) Source color red component (0–255). 255
sourceColorGreen (Integer, Optional) Source color green component (0–255). 255
sourceColorBlue (Integer, Optional) Source color blue component (0–255). 255
targetColorRed (Integer, Optional) Replacement red component (0–255). 0
targetColorGreen (Integer, Optional) Replacement green component (0–255). 0
targetColorBlue (Integer, Optional) Replacement blue component (0–255). 0

Return Value: Boolean

Return Description: True if replacement succeeded; otherwise False.

Example:

success = Action.ChangeColor(255, 255, 255, 0, 0, 0)

Action.CIELab(lightnessShift, aAxisShift, bAxisShift)

Description: Adjusts image color in the perceptually uniform CIE Lab space.

Syntax: result = Action.CIELab(lightnessShift, aAxisShift, bAxisShift)

Parameter Description Default
lightnessShift (Integer, Optional) Change to the L lightness axis. 0
aAxisShift (Integer, Optional) Change to the a color axis. 0
bAxisShift (Integer, Optional) Change to the b color axis. 0

Return Value: Boolean

Return Description: True if the adjustment was applied; otherwise False.

Example:

success = Action.CIELab(0, 0, 0)

Action.ColorDeconvolution(stainType, showColor)

Description: Applies color deconvolution to separate stains in the active workspace image.

Syntax: result = Action.ColorDeconvolution(stainType, showColor)

Parameter Description Default
stainType (Integer) Integer representing the biological stain to extract.
Supported stainType values:
0: H&E – Hematoxylin (Nuclei)
1: H&E – Eosin (Cytoplasm)
2: H-DAB – Hematoxylin (Background)
3: H-DAB – DAB (Protein Marker)
4: Masson's Trichrome – Methyl Blue (Collagen)
5: Masson's Trichrome – Ponceau Fuchsin (Muscle)
6: H-AEC – Hematoxylin (Nuclei)
7: H-AEC – AEC (Red Marker)
8: Methyl Green-DAB – Methyl Green (Nuclei)
9: Methyl Green-DAB – DAB (Protein Marker)
10: H-PAS – Hematoxylin (Nuclei)
11: H-PAS – PAS (Glycogen / Basement Membrane)
12: Alcian Blue & H – Alcian Blue (Acid Mucins / GAG)
13: Alcian Blue & H – Hematoxylin (Nuclei)
14: Giemsa – Methylene Blue (Nuclei)
15: Giemsa – Eosin (Erythrocytes / Cytoplasm)
16: Feulgen-Light Green – Feulgen (DNA)
17: Feulgen-Light Green – Light Green (Cytoplasm)
18: Safranin-O & Fast Green – Safranin-O (Lignin / Cartilage)
19: Safranin-O & Fast Green – Fast Green (Cellulose / Cytoplasm)
20: H&E-DAB (Triple) – Hematoxylin (Nuclei)
21: H&E-DAB (Triple) – Eosin (Cytoplasm)
22: H&E-DAB (Triple) – DAB (Protein Marker)
—
showColor (Boolean) Whether to apply pseudo-coloring to the extracted stain result. —

Return Value: Boolean

Return Description: True if the deconvolution process succeeded; otherwise False.

Example:

success = Action.ColorDeconvolution(0, True)

Action.ColorRangeSelection(targetColorRed, targetColorGreen, targetColorBlue, colorSpaceType, algorithmType, tolerance, keepOriginalColor)

Description: Selects or isolates image pixels matching the specified target RGB color within a given tolerance.

Syntax: result = Action.ColorRangeSelection(targetColorRed, targetColorGreen, targetColorBlue, colorSpaceType, algorithmType, tolerance, keepOriginalColor)

Parameter Description Default
targetColorRed (Integer, Optional) Target color red component (0–255). 0
targetColorGreen (Integer, Optional) Target color green component (0–255). 255
targetColorBlue (Integer, Optional) Target color blue component (0–255). 0
colorSpaceType (Integer, Optional) Integer representing the color space model.
Supported colorSpaceType values:
0: RGB
1: HSI
2: Lab
3: Chroma
0
algorithmType (Integer, Optional) Integer representing the distance calculation algorithm.
Supported algorithmType values:
0: Fast – Manhattan distance
1: Standard – Euclidean distance (Ignored when colorSpaceType is 3: Chroma)
1
tolerance (Integer, Optional) Color matching tolerance range (0–255). 40
keepOriginalColor (Boolean, Optional) Whether to preserve original pixel colors for matched areas (False converts matched areas to white). True

Return Value: Boolean

Return Description: True if the color range selection was applied; otherwise False.

Example:

success = Action.ColorRangeSelection(0, 255, 0, 3, 1, 40, True)

Action.ConvertToRgChrom()

Description: Converts the image to RG chromaticity coordinates.

Syntax: result = Action.ConvertToRgChrom()

Return Value: Boolean

Return Description: True if conversion succeeded; otherwise False.

Example:

success = Action.ConvertToRgChrom()

Action.CorrectUnevenIllumination(illuminationGridSize)

Description: Corrects uneven image illumination using a rolling-ball algorithm.

Syntax: result = Action.CorrectUnevenIllumination(illuminationGridSize)

Parameter Description Default
illuminationGridSize (Integer, Optional) Grid size used for illumination estimation. 8

Return Value: Boolean

Return Description: True if illumination correction succeeded; otherwise False.

Example:

success = Action.CorrectUnevenIllumination(8)

Action.DeleteChannel(channelToDeleteType)

Description: Removes the specified color channel from the image.

Syntax: result = Action.DeleteChannel(channelToDeleteType)

Parameter Description Default
channelToDeleteType (Integer, Optional) Integer representing the color channel.
Supported channelToDeleteType values:
0: Red
1: Green
2: Blue
0

Return Value: Boolean

Return Description: True if the channel was removed; otherwise False.

Example:

success = Action.DeleteChannel(0)

Action.GrayFrom(sourceChannelType)

Description: Creates a grayscale image from the selected color channel.

Syntax: result = Action.GrayFrom(sourceChannelType)

Parameter Description Default
sourceChannelType (Integer, Optional) Integer representing the source color channel.
Supported sourceChannelType values:
0: Red
1: Green
2: Blue
0

Return Value: Boolean

Return Description: True if conversion succeeded; otherwise False.

Example:

success = Action.GrayFrom(0)

Action.GrayScaling()

Description: Converts the image to grayscale.

Syntax: result = Action.GrayScaling()

Return Value: Boolean

Return Description: True if conversion succeeded; otherwise False.

Example:

success = Action.GrayScaling()

Action.GrayToColor(mapType, isReversed)

Description: Applies a color map to a grayscale image.

Syntax: result = Action.GrayToColor(mapType, isReversed)

Parameter Description Default
mapType (Integer, Optional) Integer representing the color map.
Supported mapType values:
0: RedBlue
1: Viridis
2: Parula
3: Plasma
4: Inferno
5: Magma
6: Cividis
7: Jet
8: Turbo
9: Rainbow
10: Spectral
11: HSV
12: Ocean
13: Seismic
14: RdBu
15: Coolwarm
16: bwr
17: BrBG
18: PiYG
19: Hot
20: Cool
21: Spring
22: Summer
23: Autumn
24: Winter
25: Bone
26: Copper
27: Pink
28: Terrain
29: Twilight
30: Rocket (Black – Blue – Red – Light Yellow)
31: Mako (Black – Deep Blue – Purple – Light Pink)
32: Cubehelix (Astronomy standard, brightness preserved in grayscale)
33: YlGnBu (Yellow – Green – Blue)
34: RdYlGn (Red – Yellow – Green)
35: PuOr (Purple – White – Orange)
36: Ironbow (Thermal: Black – Purple – Red – Yellow – White)
37: WhiteHot (Thermal: Cold Black – Hot White)
38: BlackHot (Thermal: Cold White – Hot Black)
39: Lava (Black – Dark Red – Orange – Yellow – White)
40: Arctic (Black – Dark Blue – Cyan – White)
0
isReversed (Boolean, Optional) Whether to reverse the color map. False

Return Value: Boolean

Return Description: True if the color map was applied; otherwise False.

Example:

success = Action.GrayToColor(0, False)

Action.HueSaturationIntensity(hue, saturation, intensity)

Description: Adjusts hue, saturation, and intensity independently.

Syntax: result = Action.HueSaturationIntensity(hue, saturation, intensity)

Parameter Description Default
hue (Integer, Optional) Hue adjustment. 0
saturation (Integer, Optional) Saturation adjustment. 0
intensity (Integer, Optional) Intensity adjustment. 0

Return Value: Boolean

Return Description: True if the adjustment was applied; otherwise False.

Example:

success = Action.HueSaturationIntensity(0, 0, 0)

Action.Invert()

Description: Inverts all image colors to create a negative.

Syntax: result = Action.Invert()

Return Value: Boolean

Return Description: True if colors were inverted; otherwise False.

Example:

success = Action.Invert()

Action.MergeChannels(colorSpaceType, image1Source, image2Source, image3Source)

Description: Merges three image sources as channels in the selected color space.

Syntax: result = Action.MergeChannels(colorSpaceType, image1Source, image2Source, image3Source)

Parameter Description Default
colorSpaceType (Integer, Optional) Integer representing the target color space.
Supported colorSpaceType values:
0: RGB
1: HSI
2: LAB
0
image1Source (Integer, Optional) First source image index. 0
image2Source (Integer, Optional) Second source image index. 1
image3Source (Integer, Optional) Third source image index. 2

Return Value: Boolean

Return Description: True if the channels were merged; otherwise False.

Example:

success = Action.MergeChannels(0, 0, 1, 2)

Action.MultibandColor(rSat, rInt, ySat, yInt, gSat, gInt, cyanSat, cyanInt, bSat, bInt, mSat, mInt)

Description: Adjusts saturation and intensity for red, yellow, green, cyan, blue, and magenta bands.

Syntax: result = Action.MultibandColor(rSat, rInt, ySat, yInt, gSat, gInt, cyanSat, cyanInt, bSat, bInt, mSat, mInt)

Parameter Description Default
rSat (Integer, Optional) Red-band saturation adjustment. 0
rInt (Integer, Optional) Red-band intensity adjustment. 0
ySat (Integer, Optional) Yellow-band saturation adjustment. 0
yInt (Integer, Optional) Yellow-band intensity adjustment. 0
gSat (Integer, Optional) Green-band saturation adjustment. 0
gInt (Integer, Optional) Green-band intensity adjustment. 0
cyanSat (Integer, Optional) Cyan-band saturation adjustment. 0
cyanInt (Integer, Optional) Cyan-band intensity adjustment. 0
bSat (Integer, Optional) Blue-band saturation adjustment. 0
bInt (Integer, Optional) Blue-band intensity adjustment. 0
mSat (Integer, Optional) Magenta-band saturation adjustment. 0
mInt (Integer, Optional) Magenta-band intensity adjustment. 0

Return Value: Boolean

Return Description: True if the adjustment was applied; otherwise False.

Example:

success = Action.MultibandColor(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)

Action.RollingBallBackgroundSubtraction(rollingBallBoxSize, isObjectColorAutomatic, manualObjectColorType)

Description: Removes background using rolling-ball subtraction.

Syntax: result = Action.RollingBallBackgroundSubtraction(rollingBallBoxSize, isObjectColorAutomatic, manualObjectColorType)

Parameter Description Default
rollingBallBoxSize (Integer, Optional) Rolling-ball box size in pixels. 50
isObjectColorAutomatic (Boolean, Optional) Whether to detect object color automatically. True
manualObjectColorType (Integer, Optional) Integer representing the manual object color.
Supported manualObjectColorType values (used when automatic detection is disabled):
0: White
1: Black
0

Return Value: Boolean

Return Description: True if background subtraction succeeded; otherwise False.

Example:

success = Action.RollingBallBackgroundSubtraction(50, True, 0)

Action.SplitRGB(rgbSplitChannelType)

Description: Splits the image into the selected RGB channel.

Syntax: result = Action.SplitRGB(rgbSplitChannelType)

Parameter Description Default
rgbSplitChannelType (Integer, Optional) Integer representing the target channel.
Supported rgbSplitChannelType values:
0: RGB Red
1: RGB Green
2: RGB Blue
3: Hue
4: Saturation
5: Intensity
6: CMYK Cyan
7: CMYK Magenta
8: CMYK Yellow
9: CMYK Key (Black)
10: Lab L
11: Lab a
12: Lab b
13: rg chromaticity r
14: rg chromaticity g
15: rg chromaticity b
0

Return Value: Boolean

Return Description: True if the channel was extracted; otherwise False.

Example:

success = Action.SplitRGB(0)

Data Extraction & Analysis Actions (5 functions)
Action.AverageColorValue(analysisTargetChannelType)

Description: Extracts the average value of the selected color channel.

Syntax: result = Action.AverageColorValue(analysisTargetChannelType)

Parameter Description Default
analysisTargetChannelType (Integer, Optional) Integer representing the target channel.
Supported analysisTargetChannelType values:
0: RGB Red
1: RGB Green
2: RGB Blue
3: Hue
4: Saturation
5: Intensity
6: CMYK Cyan
7: CMYK Magenta
8: CMYK Yellow
9: CMYK Key (Black)
10: Lab L
11: Lab a
12: Lab b
13: rg chromaticity r
14: rg chromaticity g
15: rg chromaticity b
0

Return Value: String

Return Description: String containing the extracted value, or an empty string if extraction fails.

Example:

average = Action.AverageColorValue(0)

Action.CropExportRegions(maskSourceLocation, connectivityType, marginPixels, outputModeType, transparentBackground, backgroundColorRed, backgroundColorGreen, backgroundColorBlue, destinationFolder, filePrefix, imageFormatType)

Description: Exports individual regions identified by a binary mask image.

Syntax: result = Action.CropExportRegions(maskSourceLocation, connectivityType, marginPixels, outputModeType, transparentBackground, backgroundColorRed, backgroundColorGreen, backgroundColorBlue, destinationFolder, filePrefix, imageFormatType)

Parameter Description Default
maskSourceLocation (Integer, Optional) Mask image source buffer index. 1
connectivityType (Integer, Optional) Integer representing the connected-component connectivity.
Supported connectivityType values:
0: FourWay (4-connected)
1: EightWay (8-connected)
0
marginPixels (Integer, Optional) Extra margin around each exported region. 0
outputModeType (Integer, Optional) Integer representing the region export output mode.
Supported outputModeType values:
0: ROI – rectangular region of interest
1: ExactShape – exact region shape
2: Binary – binary mask
1
transparentBackground (Boolean, Optional) Whether exported backgrounds are transparent. True
backgroundColorRed (Integer, Optional) Background red component (0–255). 0
backgroundColorGreen (Integer, Optional) Background green component (0–255). 0
backgroundColorBlue (Integer, Optional) Background blue component (0–255). 0
destinationFolder (String, Optional) Directory for exported region files. "C:\\ExportedRegions"
filePrefix (String, Optional) Prefix for exported file names. "Region\_"
imageFormatType (Integer, Optional) Integer representing the export image format.
Supported imageFormatType values:
0: PNG
1: JPEG
2: BMP
0

Return Value: Boolean

Return Description: True if region export succeeded; otherwise False.

Example:

success = Action.CropExportRegions(1, 0, 0, 1, True, 0, 0, 0, "C:\\ExportedRegions", "Region\_", 0)

Action.MultiCellAnalysis(gridColumnsX, gridRowsY, cellShapeType, cellDiameterPixels, analysisModeType, analysisTargetChannelType, targetColorPresetName)

Description: Analyzes cells in a grid and extracts per-cell statistics.

Syntax: result = Action.MultiCellAnalysis(gridColumnsX, gridRowsY, cellShapeType, cellDiameterPixels, analysisModeType, analysisTargetChannelType, targetColorPresetName)

Parameter Description Default
gridColumnsX (Integer, Optional) Number of grid columns. 5
gridRowsY (Integer, Optional) Number of grid rows. 5
cellShapeType (Integer, Optional) Integer representing the cell shape.
Supported cellShapeType values:
0: Rectangle
1: Circle
2: Point
1
cellDiameterPixels (Integer, Optional) Cell diameter in pixels. 20
analysisModeType (Integer, Optional) Integer representing the analysis mode.
Supported analysisModeType values:
0: AverageColorValue
1: PixelCount
0
analysisTargetChannelType (Integer, Optional) Integer representing the target channel.
Supported analysisTargetChannelType values:
0: RGB Red
1: RGB Green
2: RGB Blue
3: Hue
4: Saturation
5: Intensity
6: CMYK Cyan
7: CMYK Magenta
8: CMYK Yellow
9: CMYK Key (Black)
10: Lab L
11: Lab a
12: Lab b
13: rg chromaticity r
14: rg chromaticity g
15: rg chromaticity b
0
targetColorPresetName (String, Optional) Target color preset name. "White"

Return Value: String

Return Description: String containing analysis data, or an empty string if analysis fails.

Example:

data = Action.MultiCellAnalysis(5, 5, 1, 20, 0, 0, "White")

Action.OCRTextExtraction()

Description: Extracts text from the workspace image using OCR.

Syntax: result = Action.OCRTextExtraction()

Return Value: String

Return Description: Extracted text, an empty string when no text is found, or an error message.

Example:

text = Action.OCRTextExtraction()

Action.PixelCounter(targetColorRed, targetColorGreen, targetColorBlue, resultOutputFormatType)

Description: Counts pixels matching the specified RGB color.

Syntax: result = Action.PixelCounter(targetColorRed, targetColorGreen, targetColorBlue, resultOutputFormatType)

Parameter Description Default
targetColorRed (Integer, Optional) Target color red component (0–255). 255
targetColorGreen (Integer, Optional) Target color green component (0–255). 255
targetColorBlue (Integer, Optional) Target color blue component (0–255). 255
resultOutputFormatType (Integer, Optional) Integer representing the result output format.
Supported resultOutputFormatType values:
0: TotalCount
1: Percentage
0

Return Value: String

Return Description: String containing the count results, or an empty string if extraction fails.

Example:

counts = Action.PixelCounter(255, 255, 255, 0)

Edit & Selection Actions (13 functions)
Action.AddSelectionFromBinaryImage(sourceImageLocation)

Description: Adds a binary image mask to the current selection using logical OR.

Syntax: result = Action.AddSelectionFromBinaryImage(sourceImageLocation)

Parameter Description Default
sourceImageLocation (Integer, Optional) Source buffer index from 1 to 10. 1

Return Value: Boolean

Return Description: True if the selection was updated; otherwise False.

Example:

success = Action.AddSelectionFromBinaryImage(1)

Action.Copy()

Description: Copies the current image to the clipboard.

Syntax: result = Action.Copy()

Return Value: Boolean

Return Description: True if the image was copied; otherwise False.

Example:

success = Action.Copy()

Action.CreateSelectionFromBinaryImage(sourceImageLocation)

Description: Creates a selection mask from a binary workspace or buffer image.

Syntax: result = Action.CreateSelectionFromBinaryImage(sourceImageLocation)

Parameter Description Default
sourceImageLocation (Integer, Optional) 0 selects the workspace; 1–10 selects a buffer. 0

Return Value: Boolean

Return Description: True if the selection was created; otherwise False.

Example:

success = Action.CreateSelectionFromBinaryImage(1)

Action.ExpandSelection(expandByPixels)

Description: Expands the current selection by a specified number of pixels.

Syntax: result = Action.ExpandSelection(expandByPixels)

Parameter Description Default
expandByPixels (Integer, Optional) Expansion distance in pixels. 5

Return Value: Boolean

Return Description: True if the selection changed; otherwise False.

Example:

success = Action.ExpandSelection(8)

Action.GetFromImageBuffer(sourceLocation)

Description: Loads an image from an image-buffer location into the workspace.

Syntax: result = Action.GetFromImageBuffer(sourceLocation)

Parameter Description Default
sourceLocation (Integer, Optional) Source buffer index from 1 to 10. 1

Return Value: Boolean

Return Description: True if the image was loaded; otherwise False.

Example:

success = Action.GetFromImageBuffer(1)

Action.Paste()

Description: Pastes an image from the clipboard into the workspace.

Syntax: result = Action.Paste()

Return Value: Boolean

Return Description: True if an image was pasted; otherwise False.

Example:

success = Action.Paste()

Action.PasteAndFitToRectangle()

Description: Pastes an image from the clipboard and fits it to the current rectangle.

Syntax: result = Action.PasteAndFitToRectangle()

Return Value: Boolean

Return Description: True if an image was pasted; otherwise False.

Example:

success = Action.PasteAndFitToRectangle()

Action.PasteSelectionAsBinaryToBuffer(targetBufferIndex)

Description: Exports the current selection mask as a binary image to a buffer.

Syntax: result = Action.PasteSelectionAsBinaryToBuffer(targetBufferIndex)

Parameter Description Default
targetBufferIndex (Integer, Optional) Target buffer index from 1 to 10. 1

Return Value: Boolean

Return Description: True if the mask was written; otherwise False.

Example:

success = Action.PasteSelectionAsBinaryToBuffer(1)

Action.PutToImageBuffer(targetLocation)

Description: Copies the current image to an image-buffer location.

Syntax: result = Action.PutToImageBuffer(targetLocation)

Parameter Description Default
targetLocation (Integer, Optional) Target buffer index from 1 to 10. 1

Return Value: Boolean

Return Description: True if the image was stored; otherwise False.

Example:

success = Action.PutToImageBuffer(1)

Action.ReverseSelection()

Description: Inverts the current selection mask.

Syntax: result = Action.ReverseSelection()

Return Value: Boolean

Return Description: True if the selection was reversed; otherwise False.

Example:

success = Action.ReverseSelection()

Action.ShrinkSelection(shrinkByPixels)

Description: Shrinks the current selection by a specified number of pixels.

Syntax: result = Action.ShrinkSelection(shrinkByPixels)

Parameter Description Default
shrinkByPixels (Integer, Optional) Shrink distance in pixels. 5

Return Value: Boolean

Return Description: True if the selection changed; otherwise False.

Example:

success = Action.ShrinkSelection(3)

Action.SubtractSelectionFromBinaryImage(sourceImageLocation)

Description: Subtracts a binary image mask from the current selection using logical AND NOT.

Syntax: result = Action.SubtractSelectionFromBinaryImage(sourceImageLocation)

Parameter Description Default
sourceImageLocation (Integer, Optional) Source buffer index from 1 to 10. 1

Return Value: Boolean

Return Description: True if the selection was updated; otherwise False.

Example:

success = Action.SubtractSelectionFromBinaryImage(1)

Action.Unselect()

Description: Clears the current selection.

Syntax: result = Action.Unselect()

Return Value: Boolean

Return Description: True if the selection was cleared; otherwise False.

Example:

success = Action.Unselect()

Hardware & Capture Actions (2 functions)
Action.AcquireImagefromScanner(useSilentMode)

Description: Acquires an image from a scanner.

Syntax: result = Action.AcquireImagefromScanner(useSilentMode)

Parameter Description Default
useSilentMode (Boolean, Optional) Whether to acquire without showing the scanner UI. True

Return Value: Boolean

Return Description: True if acquisition succeeded; otherwise False.

Example:

success = Action.AcquireImagefromScanner(True)

Action.Capture()

Description: Captures an image from a connected camera or scanner.

Syntax: result = Action.Capture()

Return Value: Boolean

Return Description: True if capture succeeded; otherwise False.

Example:

success = Action.Capture()

Image Transforms & Filters (24 functions)
Action.AdvancedSharpening(sharpenAmountPercentage)

Description: Sharpens the image using the advanced sharpening filter.

Syntax: result = Action.AdvancedSharpening(sharpenAmountPercentage)

Parameter Description Default
sharpenAmountPercentage (Integer, Optional) Sharpening amount percentage. 100

Return Value: Boolean

Return Description: True if sharpening was applied; otherwise False.

Example:

success = Action.AdvancedSharpening(125)

Action.BoxAveraging(kernelSize)

Description: Smooths the image using a box-averaging filter.

Syntax: result = Action.BoxAveraging(kernelSize)

Parameter Description Default
kernelSize (Integer, Optional) Averaging kernel width and height in pixels. 3

Return Value: Boolean

Return Description: True if the filter was applied; otherwise False.

Example:

success = Action.BoxAveraging(5)

Action.ChromaKeyOverlay(sourceLocation1, targetColorRed, targetColorGreen, targetColorBlue, sourceLocation2, opacity, enableFeathering, featheringRadius, tolerance, softness)

Description: Overlays an image while making the selected chroma-key color transparent.

Syntax: result = Action.ChromaKeyOverlay(sourceLocation1, targetColorRed, targetColorGreen, targetColorBlue, sourceLocation2, opacity, enableFeathering, featheringRadius, tolerance, softness)

Parameter Description Default
sourceLocation1 (Integer, Optional) Foreground image source (0 for workspace, 1–10 for buffers). 1
targetColorRed (Integer, Optional) Red component of the chroma-key color (0–255). 0
targetColorGreen (Integer, Optional) Green component of the chroma-key color (0–255). 0
targetColorBlue (Integer, Optional) Blue component of the chroma-key color (0–255). 0
sourceLocation2 (Integer, Optional) Background image source (0 for workspace, 1–10 for buffers). 0
opacity (Integer, Optional) Overlay opacity percentage (0–100). 100
enableFeathering (Boolean, Optional) Whether to soften the keyed edge. False
featheringRadius (Integer, Optional) Edge feathering radius in pixels. 30
tolerance (Integer, Optional) Color matching tolerance range (0–100). 35
softness (Integer, Optional) Edge gradient softness range (0–100). 20

Return Value: Boolean

Return Description: True if the overlay was applied; otherwise False.

Example:

success = Action.ChromaKeyOverlay(1, 0, 255, 0, 0, 100, False, 30, 35, 20)

Action.Crop(cropWidthPixels, cropHeightPixels, startXCoordinate, startYCoordinate)

Description: Crops a rectangular area from the image.

Syntax: result = Action.Crop(cropWidthPixels, cropHeightPixels, startXCoordinate, startYCoordinate)

Parameter Description Default
cropWidthPixels (Integer, Optional) Crop width in pixels. 500
cropHeightPixels (Integer, Optional) Crop height in pixels. 500
startXCoordinate (Integer, Optional) Left coordinate of the crop in pixels. 0
startYCoordinate (Integer, Optional) Top coordinate of the crop in pixels. 0

Return Value: Boolean

Return Description: True if cropping was applied; otherwise False.

Example:

success = Action.Crop(500, 500, 0, 0)

Action.Dithering(ditheringAlgorithmType)

Description: Applies a dithering algorithm to reduce image color depth.

Syntax: result = Action.Dithering(ditheringAlgorithmType)

Parameter Description Default
ditheringAlgorithmType (Integer, Optional) Integer representing the dithering algorithm.
Supported ditheringAlgorithmType values:
0: Ordered
1: FloydSteinberg
0

Return Value: Boolean

Return Description: True if dithering was applied; otherwise False.

Example:

success = Action.Dithering(0)

Action.Emboss(angle, distance, strength, bias)

Description: Creates an embossed relief effect.

Syntax: result = Action.Emboss(angle, distance, strength, bias)

Parameter Description Default
angle (Single, Optional) Light-source angle in degrees. 135.0F
distance (Integer, Optional) Relief offset in pixels. 1
strength (Integer, Optional) Effect strength percentage. 100
bias (Integer, Optional) Output intensity bias. 128

Return Value: Boolean

Return Description: True if the effect was applied; otherwise False.

Example:

success = Action.Emboss(135.0F, 1, 100, 128)

Action.FFT()

Description: Transforms the image into the frequency domain using FFT.

Syntax: result = Action.FFT()

Return Value: Boolean

Return Description: True if the transform was applied; otherwise False.

Example:

success = Action.FFT()

Action.FlipHorizontally()

Description: Flips the image horizontally.

Syntax: result = Action.FlipHorizontally()

Return Value: Boolean

Return Description: True if the image was transformed; otherwise False.

Example:

success = Action.FlipHorizontally()

Action.FlipVertically()

Description: Flips the image vertically.

Syntax: result = Action.FlipVertically()

Return Value: Boolean

Return Description: True if the image was transformed; otherwise False.

Example:

success = Action.FlipVertically()

Action.GammaAdjustment(gammaValue)

Description: Adjusts image brightness using gamma correction.

Syntax: result = Action.GammaAdjustment(gammaValue)

Parameter Description Default
gammaValue (Double, Optional) Gamma correction value. 0.1

Return Value: Boolean

Return Description: True if the adjustment was applied; otherwise False.

Example:

success = Action.GammaAdjustment(0.8)

Action.GaussianFilter(kernelSize)

Description: Blurs the image using a Gaussian filter.

Syntax: result = Action.GaussianFilter(kernelSize)

Parameter Description Default
kernelSize (Integer, Optional) Gaussian kernel width and height in pixels. 3

Return Value: Boolean

Return Description: True if the filter was applied; otherwise False.

Example:

success = Action.GaussianFilter(5)

Action.ImageStamp(stampImageSource, locationX, locationY, scaleX, scaleY, angle, opacity, enableTransparentColor, transparentColorArgb, enableGradualAlpha, tolerance, enableFeather, featherRadius)

Description: Places and transforms a buffer image stamp over the current image.

Syntax: result = Action.ImageStamp(stampImageSource, locationX, locationY, scaleX, scaleY, angle, opacity, enableTransparentColor, transparentColorArgb, enableGradualAlpha, tolerance, enableFeather, featherRadius)

Parameter Description Default
stampImageSource (Integer, Optional) Stamp image source buffer index. 1
locationX (Integer, Optional) Stamp left coordinate in pixels. 0
locationY (Integer, Optional) Stamp top coordinate in pixels. 0
scaleX (Integer, Optional) Horizontal scale percentage. 100
scaleY (Integer, Optional) Vertical scale percentage. 100
angle (Single, Optional) Rotation angle in degrees. 0.0F
opacity (Integer, Optional) Stamp opacity percentage. 100
enableTransparentColor (Boolean, Optional) Whether to make a selected color transparent. False
transparentColorArgb (Integer, Optional) ARGB value of the transparent color. -1
enableGradualAlpha (Boolean, Optional) Whether to apply gradual alpha blending. False
tolerance (Integer, Optional) Transparent-color matching tolerance. 30
enableFeather (Boolean, Optional) Whether to feather stamp edges. False
featherRadius (Integer, Optional) Feathering radius in pixels. 10

Return Value: Boolean

Return Description: True if the stamp was applied; otherwise False.

Example:

success = Action.ImageStamp(1, 0, 0, 100, 100, 0.0F, 100, False, -1, False, 30, False, 10)

Action.InverseFFT()

Description: Reconstructs a spatial image from frequency-domain data using inverse FFT.

Syntax: result = Action.InverseFFT()

Return Value: Boolean

Return Description: True if the inverse transform was applied; otherwise False.

Example:

success = Action.InverseFFT()

Action.MosaicFilter(mosaicModeType, value)

Description: Applies a mosaic or pixelation effect.

Syntax: result = Action.MosaicFilter(mosaicModeType, value)

Parameter Description Default
mosaicModeType (Integer, Optional) Integer representing the mosaic mode.
Supported mosaicModeType values:
0: PixelSize – value is the block size in pixels
1: GridCount – value is the number of grid cells
0
value (Integer, Optional) Mosaic block size or mode-specific amount. 10

Return Value: Boolean

Return Description: True if the effect was applied; otherwise False.

Example:

success = Action.MosaicFilter(0, 10)

Action.OverlayImage(sourceLocation1, sourceLocation2, targetColorRed, targetColorGreen, targetColorBlue, opacity, enableFeathering, featheringRadius, tolerance, gradientAlpha)

Description: Overlays two workspace or buffer images with opacity, blending, and feathering options.

Syntax: result = Action.OverlayImage(sourceLocation1, sourceLocation2, targetColorRed, targetColorGreen, targetColorBlue, opacity, enableFeathering, featheringRadius, tolerance, gradientAlpha)

Parameter Description Default
sourceLocation1 (Integer, Optional) First image source (0 for workspace, 1–10 for buffers). 1
sourceLocation2 (Integer, Optional) Second image source (0 for workspace, 1–10 for buffers). 0
targetColorRed (Integer, Optional) Red component of the target color (0–255). 0
targetColorGreen (Integer, Optional) Green component of the target color (0–255). 0
targetColorBlue (Integer, Optional) Blue component of the target color (0–255). 0
opacity (Integer, Optional) Overlay opacity percentage. 100
enableFeathering (Boolean, Optional) Whether to feather the overlay edge. False
featheringRadius (Integer, Optional) Feathering radius in pixels. 30
tolerance (Integer, Optional) Color matching tolerance. 0
gradientAlpha (Boolean, Optional) Whether to apply gradual alpha blending. False

Return Value: Boolean

Return Description: True if the overlay was applied; otherwise False.

Example:

success = Action.OverlayImage(1, 0, 0, 0, 0, 100, False, 30, 0, False)

Action.Resize(resizeUnitType, maintainAspectRatio, baseDimensionType, targetWidth, targetHeight, interpolationAlgorithmType)

Description: Resizes the image to the requested dimensions using the selected interpolation.

Syntax: result = Action.Resize(resizeUnitType, maintainAspectRatio, baseDimensionType, targetWidth, targetHeight, interpolationAlgorithmType)

Parameter Description Default
resizeUnitType (Integer, Optional) Integer representing the resize units.
Supported resizeUnitType values:
0: Pixels
1: Percent
0
maintainAspectRatio (Boolean, Optional) Whether to preserve the image aspect ratio. True
baseDimensionType (Integer, Optional) Integer representing the dimension basis.
Supported baseDimensionType values:
0: Width
1: Height
0
targetWidth (Integer, Optional) Requested width. 800
targetHeight (Integer, Optional) Requested height. 600
interpolationAlgorithmType (Integer, Optional) Integer representing the interpolation algorithm.
Supported interpolationAlgorithmType values:
0: NearestNeighbor
1: Bilinear
2: Bicubic
3: HighQualityBilinear
4: HighQualityBicubic
4

Return Value: Boolean

Return Description: True if the image was resized; otherwise False.

Example:

success = Action.Resize(0, True, 0, 800, 600, 4)

Action.ResizeCanvas(resizeUnitType, maintainAspectRatio, baseDimensionType, targetWidth, targetHeight, canvasAlignmentType, backgroundColorRed, backgroundColorGreen, backgroundColorBlue)

Description: Resizes the canvas around the image with alignment and fill-color options.

Syntax: result = Action.ResizeCanvas(resizeUnitType, maintainAspectRatio, baseDimensionType, targetWidth, targetHeight, canvasAlignmentType, backgroundColorRed, backgroundColorGreen, backgroundColorBlue)

Parameter Description Default
resizeUnitType (Integer, Optional) Integer representing the resize units.
Supported resizeUnitType values:
0: Pixels
1: Percent
0
maintainAspectRatio (Boolean, Optional) Whether to preserve the image aspect ratio. True
baseDimensionType (Integer, Optional) Integer representing the dimension basis.
Supported baseDimensionType values:
0: Width
1: Height
0
targetWidth (Integer, Optional) Requested canvas width. 800
targetHeight (Integer, Optional) Requested canvas height. 600
canvasAlignmentType (Integer, Optional) Integer representing the image alignment.
Supported canvasAlignmentType values:
0: Center
1: LeftTop
2: RightTop
3: LeftBottom
4: RightBottom
0
backgroundColorRed (Integer, Optional) Red component of the canvas fill color (0–255). 255
backgroundColorGreen (Integer, Optional) Green component of the canvas fill color (0–255). 255
backgroundColorBlue (Integer, Optional) Blue component of the canvas fill color (0–255). 255

Return Value: Boolean

Return Description: True if the canvas was resized; otherwise False.

Example:

success = Action.ResizeCanvas(0, True, 0, 800, 600, 0, 255, 255, 255)

Action.Rotate(rotationAngleDegrees, rotationDirectionType, backgroundColorRed, backgroundColorGreen, backgroundColorBlue)

Description: Rotates the image by the requested angle and fills uncovered areas.

Syntax: result = Action.Rotate(rotationAngleDegrees, rotationDirectionType, backgroundColorRed, backgroundColorGreen, backgroundColorBlue)

Parameter Description Default
rotationAngleDegrees (Single, Optional) Rotation angle in degrees. 90.0F
rotationDirectionType (Integer, Optional) Integer representing the rotation direction.
Supported rotationDirectionType values:
0: CounterClockwise
1: Clockwise
1
backgroundColorRed (Integer, Optional) Red component of the fill color (0–255). 255
backgroundColorGreen (Integer, Optional) Green component of the fill color (0–255). 255
backgroundColorBlue (Integer, Optional) Blue component of the fill color (0–255). 255

Return Value: Boolean

Return Description: True if rotation was applied; otherwise False.

Example:

success = Action.Rotate(90.0F, 1, 255, 255, 255)

Action.RotationalAlignmentByLine(backgroundColorRed, backgroundColorGreen, backgroundColorBlue)

Description: Rotates the image to align it with a detected line.

Syntax: result = Action.RotationalAlignmentByLine(backgroundColorRed, backgroundColorGreen, backgroundColorBlue)

Parameter Description Default
backgroundColorRed (Integer, Optional) Red component of the fill color (0–255). 255
backgroundColorGreen (Integer, Optional) Green component of the fill color (0–255). 255
backgroundColorBlue (Integer, Optional) Blue component of the fill color (0–255). 255

Return Value: Boolean

Return Description: True if alignment was applied; otherwise False.

Example:

success = Action.RotationalAlignmentByLine(255, 255, 255)

Action.Sharpen3x3()

Description: Sharpens image details using a 3×3 convolution filter.

Syntax: result = Action.Sharpen3x3()

Return Value: Boolean

Return Description: True if sharpening was applied; otherwise False.

Example:

success = Action.Sharpen3x3()

Action.Sharpen5x5HighQuality(sharpenStrengthPercentage)

Description: Sharpens the image using a high-quality 5×5 filter.

Syntax: result = Action.Sharpen5x5HighQuality(sharpenStrengthPercentage)

Parameter Description Default
sharpenStrengthPercentage (Integer, Optional) Sharpening strength percentage. 10

Return Value: Boolean

Return Description: True if sharpening was applied; otherwise False.

Example:

success = Action.Sharpen5x5HighQuality(20)

Action.SmartDenoise(radius, threshold)

Description: Reduces image noise while preserving edges.

Syntax: result = Action.SmartDenoise(radius, threshold)

Parameter Description Default
radius (Integer, Optional) Denoising neighborhood radius. 5
threshold (Integer, Optional) Noise similarity threshold. 30

Return Value: Boolean

Return Description: True if denoising was applied; otherwise False.

Example:

success = Action.SmartDenoise(5, 30)

Action.StackBlur(kernelSize)

Description: Blurs the image using a high-speed Stack Blur algorithm.

Syntax: result = Action.StackBlur(kernelSize)

Parameter Description Default
kernelSize (Integer, Optional) Blur radius (half size of the kernel) in pixels. Range: 1 to 100. 3

Return Value: Boolean

Return Description: True if the filter was applied; otherwise False.

Example:

success = Action.StackBlur(5)

Action.TextAnnotation(textString, locationX, locationY, fontName, fontSize, fontStyleInt, innerColorArgb, outerColorArgb, opacity, outlineThickness, angle, isAntiAlias)

Description: Adds a styled text annotation or watermark to the image.

Syntax: result = Action.TextAnnotation(textString, locationX, locationY, fontName, fontSize, fontStyleInt, innerColorArgb, outerColorArgb, opacity, outlineThickness, angle, isAntiAlias)

Parameter Description Default
textString (String, Optional) Text to draw. "Text"
locationX (Integer, Optional) Text left coordinate in pixels. 0
locationY (Integer, Optional) Text top coordinate in pixels. 0
fontName (String, Optional) Font family name. "Arial"
fontSize (Single, Optional) Font size in points. 12.0F
fontStyleInt (Integer, Optional) Integer representing the font style.
Supported fontStyleInt values:
0: Regular
1: Bold
2: Italic
3: Bold Italic
4: Underline
8: Strikeout
0
innerColorArgb (Integer, Optional) ARGB value of the text fill color. -256
outerColorArgb (Integer, Optional) ARGB value of the outline color. -16777216
opacity (Integer, Optional) Text opacity percentage. 100
outlineThickness (Single, Optional) Outline thickness in pixels. 1.0F
angle (Single, Optional) Text rotation angle in degrees. 0.0F
isAntiAlias (Boolean, Optional) Whether to antialias the text. True

Return Value: Boolean

Return Description: True if the annotation was drawn; otherwise False.

Example:

success = Action.TextAnnotation("Sample", 20, 20, "Arial", 12.0F, 0, -256, -16777216, 100, 1.0F, 0.0F, True)

Neural & AI Processing Actions (21 functions)
Action.AIAutoSubjectSelectionGeneral()

Description: Automatically selects the main subject in a general image.

Syntax: result = Action.AIAutoSubjectSelectionGeneral()

Return Value: Boolean

Return Description: True if subject selection succeeded; otherwise False.

Example:

success = Action.AIAutoSubjectSelectionGeneral()

Action.AIAutoSubjectSelectionPortrait()

Description: Automatically selects the subject in a portrait image.

Syntax: result = Action.AIAutoSubjectSelectionPortrait()

Return Value: Boolean

Return Description: True if subject selection succeeded; otherwise False.

Example:

success = Action.AIAutoSubjectSelectionPortrait()

Action.AIBackgroundRemovalGeneral(virtualBackgroundColorRed, virtualBackgroundColorGreen, virtualBackgroundColorBlue)

Description: Removes the background from a general image and fills it with a color.

Syntax: result = Action.AIBackgroundRemovalGeneral(virtualBackgroundColorRed, virtualBackgroundColorGreen, virtualBackgroundColorBlue)

Parameter Description Default
virtualBackgroundColorRed (Integer, Optional) Replacement background red component (0–255). 255
virtualBackgroundColorGreen (Integer, Optional) Replacement background green component (0–255). 255
virtualBackgroundColorBlue (Integer, Optional) Replacement background blue component (0–255). 255

Return Value: Boolean

Return Description: True if background removal succeeded; otherwise False.

Example:

success = Action.AIBackgroundRemovalGeneral(255, 255, 255)

Action.AIBackgroundRemovalPortrait(virtualBackgroundColorRed, virtualBackgroundColorGreen, virtualBackgroundColorBlue)

Description: Removes the background from a portrait image and fills it with a color.

Syntax: result = Action.AIBackgroundRemovalPortrait(virtualBackgroundColorRed, virtualBackgroundColorGreen, virtualBackgroundColorBlue)

Parameter Description Default
virtualBackgroundColorRed (Integer, Optional) Replacement background red component (0–255). 255
virtualBackgroundColorGreen (Integer, Optional) Replacement background green component (0–255). 255
virtualBackgroundColorBlue (Integer, Optional) Replacement background blue component (0–255). 255

Return Value: Boolean

Return Description: True if background removal succeeded; otherwise False.

Example:

success = Action.AIBackgroundRemovalPortrait(255, 255, 255)

Action.AIBackgroundRemovalSelfie(virtualBackgroundColorRed, virtualBackgroundColorGreen, virtualBackgroundColorBlue)

Description: Removes the background from a selfie and fills it with a color.

Syntax: result = Action.AIBackgroundRemovalSelfie(virtualBackgroundColorRed, virtualBackgroundColorGreen, virtualBackgroundColorBlue)

Parameter Description Default
virtualBackgroundColorRed (Integer, Optional) Replacement background red component (0–255). 255
virtualBackgroundColorGreen (Integer, Optional) Replacement background green component (0–255). 255
virtualBackgroundColorBlue (Integer, Optional) Replacement background blue component (0–255). 255

Return Value: Boolean

Return Description: True if background removal succeeded; otherwise False.

Example:

success = Action.AIBackgroundRemovalSelfie(255, 255, 255)

Action.AIBinarizationSegmentation()

Description: Segments a document image and binarizes it using an AI model.

Syntax: result = Action.AIBinarizationSegmentation()

Return Value: Boolean

Return Description: True if segmentation and binarization succeeded; otherwise False.

Example:

success = Action.AIBinarizationSegmentation()

Action.AICustomBinarization(targetModelName)

Description: Binarizes the image using a selected custom ONNX model.

Syntax: result = Action.AICustomBinarization(targetModelName)

Parameter Description Default
targetModelName (String, Optional) Model name to use; an empty string selects the default model. ""

Return Value: Boolean

Return Description: True if binarization succeeded; otherwise False.

Example:

success = Action.AICustomBinarization("")

Action.AIDepthEstimation(autoResizeLargeImages)

Description: Estimates an image depth map using an AI model.

Syntax: result = Action.AIDepthEstimation(autoResizeLargeImages)

Parameter Description Default
autoResizeLargeImages (Boolean, Optional) Whether to resize large images before inference. True

Return Value: Boolean

Return Description: True if depth estimation succeeded; otherwise False.

Example:

success = Action.AIDepthEstimation(True)

Action.AIDocumentUnwarping()

Description: Straightens and unwarps a perspective-distorted document image.

Syntax: result = Action.AIDocumentUnwarping()

Return Value: Boolean

Return Description: True if document unwarping succeeded; otherwise False.

Example:

success = Action.AIDocumentUnwarping()

Action.AIImageQualityRestorationFast(restorationBoostFactor)

Description: Restores a low-quality image using the fast AI model.

Syntax: result = Action.AIImageQualityRestorationFast(restorationBoostFactor)

Parameter Description Default
restorationBoostFactor (Single, Optional) Restoration boost factor. 1.0F

Return Value: Boolean

Return Description: True if restoration succeeded; otherwise False.

Example:

success = Action.AIImageQualityRestorationFast(1.0F)

Action.AIImageQualityRestorationFastest()

Description: Restores a low-quality image using the fastest AI preview model.

Syntax: result = Action.AIImageQualityRestorationFastest()

Return Value: Boolean

Return Description: True if restoration succeeded; otherwise False.

Example:

success = Action.AIImageQualityRestorationFastest()

Action.AIImageQualityRestorationSlow()

Description: Restores a low-quality image using the slower, more accurate AI model.

Syntax: result = Action.AIImageQualityRestorationSlow()

Return Value: Boolean

Return Description: True if restoration succeeded; otherwise False.

Example:

success = Action.AIImageQualityRestorationSlow()

Action.AIImageQualityRestorationSlowest()

Description: Restores a low-quality image using the highest-quality AI model.

Syntax: result = Action.AIImageQualityRestorationSlowest()

Return Value: Boolean

Return Description: True if restoration succeeded; otherwise False.

Example:

success = Action.AIImageQualityRestorationSlowest()

Action.AIImageSharpening(sharpenBoostFactor)

Description: Sharpens the image using AI enhancement.

Syntax: result = Action.AIImageSharpening(sharpenBoostFactor)

Parameter Description Default
sharpenBoostFactor (Single, Optional) AI sharpening boost factor. 2.5F

Return Value: Boolean

Return Description: True if sharpening succeeded; otherwise False.

Example:

success = Action.AIImageSharpening(2.5F)

Action.AIImageUpscaleRealESRFast()

Description: Upscales the image using the fast RealESRGAN model variant.

Syntax: result = Action.AIImageUpscaleRealESRFast()

Return Value: Boolean

Return Description: True if upscaling succeeded; otherwise False.

Example:

success = Action.AIImageUpscaleRealESRFast()

Action.AIImageUpscaleRealESRGAN(upscaleMagnificationType)

Description: Upscales the image using the RealESRGAN AI model.

Syntax: result = Action.AIImageUpscaleRealESRGAN(upscaleMagnificationType)

Parameter Description Default
upscaleMagnificationType (Integer, Optional) Integer representing the upscaling magnification.
Supported upscaleMagnificationType values:
2: 2x
4: 4x
8: 8x
4

Return Value: Boolean

Return Description: True if upscaling succeeded; otherwise False.

Example:

success = Action.AIImageUpscaleRealESRGAN(4)

Action.AIInpainting()

Description: Removes unwanted image content using AI inpainting.

Syntax: result = Action.AIInpainting()

Return Value: Boolean

Return Description: True if inpainting succeeded; otherwise False.

Example:

success = Action.AIInpainting()

Action.AIObjectDetection(confidenceThreshold, nmsThreshold, enableTiling, targetClasses, drawBoundingBoxes, showConfidence, boxColorRed, boxColorGreen, boxColorBlue, exportCSV, csvExportDirectory)

Description: Detects objects with YOLOv3 and optionally draws boxes or exports a CSV.

Syntax: result = Action.AIObjectDetection(confidenceThreshold, nmsThreshold, enableTiling, targetClasses, drawBoundingBoxes, showConfidence, boxColorRed, boxColorGreen, boxColorBlue, exportCSV, csvExportDirectory)

Parameter Description Default
confidenceThreshold (Single, Optional) Minimum detection confidence. 0.5F
nmsThreshold (Single, Optional) Non-maximum suppression threshold. 0.4F
enableTiling (Boolean, Optional) Whether to process the image in tiles. False
targetClasses (String, Optional) Comma-separated target class names; empty selects all classes. ""
drawBoundingBoxes (Boolean, Optional) Whether to draw detected bounding boxes. True
showConfidence (Boolean, Optional) Whether to show confidence values with boxes. True
boxColorRed (Integer, Optional) Bounding-box red component (0–255). 255
boxColorGreen (Integer, Optional) Bounding-box green component (0–255). 0
boxColorBlue (Integer, Optional) Bounding-box blue component (0–255). 0
exportCSV (Boolean, Optional) Whether to export detection results as CSV. False
csvExportDirectory (String, Optional) Directory for CSV output. ""

Return Value: Boolean

Return Description: True if detection completed; otherwise False.

Example:

success = Action.AIObjectDetection(0.5F, 0.4F, False, "", True, True, 255, 0, 0, False, "")

Action.AIOverExposureCorrection()

Description: Restores details in an overexposed image using an AI model.

Syntax: result = Action.AIOverExposureCorrection()

Return Value: Boolean

Return Description: True if correction succeeded; otherwise False.

Example:

success = Action.AIOverExposureCorrection()

Action.AISmartSelection()

Description: Creates an intelligent selection using image content analysis.

Syntax: result = Action.AISmartSelection()

Return Value: Boolean

Return Description: True if the selection was created; otherwise False.

Example:

success = Action.AISmartSelection()

Action.AIUnderExposureCorrection()

Description: Restores details in an underexposed image using an AI model.

Syntax: result = Action.AIUnderExposureCorrection()

Return Value: Boolean

Return Description: True if correction succeeded; otherwise False.

Example:

success = Action.AIUnderExposureCorrection()

Processing & Morphological Actions (22 functions)
Action.AdaptiveThresholding(adaptiveBoxSize, adaptiveThresholdLevel, isObjectColorAutomatic, manualObjectColorType)

Description: Applies adaptive thresholding to images with varying illumination.

Syntax: result = Action.AdaptiveThresholding(adaptiveBoxSize, adaptiveThresholdLevel, isObjectColorAutomatic, manualObjectColorType)

Parameter Description Default
adaptiveBoxSize (Integer, Optional) Box size used for local threshold calculation. 80
adaptiveThresholdLevel (Integer, Optional) Threshold tuning level. 86
isObjectColorAutomatic (Boolean, Optional) Whether to detect object color automatically. True
manualObjectColorType (Integer, Optional) Integer representing the manual object color.
Supported manualObjectColorType values (used when automatic detection is disabled):
0: White
1: Black
0

Return Value: Boolean

Return Description: True if thresholding succeeded; otherwise False.

Example:

success = Action.AdaptiveThresholding(100, 90, False, 1)

Action.BinaryOperation(logicalOperationType, firstImageSourceLocation, secondImageSourceLocation)

Description: Performs a logical operation between two workspace or buffer images.

Syntax: result = Action.BinaryOperation(logicalOperationType, firstImageSourceLocation, secondImageSourceLocation)

Parameter Description Default
logicalOperationType (Integer, Optional) Integer representing the binary logical operation.
Supported logicalOperationType values:
0: AND
1: OR
2: XOR
0
firstImageSourceLocation (Integer, Optional) First image source index. 0
secondImageSourceLocation (Integer, Optional) Second image source index. 1

Return Value: Boolean

Return Description: True if the operation succeeded; otherwise False.

Example:

success = Action.BinaryOperation(0, 0, 1)

Action.BoundaryDetection(boundaryOverlayModeType)

Description: Detects object boundaries using the selected overlay mode.

Syntax: result = Action.BoundaryDetection(boundaryOverlayModeType)

Parameter Description Default
boundaryOverlayModeType (Integer, Optional) Integer representing the boundary overlay mode.
Supported boundaryOverlayModeType values:
0: WithOverlay – draw boundaries over the original image
1: WithoutOverlay – draw boundaries only
0

Return Value: Boolean

Return Description: True if boundary detection succeeded; otherwise False.

Example:

success = Action.BoundaryDetection(0)

Action.CannyEdge(cannyHighThreshold)

Description: Detects edges using the Canny algorithm.

Syntax: result = Action.CannyEdge(cannyHighThreshold)

Parameter Description Default
cannyHighThreshold (Integer, Optional) High threshold used by the Canny detector. 100

Return Value: Boolean

Return Description: True if detection succeeded; otherwise False.

Example:

success = Action.CannyEdge(100)

Action.ChangeNonBlackToWhite()

Description: Converts every non-black pixel to white.

Syntax: result = Action.ChangeNonBlackToWhite()

Return Value: Boolean

Return Description: True if conversion succeeded; otherwise False.

Example:

success = Action.ChangeNonBlackToWhite()

Action.DifferentialImage(firstImageSourceLocation, secondImageSourceLocation)

Description: Computes the difference between two workspace or buffer images.

Syntax: result = Action.DifferentialImage(firstImageSourceLocation, secondImageSourceLocation)

Parameter Description Default
firstImageSourceLocation (Integer, Optional) First image source index. 0
secondImageSourceLocation (Integer, Optional) Second image source index. 1

Return Value: Boolean

Return Description: True if the difference image was created; otherwise False.

Example:

success = Action.DifferentialImage(0, 1)

Action.Dilate(morphologyKernelSize)

Description: Applies morphological dilation to expand foreground objects.

Syntax: result = Action.Dilate(morphologyKernelSize)

Parameter Description Default
morphologyKernelSize (Integer, Optional) Morphological kernel size. 3

Return Value: Boolean

Return Description: True if dilation was applied; otherwise False.

Example:

success = Action.Dilate(3)

Action.DilateOutline()

Description: Dilates traced outlines to make them thicker.

Syntax: result = Action.DilateOutline()

Return Value: Boolean

Return Description: True if outlines were dilated; otherwise False.

Example:

success = Action.DilateOutline()

Action.DrawSelectionBorder(borderColorRed, borderColorGreen, borderColorBlue, borderThicknessPixels, borderOpacityPercentage, applyToMultipleROIs)

Description: Draws a colored border around the selected region or ROIs.

Syntax: result = Action.DrawSelectionBorder(borderColorRed, borderColorGreen, borderColorBlue, borderThicknessPixels, borderOpacityPercentage, applyToMultipleROIs)

Parameter Description Default
borderColorRed (Integer, Optional) Border red component (0–255). 0
borderColorGreen (Integer, Optional) Border green component (0–255). 0
borderColorBlue (Integer, Optional) Border blue component (0–255). 0
borderThicknessPixels (Integer, Optional) Border thickness in pixels. 1
borderOpacityPercentage (Integer, Optional) Border opacity percentage. 100
applyToMultipleROIs (Boolean, Optional) Whether to apply to multiple ROIs. False

Return Value: Boolean

Return Description: True if the border was drawn; otherwise False.

Example:

success = Action.DrawSelectionBorder(0, 0, 0, 1, 100, False)

Action.EdgeDetection(edgeDetectionAlgorithmType)

Description: Detects image edges using the selected algorithm.

Syntax: result = Action.EdgeDetection(edgeDetectionAlgorithmType)

Parameter Description Default
edgeDetectionAlgorithmType (Integer, Optional) Integer representing the edge detection algorithm.
Supported edgeDetectionAlgorithmType values:
0: Homogeneity
1: Sobel
2: LeftHand
3: UpperLeftHand
0

Return Value: Boolean

Return Description: True if detection succeeded; otherwise False.

Example:

success = Action.EdgeDetection(0)

Action.Erode(morphologyKernelSize)

Description: Applies morphological erosion to shrink foreground objects.

Syntax: result = Action.Erode(morphologyKernelSize)

Parameter Description Default
morphologyKernelSize (Integer, Optional) Morphological kernel size. 3

Return Value: Boolean

Return Description: True if erosion was applied; otherwise False.

Example:

success = Action.Erode(3)

Action.ErodeOutline()

Description: Erodes traced outlines to make them thinner.

Syntax: result = Action.ErodeOutline()

Return Value: Boolean

Return Description: True if outlines were eroded; otherwise False.

Example:

success = Action.ErodeOutline()

Action.FillRegion(fillRegionType, fillColorRed, fillColorGreen, fillColorBlue, fillOpacityPercentage)

Description: Fills the selected region or ROI with a color and opacity.

Syntax: result = Action.FillRegion(fillRegionType, fillColorRed, fillColorGreen, fillColorBlue, fillOpacityPercentage)

Parameter Description Default
fillRegionType (Integer, Optional) Integer representing the fill target.
Supported fillRegionType values:
0: Inside – fill inside the region
1: Outside – fill outside the region
0
fillColorRed (Integer, Optional) Fill color red component (0–255). 0
fillColorGreen (Integer, Optional) Fill color green component (0–255). 0
fillColorBlue (Integer, Optional) Fill color blue component (0–255). 0
fillOpacityPercentage (Integer, Optional) Fill opacity percentage. 100

Return Value: Boolean

Return Description: True if the region was filled; otherwise False.

Example:

success = Action.FillRegion(0, 0, 0, 0, 100)

Action.HideOutlines(targetColorRed, targetColorGreen, targetColorBlue, useMostFrequentColor)

Description: Hides object outlines using a specified or most frequent color.

Syntax: result = Action.HideOutlines(targetColorRed, targetColorGreen, targetColorBlue, useMostFrequentColor)

Parameter Description Default
targetColorRed (Integer, Optional) Replacement red component (0–255). 255
targetColorGreen (Integer, Optional) Replacement green component (0–255). 255
targetColorBlue (Integer, Optional) Replacement blue component (0–255). 255
useMostFrequentColor (Boolean, Optional) Whether to use the most frequent image color instead. True

Return Value: Boolean

Return Description: True if outlines were hidden; otherwise False.

Example:

success = Action.HideOutlines(255, 255, 255, True)

Action.ManualThresholding(binarizationThresholdValue)

Description: Converts the image to binary using a manual intensity threshold.

Syntax: result = Action.ManualThresholding(binarizationThresholdValue)

Parameter Description Default
binarizationThresholdValue (Integer, Optional) Threshold intensity. 128

Return Value: Boolean

Return Description: True if binarization succeeded; otherwise False.

Example:

success = Action.ManualThresholding(128)

Action.MultiStepThresholding(redChannelLevels, greenChannelLevels, blueChannelLevels)

Description: Applies multilevel thresholding independently to RGB channels.

Syntax: result = Action.MultiStepThresholding(redChannelLevels, greenChannelLevels, blueChannelLevels)

Parameter Description Default
redChannelLevels (Integer, Optional) Number of red-channel intensity levels. 5
greenChannelLevels (Integer, Optional) Number of green-channel intensity levels. 5
blueChannelLevels (Integer, Optional) Number of blue-channel intensity levels. 5

Return Value: Boolean

Return Description: True if thresholding succeeded; otherwise False.

Example:

success = Action.MultiStepThresholding(5, 5, 5)

Action.Outline(isInverted, applyBinarization)

Description: Traces object outlines while always preserving the original pixel colors on the extracted outlines.

Syntax: result = Action.Outline(isInverted, applyBinarization)

Parameter Description Default
isInverted (Boolean, Optional) Whether to invert the binarization or background result before extracting outlines (dark objects on a light background). False
applyBinarization (Boolean, Optional) Whether to apply threshold-based pre-binarization for boundary detection. Set to False to skip binarization and extract boundaries directly from all non-zero color regions (e.g., after Region Coloring) without brightness threshold loss. Original outline colors are preserved in both modes. True

Return Value: Boolean

Return Description: True if outlines were traced; otherwise False.

Example:

success = Action.Outline(False, False)

Action.RegionColoring(connectivity)

Description: Colors connected image regions to distinguish them.

Syntax: result = Action.RegionColoring(connectivity)

Parameter Description Default
connectivity (Integer, Optional) Integer representing the pixel connectivity.
Supported connectivity values:
4: 4-connected (FourWay)
8: 8-connected (EightWay); any other value is treated as 8
8

Return Value: Boolean

Return Description: True if the regions were colored; otherwise False.

Example:

success = Action.RegionColoring(8)

Action.RemoveDots(dotMode, maxDotSize, connectivity)

Description: Removes small connected components from a binary image.

Syntax: result = Action.RemoveDots(dotMode, maxDotSize, connectivity)

Parameter Description Default
dotMode (Integer) Integer representing the target dots.
Supported dotMode values:
0: Black dots
1: White dots (also used for any other value)
2: Both black and white dots
—
maxDotSize (Integer) Maximum component area in pixels to remove. —
connectivity (Integer, Optional) Integer representing pixel connectivity.
Supported connectivity values:
4: 4-connected (FourWay)
8: 8-connected (EightWay); any other value is treated as 8
8

Return Value: Boolean

Return Description: True if dot removal succeeded; otherwise False.

Example:

success = Action.RemoveDots(2, 20, 8)

Action.Skeletonize(isExtended, isInverted, minBranchLength, tailLength)

Description: Reduces binary objects to one-pixel-wide skeletons.

Syntax: result = Action.Skeletonize(isExtended, isInverted, minBranchLength, tailLength)

Parameter Description Default
isExtended (Boolean, Optional) Whether to use extended skeleton processing. True
isInverted (Boolean, Optional) Whether to invert the binary image before processing. False
minBranchLength (Integer, Optional) Minimum branch length to retain. 15
tailLength (Integer, Optional) Tail length setting for skeleton processing. 10

Return Value: Boolean

Return Description: True if skeletonization succeeded; otherwise False.

Example:

success = Action.Skeletonize(True, False, 15, 10)

Action.SuperPixelSegmentation(numSuperpixels, compactness, fillWithWhite)

Description: Segments the image into superpixels.

Syntax: result = Action.SuperPixelSegmentation(numSuperpixels, compactness, fillWithWhite)

Parameter Description Default
numSuperpixels (Integer, Optional) Requested number of superpixels. 400
compactness (Single, Optional) Superpixel compactness factor. 30.0F
fillWithWhite (Boolean, Optional) Whether to fill superpixel regions with white. False

Return Value: Boolean

Return Description: True if segmentation succeeded; otherwise False.

Example:

success = Action.SuperPixelSegmentation(400, 30.0F, False)

Action.WatershedSegmentation(minDistanceThreshold, smoothingRadius, boundaryThickness, boundaryColorRed, boundaryColorGreen, boundaryColorBlue)

Description: Segments touching objects using watershed separation.

Syntax: result = Action.WatershedSegmentation(minDistanceThreshold, smoothingRadius, boundaryThickness, boundaryColorRed, boundaryColorGreen, boundaryColorBlue)

Parameter Description Default
minDistanceThreshold (Integer, Optional) Minimum distance threshold between object centers. 10
smoothingRadius (Integer, Optional) Pre-segmentation smoothing radius. 3
boundaryThickness (Integer, Optional) Boundary thickness in pixels. 1
boundaryColorRed (Integer, Optional) Boundary red component (0–255). 255
boundaryColorGreen (Integer, Optional) Boundary green component (0–255). 0
boundaryColorBlue (Integer, Optional) Boundary blue component (0–255). 0

Return Value: Boolean

Return Description: True if segmentation succeeded; otherwise False.

Example:

success = Action.WatershedSegmentation(10, 3, 1, 255, 0, 0)

System & Workspace Actions (8 functions)
Action.ActivateUndoEngine()

Description: Activates undo tracking for workspace operations.

Syntax: Action.ActivateUndoEngine()

Return Value: Void

Return Description: Void.

Example:

Action.ActivateUndoEngine()

Action.DeactivateUndoEngine()

Description: Deactivates undo tracking for workspace operations.

Syntax: Action.DeactivateUndoEngine()

Return Value: Void

Return Description: Void.

Example:

Action.DeactivateUndoEngine()

Action.GetImage(sourceLocation)

Description: Returns a clone of the workspace image or an image-buffer image.

Syntax: result = Action.GetImage(sourceLocation)

Parameter Description Default
sourceLocation (Integer, Optional) 0 selects the workspace; 1–10 selects a buffer. 0

Return Value: Bitmap

Return Description: Bitmap clone, or Nothing when unavailable or export is not allowed.

Example:

bitmap = Action.GetImage(0)

Action.SaveImage(sourceBitmap, destFileName, jpegQuality)

Description: Saves a bitmap image to the specified file path.

Syntax: result = Action.SaveImage(sourceBitmap, destFileName, jpegQuality)

Parameter Description Default
sourceBitmap (Bitmap) Bitmap to save. —
destFileName (String) Destination file path. —
jpegQuality (Integer, Optional) JPEG quality from 0 to 100. 90

Return Value: String

Return Description: String containing the save result or an error message.

Example:

message = Action.SaveImage(bitmap, "C:\Images\result.jpg", 90)

Action.SaveImageDialog(targetBitmap, selectedExtension, selectedQuality)

Description: Opens a dialog to save an image with the selected format and quality.

Syntax: Action.SaveImageDialog(targetBitmap, selectedExtension, selectedQuality)

Parameter Description Default
targetBitmap (Bitmap) Bitmap to save. —
selectedExtension (String) Selected file extension. —
selectedQuality (Integer) JPEG quality setting. —

Return Value: Void

Return Description: Void. Throws an exception if export is not allowed.

Example:

Action.SaveImageDialog(bitmap, ".jpg", 90)

Action.SaveWorkspaceAs()

Description: Saves the current workspace with a new name.

Syntax: Action.SaveWorkspaceAs()

Return Value: Void

Return Description: Void. Throws an exception if export is not allowed.

Example:

Action.SaveWorkspaceAs()

Action.SaveWorkspaceSelectionAs()

Description: Saves the current workspace selection as a new file.

Syntax: Action.SaveWorkspaceSelectionAs()

Return Value: Void

Return Description: Void. Throws an exception if export is not allowed.

Example:

Action.SaveWorkspaceSelectionAs()

Action.SetImage(newImage, targetLocation)

Description: Sets the workspace image or an image-buffer image from a bitmap clone.

Syntax: result = Action.SetImage(newImage, targetLocation)

Parameter Description Default
newImage (Bitmap) Image to assign. —
targetLocation (Integer, Optional) 0 selects the workspace; 1–10 selects a buffer. 0

Return Value: Boolean

Return Description: True when the image is assigned; otherwise False.

Example:

success = Action.SetImage(bitmap, 0)

2. DNNClassifier (ScriptDNNClassifierHelper) – 3 functions

Description: Provides DNN-based image classification capabilities. Allows scripts to dynamically load trained ML.NET models and predict class labels for images.

Neural & AI Processing Actions (3 functions)
DNNClassifier.GetLastError()

Description: Returns the most recent error message produced by the helper.

Syntax: result = DNNClassifier.GetLastError()

Return Value: String

Return Description: The last error message, or an empty string when no error is recorded.

Example:

errorMessage = classifier.GetLastError()

DNNClassifier.LoadModel(modelFilename, forceReload)

Description: Loads an ML.NET image-classification model from the Classification Models folder.

Syntax: result = DNNClassifier.LoadModel(modelFilename, forceReload)

Parameter Description Default
modelFilename (String) Model ZIP file name. —
forceReload (Boolean, Optional) Whether to reload the model when the same model is already loaded. False

Return Value: Boolean

Return Description: True when the model is loaded or already loaded; otherwise False.

Example:

loaded = classifier.LoadModel("model.zip", True)

DNNClassifier.Predict(img)

Description: Predicts the class label for the supplied bitmap image.

Syntax: result = DNNClassifier.Predict(img)

Parameter Description Default
img (Bitmap) Image to classify. —

Return Value: String

Return Description: Predicted class label, or an empty string if prediction fails.

Example:

label = classifier.Predict(bitmap)

3. ImgProc (ScriptImgProcHelper) – 262 functions
Color & Channel Actions (68 functions)
ImgProc.ARGBToARGBInteger(_AlphaValue, _RedValue, _GreenValue, _BlueValue)

Description: Converts ARGB values to integer.

Syntax: result = ImgProc.ARGBToARGBInteger(_AlphaValue, _RedValue, _GreenValue, _BlueValue)

Parameter Description Default
_AlphaValue (Integer) Alpha channel value (0-255). —
_RedValue (Integer) Red channel value (0-255). —
_GreenValue (Integer) Green channel value (0-255). —
_BlueValue (Integer) Blue channel value (0-255). —

Return Value: Integer

Return Description: ARGB color as integer, or 0 if conversion fails.

Example:

color = imgproc.ARGBToARGBInteger(255, 255, 0, 0)

ImgProc.ARGBToColor(AlphaInByte, RedInByte, GreenInByte, BlueInByte)

Description: Converts ARGB bytes to Color object.

Syntax: result = ImgProc.ARGBToColor(AlphaInByte, RedInByte, GreenInByte, BlueInByte)

Parameter Description Default
AlphaInByte (Integer) Alpha channel value (0-255). —
RedInByte (Integer) Red channel value (0-255). —
GreenInByte (Integer) Green channel value (0-255). —
BlueInByte (Integer) Blue channel value (0-255). —

Return Value: Color

Return Description: Color object, or default color if conversion fails.

Example:

clr = imgproc.ARGBToColor(255, 255, 0, 0)

ImgProc.Change_Color(SourceImage, ColorOfInterest_RGBInt, ChangeToR, ChangeToG, ChangeToB, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Changes specified color to new color throughout image.

Syntax: result = ImgProc.Change_Color(SourceImage, ColorOfInterest_RGBInt, ChangeToR, ChangeToG, ChangeToB, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to modify.
Type: Bitmap; required; passed by reference.
—
ColorOfInterest_RGBInt (Integer) RGB color to replace. —
ChangeToR (Byte) New red channel value. —
ChangeToG (Byte) New green channel value. —
ChangeToB (Byte) New blue channel value. —
IsShowProgress (Boolean, Optional) Whether to show progress. True
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Modified image, or Nothing if operation fails.

Example:

modified = imgproc.Change_Color(bitmap, RGB(255,0,0), 0, 255, 0)

ImgProc.Change_Color_ByRGB(SourceImage, ColorOfInterestR, ColorOfInterestG, ColorOfInterestB, ChangeToR, ChangeToG, ChangeToB, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Changes specified RGB color to new RGB color.

Syntax: result = ImgProc.Change_Color_ByRGB(SourceImage, ColorOfInterestR, ColorOfInterestG, ColorOfInterestB, ChangeToR, ChangeToG, ChangeToB, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to modify.
Type: Bitmap; required; passed by reference.
—
ColorOfInterestR (Byte) Red channel of color to replace. —
ColorOfInterestG (Byte) Green channel of color to replace. —
ColorOfInterestB (Byte) Blue channel of color to replace. —
ChangeToR (Byte) New red channel value. —
ChangeToG (Byte) New green channel value. —
ChangeToB (Byte) New blue channel value. —
IsShowProgress (Boolean, Optional) Whether to show progress. True
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Modified image, or Nothing if operation fails.

Example:

modified = imgproc.Change_Color_ByRGB(bitmap, 255, 0, 0, 0, 255, 0)

ImgProc.Check_RGBInTextBox(Text_R, Text_G, Text_B)

Description: Validates RGB values in text boxes.

Syntax: ImgProc.Check_RGBInTextBox(Text_R, Text_G, Text_B)

Parameter Description Default
Text_R (TextBox) TextBox containing red value. —
Text_G (TextBox) TextBox containing green value. —
Text_B (TextBox) TextBox containing blue value. —

Return Value: Void

Return Description: None.

Example:

imgproc.Check_RGBInTextBox(txtRed, txtGreen, txtBlue)

ImgProc.CIELab(original, lShift, aShift, bShift, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Converts image to CIELab color space with adjustable L, a, b channels.

Syntax: result = ImgProc.CIELab(original, lShift, aShift, bShift, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
original (Bitmap) Source image to convert. —
lShift (Integer) Lightness shift (-127 to 127). —
aShift (Integer) a channel shift green-to-red (-127 to 127). —
bShift (Integer) b channel shift blue-to-yellow (-127 to 127). —
MaskImage (Image, Optional) Optional mask to constrain conversion. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: CIELab-converted image, or Nothing if conversion fails.

Example:

cielab = imgproc.CIELab(bitmap, 0, 10, -10)

ImgProc.ColorDeconvolution(SourceImage, StainType, ShowColor, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Applies color deconvolution to separate stains in histological images using a high-speed parallel algorithm.

Syntax: result = ImgProc.ColorDeconvolution(SourceImage, StainType, ShowColor, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to process. —
StainType (Integer) Integer representing the stain type.
Supported values:
0: H&E – Hematoxylin (Nuclei)
1: H&E – Eosin (Cytoplasm)
2: H-DAB – Hematoxylin (Background)
3: H-DAB – DAB (Protein Marker)
4: Masson's Trichrome – Methyl Blue (Collagen)
5: Masson's Trichrome – Ponceau Fuchsin (Muscle)
6: H-AEC – Hematoxylin (Nuclei)
7: H-AEC – AEC (Red Marker)
8: Methyl Green-DAB – Methyl Green (Nuclei)
9: Methyl Green-DAB – DAB (Protein Marker)
10: H-PAS – Hematoxylin (Nuclei)
11: H-PAS – PAS (Glycogen / Basement Membrane)
12: Alcian Blue & H – Alcian Blue (Acid Mucins / GAG)
13: Alcian Blue & H – Hematoxylin (Nuclei)
14: Giemsa – Methylene Blue (Nuclei)
15: Giemsa – Eosin (Erythrocytes / Cytoplasm)
16: Feulgen-Light Green – Feulgen (DNA)
17: Feulgen-Light Green – Light Green (Cytoplasm)
18: Safranin-O & Fast Green – Safranin-O (Lignin / Cartilage)
19: Safranin-O & Fast Green – Fast Green (Cellulose / Cytoplasm)
20: H&E-DAB (Triple) – Hematoxylin (Nuclei)
21: H&E-DAB (Triple) – Eosin (Cytoplasm)
22: H&E-DAB (Triple) – DAB (Protein Marker)
—
ShowColor (Boolean) Whether to apply pseudo-coloring to the extracted stain result. —
IsShowProgress (Boolean, Optional) Whether to show processing progress. True
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Deconvoluted image, or Nothing if operation fails.

Example:

deconvoluted = imgproc.ColorDeconvolution(bitmap, 0, True)

ImgProc.ColorHexToColorInteger(ColorHex)

Description: Converts hexadecimal color string to integer.

Syntax: result = ImgProc.ColorHexToColorInteger(ColorHex)

Parameter Description Default
ColorHex (String) Hexadecimal color string (e.g., "#FF0000").
Type: String; required; passed by reference.
—

Return Value: Integer

Return Description: Integer color value, or 0 if conversion fails.

Example:

colorInt = imgproc.ColorHexToColorInteger("#FF0000")

ImgProc.ColorHexToRGB(HexColorStr, R, G, B)

Description: Converts hexadecimal color string to RGB components.

Syntax: ImgProc.ColorHexToRGB(HexColorStr, R, G, B)

Parameter Description Default
HexColorStr (String) Hexadecimal color string (e.g., "#FF0000"). —
R (Byte) Output red component.
Type: Byte; required; passed by reference.
—
G (Byte) Output green component.
Type: Byte; required; passed by reference.
—
B (Byte) Output blue component.
Type: Byte; required; passed by reference.
—

Return Value: Void

Example:

imgproc.ColorHexToRGB("#FF0000", r, g, b)

ImgProc.ColorIntegerToARGB(PixelValue)

Description: Displays ARGB values of a color integer to console output.

Syntax: ImgProc.ColorIntegerToARGB(PixelValue)

Parameter Description Default
PixelValue (Integer) Color value as integer. —

Return Value: Void

Return Description: Void; prints ARGB components to console.

Example:

imgproc.ColorIntegerToARGB(4294967295)

ImgProc.ColorIntegerToRGB(PixelValue)

Description: Displays RGB values of a color integer to console output.

Syntax: ImgProc.ColorIntegerToRGB(PixelValue)

Parameter Description Default
PixelValue (Integer) Color value as integer. —

Return Value: Void

Return Description: Void; prints RGB components to console.

Example:

imgproc.ColorIntegerToRGB(255)

ImgProc.ColorIntegerToRGBGHSI(ColorValue, RedValue, GreenValue, BlueValue, GrayValue, HueValue, SaturationValue, IntensityValue)

Description: Decomposes color to ARGB and HSI components.

Syntax: ImgProc.ColorIntegerToRGBGHSI(ColorValue, RedValue, GreenValue, BlueValue, GrayValue, HueValue, SaturationValue, IntensityValue)

Parameter Description Default
ColorValue (Integer) Integer color value to decompose. —
RedValue (Byte) Output red component.
Type: Byte; required; passed by reference.
—
GreenValue (Byte) Output green component.
Type: Byte; required; passed by reference.
—
BlueValue (Byte) Output blue component.
Type: Byte; required; passed by reference.
—
GrayValue (Byte) Output gray component.
Type: Byte; required; passed by reference.
—
HueValue (Single) Output hue component.
Type: Single; required; passed by reference.
—
SaturationValue (Single) Output saturation component.
Type: Single; required; passed by reference.
—
IntensityValue (Single) Output intensity component.
Type: Single; required; passed by reference.
—

Return Value: Void

Example:

imgproc.ColorIntegerToRGBGHSI(color, r, g, b, gray, hue, sat, int)

ImgProc.ColorRangeSelection(SourceImage, targetR, targetG, targetB, colorSpace, isFastAlgorithm, tolerance, maintainOrgColor, isShowProgress, maskImage, maskRegionBoundary, isMaskAllRegionSelected)

Description: Selects or isolates pixels matching the specified target RGB color within a given tolerance.

Syntax: result = ImgProc.ColorRangeSelection(SourceImage, targetR, targetG, targetB, colorSpace, isFastAlgorithm, tolerance, maintainOrgColor, isShowProgress, maskImage, maskRegionBoundary, isMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to process. —
targetR (Integer) Target color red component (0-255). —
targetG (Integer) Target color green component (0-255). —
targetB (Integer) Target color blue component (0-255). —
colorSpace (String, Optional) Color space model ('RGB', 'HSI', 'Lab', or 'Chroma'). "RGB"
isFastAlgorithm (Boolean, Optional) Whether to use Fast (Manhattan) distance instead of Standard (Euclidean). Ignored when colorSpace is 'Chroma'. False
tolerance (Integer, Optional) Color matching tolerance threshold (0-255). 40
maintainOrgColor (Boolean, Optional) Whether to preserve original pixel colors for matched areas (False converts matched areas to white). True
isShowProgress (Boolean, Optional) Whether to report progress events. False
maskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
maskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
isMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Processed Bitmap with color range selection applied, or Nothing if processing fails.

Example:

selected = imgproc.ColorRangeSelection(bitmap, 0, 255, 0, "Chroma", False, 40, True)

ImgProc.ColorToColorHEX(SourceColor)

Description: Converts RGB Color object to hexadecimal string representation.

Syntax: result = ImgProc.ColorToColorHEX(SourceColor)

Parameter Description Default
SourceColor (Color) Color object to convert. —

Return Value: String

Return Description: Hexadecimal color string (e.g., "#FF0000"), or empty string if conversion fails.

Example:

hex = imgproc.ColorToColorHEX(Color.Red)

ImgProc.Convert_Gray24Bit_To_8bppIndexed(srcBitmap)

Description: Converts 24-bit grayscale to 8-bit indexed image format.

Syntax: result = ImgProc.Convert_Gray24Bit_To_8bppIndexed(srcBitmap)

Parameter Description Default
srcBitmap (Bitmap) Source 24-bit grayscale bitmap. —

Return Value: Bitmap

Return Description: 8-bit indexed image, or Nothing if conversion fails.

Example:

indexed = imgproc.Convert_Gray24Bit_To_8bppIndexed(bitmap)

ImgProc.Convert_To_rgChromaticity(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Converts RGB to rg chromaticity coordinates.

Syntax: result = ImgProc.Convert_To_rgChromaticity(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to convert.
Type: Bitmap; required; passed by reference.
—
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: rg chromaticity image, or Nothing if conversion fails.

Example:

rgChromaticity = imgproc.Convert_To_rgChromaticity(bitmap)

ImgProc.Convert_To_rgChromaticity_Parallel(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Converts RGB to rg chromaticity with parallel processing.

Syntax: result = ImgProc.Convert_To_rgChromaticity_Parallel(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to convert.
Type: Bitmap; required; passed by reference.
—
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: rg chromaticity image, or Nothing if conversion fails.

Example:

rgChromaticity = imgproc.Convert_To_rgChromaticity_Parallel(bitmap)

ImgProc.Delete_BlueChannel(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Removes blue channel from image.

Syntax: result = ImgProc.Delete_BlueChannel(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to process. —
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Image with blue channel removed, or Nothing if operation fails.

Example:

noBlue = imgproc.Delete_BlueChannel(bitmap)

ImgProc.Delete_GreenChannel(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Removes green channel from image.

Syntax: result = ImgProc.Delete_GreenChannel(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to process. —
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Image with green channel removed, or Nothing if operation fails.

Example:

noGreen = imgproc.Delete_GreenChannel(bitmap)

ImgProc.Delete_RedChannel(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Removes red channel from image.

Syntax: result = ImgProc.Delete_RedChannel(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to process. —
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Image with red channel removed, or Nothing if operation fails.

Example:

noRed = imgproc.Delete_RedChannel(bitmap)

ImgProc.Digitalize(ColorChannelValue, LevelCount)

Description: Quantizes color channel value to discrete levels.

Syntax: result = ImgProc.Digitalize(ColorChannelValue, LevelCount)

Parameter Description Default
ColorChannelValue (Single) Color value to quantize. —
LevelCount (Integer) Number of discrete levels. —

Return Value: Byte

Return Description: Quantized color value.

Example:

quantized = imgproc.Digitalize(128.5, 8)

ImgProc.GrayFrom_Blue(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Extracts blue channel as grayscale image.

Syntax: result = ImgProc.GrayFrom_Blue(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source color image.
Type: Bitmap; required; passed by reference.
—
MaskImage (Bitmap, Optional) Optional mask to constrain extraction. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Blue channel as grayscale, or Nothing if extraction fails.

Example:

grayBlue = imgproc.GrayFrom_Blue(bitmap)

ImgProc.GrayFrom_Green(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Extracts green channel as grayscale.

Syntax: result = ImgProc.GrayFrom_Green(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source color image.
Type: Bitmap; required; passed by reference.
—
MaskImage (Bitmap, Optional) Optional mask to constrain extraction. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Green channel as grayscale, or Nothing if extraction fails.

Example:

grayGreen = imgproc.GrayFrom_Green(bitmap)

ImgProc.GrayFrom_Red(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Extracts red channel as grayscale image.

Syntax: result = ImgProc.GrayFrom_Red(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source color image.
Type: Bitmap; required; passed by reference.
—
MaskImage (Bitmap, Optional) Optional mask to constrain extraction. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Red channel as grayscale, or Nothing if extraction fails.

Example:

grayRed = imgproc.GrayFrom_Red(bitmap)

ImgProc.GrayScaling(SourceImage, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Converts colored image to grayscale using luminosity method.

Syntax: result = ImgProc.GrayScaling(SourceImage, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to convert. —
IsShowProgress (Boolean, Optional) Whether to display progress. True
MaskImage (Bitmap, Optional) Optional mask to constrain conversion. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Grayscale image, or Nothing if conversion fails.

Example:

gray = imgproc.GrayScaling(bitmap, True)

ImgProc.GrayToColor(SourceImage, MapType, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Applies color map to grayscale image for visualization.

Syntax: result = ImgProc.GrayToColor(SourceImage, MapType, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source grayscale image. —
MapType (ImgProcessing.ColorMapType) Color map type to apply.
Type: ImgProcessing.ColorMapType; required. Supported values:
0: RedBlue
1: Viridis
2: Parula
3: Plasma
4: Inferno
5: Magma
6: Cividis
7: Jet
8: Turbo
9: Rainbow
10: Spectral
11: HSV
12: Ocean
13: Seismic
14: RdBu
15: Coolwarm
16: bwr
17: BrBG
18: PiYG
19: Hot
20: Cool
21: Spring
22: Summer
23: Autumn
24: Winter
25: Bone
26: Copper
27: Pink
28: Terrain
29: Twilight
30: Rocket (Black – Blue – Red – Light Yellow)
31: Mako (Black – Deep Blue – Purple – Light Pink)
32: Cubehelix (Astronomy standard, brightness preserved in grayscale)
33: YlGnBu (Yellow – Green – Blue)
34: RdYlGn (Red – Yellow – Green)
35: PuOr (Purple – White – Orange)
36: Ironbow (Thermal: Black – Purple – Red – Yellow – White)
37: WhiteHot (Thermal: Cold Black – Hot White)
38: BlackHot (Thermal: Cold White – Hot Black)
39: Lava (Black – Dark Red – Orange – Yellow – White)
40: Arctic (Black – Dark Blue – Cyan – White)
—
MaskImage (Bitmap, Optional) Optional mask to constrain mapping. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Colorized image, or Nothing if mapping fails.

Example:

colored = imgproc.GrayToColor(grayBitmap, ImgProcessing.ColorMapType.Jet)

ImgProc.HexToRGB(HexColorStr, R, G, B)

Description: Converts hexadecimal color string to RGB byte values.

Syntax: ImgProc.HexToRGB(HexColorStr, R, G, B)

Parameter Description Default
HexColorStr (String) Hex color string (e.g., "#FF0000"). —
R (Byte) Output red component (0-255). —
G (Byte) Output green component (0-255). —
B (Byte) Output blue component (0-255). —

Return Value: Void

Return Description: Void; returns RGB values through ByRef parameters.

Example:

Dim r, g, b As Byte; imgproc.HexToRGB("#FF0000", r, g, b)

ImgProc.Hide_Outlines(SourceImage, TargetColor_R, TargetColor_G, TargetColor_B, IsMostFrequentColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Removes or hides outlines of specified color from image.

Syntax: result = ImgProc.Hide_Outlines(SourceImage, TargetColor_R, TargetColor_G, TargetColor_B, IsMostFrequentColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to modify.
Type: Bitmap; required; passed by reference.
—
TargetColor_R (Byte) Red channel of outline color. —
TargetColor_G (Byte) Green channel of outline color. —
TargetColor_B (Byte) Blue channel of outline color. —
IsMostFrequentColor (Boolean, Optional) Whether to use most frequent color for replacement. True
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Modified image with hidden outlines, or Nothing if operation fails.

Example:

hidden = imgproc.Hide_Outlines(bitmap, 0, 0, 0)

ImgProc.HSITORGB(Hue, Saturation255, Intensity255, Red, Green, Blue)

Description: Converts HSI to RGB color space.

Syntax: ImgProc.HSITORGB(Hue, Saturation255, Intensity255, Red, Green, Blue)

Parameter Description Default
Hue (Integer) Hue value. —
Saturation255 (Single) Saturation (0-255). —
Intensity255 (Single) Intensity (0-255). —
Red (Integer) Output red component.
Type: Integer; required; passed by reference.
—
Green (Integer) Output green component.
Type: Integer; required; passed by reference.
—
Blue (Integer) Output blue component.
Type: Integer; required; passed by reference.
—

Return Value: Void

Example:

imgproc.HSITORGB(180, 128, 200, red, green, blue)

ImgProc.HSVtoRGB(h, s, v, r, g, b)

Description: Converts HSV to RGB color space.

Syntax: ImgProc.HSVtoRGB(h, s, v, r, g, b)

Parameter Description Default
h (Single) Hue value. —
s (Single) Saturation value. —
v (Single) Value component. —
r (Byte) Output red component.
Type: Byte; required; passed by reference.
—
g (Byte) Output green component.
Type: Byte; required; passed by reference.
—
b (Byte) Output blue component.
Type: Byte; required; passed by reference.
—

Return Value: Void

Example:

imgproc.HSVtoRGB(180, 0.5, 0.75, r, g, b)

ImgProc.HueSaturationIntensity(original, hueShift, satShift, intShift, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Adjusts hue, saturation, and intensity values of the image.

Syntax: result = ImgProc.HueSaturationIntensity(original, hueShift, satShift, intShift, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
original (Bitmap) Source image to adjust. —
hueShift (Integer) Hue shift (-180 to 180). —
satShift (Integer) Saturation shift (-100 to 100). —
intShift (Integer) Intensity shift (-100 to 100). —
MaskImage (Image, Optional) Optional mask to constrain adjustment. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Hue-saturation-intensity adjusted image, or Nothing if processing fails.

Example:

hsi = imgproc.HueSaturationIntensity(bitmap, 30, 20, -10)

ImgProc.IsBinaryImage(SourceImage)

Description: Checks if image is binary (contains only black and white pixels).

Syntax: result = ImgProc.IsBinaryImage(SourceImage)

Parameter Description Default
SourceImage (Bitmap) Image to check. —

Return Value: Boolean

Return Description: True if image is binary, False otherwise.

Example:

isBinary = imgproc.IsBinaryImage(bitmap)

ImgProc.IsBWPixel(red, green, blue)

Description: Checks if RGB pixel values represent black or white.

Syntax: result = ImgProc.IsBWPixel(red, green, blue)

Parameter Description Default
red (Byte) Red component (0-255). —
green (Byte) Green component (0-255). —
blue (Byte) Blue component (0-255). —

Return Value: Boolean

Return Description: True if pixel is black or white, False otherwise.

Example:

isBW = imgproc.IsBWPixel(0, 0, 0)

ImgProc.IsGrayImage(SourceImage)

Description: Checks if image is grayscale (all color channels equal).

Syntax: result = ImgProc.IsGrayImage(SourceImage)

Parameter Description Default
SourceImage (Bitmap) Image to check. —

Return Value: Boolean

Return Description: True if image is grayscale, False otherwise.

Example:

isGray = imgproc.IsGrayImage(bitmap)

ImgProc.Maximum(rR, rG, rB)

Description: Returns maximum value among three color components.

Syntax: result = ImgProc.Maximum(rR, rG, rB)

Parameter Description Default
rR (Single) Red component value. —
rG (Single) Green component value. —
rB (Single) Blue component value. —

Return Value: Single

Return Description: Maximum value among the three components.

Example:

max = imgproc.Maximum(255.0, 128.0, 200.0)

ImgProc.MergeChannels(SourceImage, ColorSpace, Image1, Image2, Image3, maskImage, maskRegionBoundary, isMaskAllRegionSelected)

Description: Merges three channel images using specified color space.

Syntax: result = ImgProc.MergeChannels(SourceImage, ColorSpace, Image1, Image2, Image3, maskImage, maskRegionBoundary, isMaskAllRegionSelected)

Parameter Description Default
SourceImage (Image) Original source image for background preservation. —
ColorSpace (String) Target color space ('RGB', 'HSI', or 'LAB'). —
Image1 (Bitmap) First channel image. —
Image2 (Bitmap) Second channel image. —
Image3 (Bitmap) Third channel image. —
maskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
maskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
isMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Merged image in specified color space, or Nothing if merging fails.

Example:

merged = imgproc.MergeChannels(bitmap, "RGB", ch1, ch2, ch3)

ImgProc.Minimum(rR, rG, rB)

Description: Returns minimum value among three color components.

Syntax: result = ImgProc.Minimum(rR, rG, rB)

Parameter Description Default
rR (Single) Red component value. —
rG (Single) Green component value. —
rB (Single) Blue component value. —

Return Value: Single

Return Description: Minimum value among the three components.

Example:

min = imgproc.Minimum(255.0, 128.0, 200.0)

ImgProc.MultiStepThresholding(SourceImage, LevelCount_Red, LevelCount_Green, LevelCount_Blue, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Applies multi-step thresholding to separate color channels into quantized levels.

Syntax: result = ImgProc.MultiStepThresholding(SourceImage, LevelCount_Red, LevelCount_Green, LevelCount_Blue, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to threshold. —
LevelCount_Red (Integer) Number of quantization levels for red channel. —
LevelCount_Green (Integer) Number of quantization levels for green channel. —
LevelCount_Blue (Integer) Number of quantization levels for blue channel. —
MaskImage (Bitmap, Optional) Optional mask to constrain thresholding. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Thresholded image, or Nothing if processing fails.

Example:

thresholded = imgproc.MultiStepThresholding(bitmap, 3, 3, 3)

ImgProc.RemoveTransparency(SourceImage)

Description: Removes alpha channel transparency from image.

Syntax: result = ImgProc.RemoveTransparency(SourceImage)

Parameter Description Default
SourceImage (Bitmap) Source image to process. —

Return Value: Bitmap

Return Description: Image without transparency, or Nothing if removal fails.

Example:

noAlpha = imgproc.RemoveTransparency(bitmap)

ImgProc.RGBToARGBInteger(red, green, blue)

Description: Converts RGB byte values to ARGB integer format with full alpha.

Syntax: result = ImgProc.RGBToARGBInteger(red, green, blue)

Parameter Description Default
red (Integer) Red component (0-255). —
green (Integer) Green component (0-255). —
blue (Integer) Blue component (0-255). —

Return Value: Integer

Return Description: ARGB integer value, or 0 if conversion fails.

Example:

argb = imgproc.RGBToARGBInteger(255, 128, 64)

ImgProc.RGBToCMYK(r, g, b, IsCompute_Cyan, IsCompute_Magenta, IsCompute_Yellow)

Description: Converts RGB to CMYK color space.

Syntax: ImgProc.RGBToCMYK(r, g, b, IsCompute_Cyan, IsCompute_Magenta, IsCompute_Yellow)

Parameter Description Default
r (Byte) Red component value. —
g (Byte) Green component value. —
b (Byte) Blue component value. —
IsCompute_Cyan (Boolean) Compute cyan component. —
IsCompute_Magenta (Boolean) Compute magenta component. —
IsCompute_Yellow (Boolean) Compute yellow component. —

Return Value: Void

Example:

imgproc.RGBToCMYK(255, 128, 64, True, True, True)

ImgProc.RGBToColor(RedInByte, GreenInByte, BlueInByte)

Description: Converts RGB byte values to Color object.

Syntax: result = ImgProc.RGBToColor(RedInByte, GreenInByte, BlueInByte)

Parameter Description Default
RedInByte (Integer) Red component (0-255). —
GreenInByte (Integer) Green component (0-255). —
BlueInByte (Integer) Blue component (0-255). —

Return Value: Color

Return Description: Color object, or Color.Black if conversion fails.

Example:

color = imgproc.RGBToColor(255, 100, 50)

ImgProc.RGBToColorHex(RedValue, GreenValue, BlueValue)

Description: Converts RGB values to hexadecimal color string.

Syntax: result = ImgProc.RGBToColorHex(RedValue, GreenValue, BlueValue)

Parameter Description Default
RedValue (Integer) Red component value. —
GreenValue (Integer) Green component value. —
BlueValue (Integer) Blue component value. —

Return Value: String

Return Description: Hexadecimal color string, or empty string if conversion fails.

Example:

hexColor = imgproc.RGBToColorHex(255, 0, 0)

ImgProc.RGBToGChromaticity(_RedValue, _GreenValue, _BlueValue)

Description: Converts RGB to green chromaticity coordinate.

Syntax: ImgProc.RGBToGChromaticity(_RedValue, _GreenValue, _BlueValue)

Parameter Description Default
_RedValue (Integer) Red channel value. —
_GreenValue (Integer) Green channel value. —
_BlueValue (Integer) Blue channel value. —

Return Value: Void

Return Description: None.

Example:

imgproc.RGBToGChromaticity(255, 128, 0)

ImgProc.RGBToGChromaticity_Shared(RedValue, GreenValue, BlueValue, RGChromaticity_Red, RGChromaticity_Green, RGChromaticity_Blue)

Description: Converts RGB to rg chromaticity values (shared version).

Syntax: ImgProc.RGBToGChromaticity_Shared(RedValue, GreenValue, BlueValue, RGChromaticity_Red, RGChromaticity_Green, RGChromaticity_Blue)

Parameter Description Default
RedValue (Integer) Red channel value. —
GreenValue (Integer) Green channel value. —
BlueValue (Integer) Blue channel value. —
RGChromaticity_Red (Byte) Output rg chromaticity red value.
Type: Byte; required; passed by reference.
—
RGChromaticity_Green (Byte) Output rg chromaticity green value.
Type: Byte; required; passed by reference.
—
RGChromaticity_Blue (Byte) Output rg chromaticity blue value.
Type: Byte; required; passed by reference.
—

Return Value: Void

Return Description: None.

Example:

imgproc.RGBToGChromaticity_Shared(255, 128, 0, outR, outG, outB)

ImgProc.RGBToGray(r, g, b)

Description: Converts RGB to grayscale byte value using standard formula.

Syntax: result = ImgProc.RGBToGray(r, g, b)

Parameter Description Default
r (Integer) Red component (0-255). —
g (Integer) Green component (0-255). —
b (Integer) Blue component (0-255). —

Return Value: Byte

Return Description: Grayscale byte value (0-255), or 0 if conversion fails.

Example:

grayByte = imgproc.RGBToGray(255, 100, 50)

ImgProc.RGBToGray_ByRealCalc(r, g, b)

Description: Converts RGB to grayscale using precise luminosity calculation.

Syntax: result = ImgProc.RGBToGray_ByRealCalc(r, g, b)

Parameter Description Default
r (Integer) Red component (0-255). —
g (Integer) Green component (0-255). —
b (Integer) Blue component (0-255). —

Return Value: Integer

Return Description: Grayscale value (0-255), or 0 if conversion fails.

Example:

grayValue = imgproc.RGBToGray_ByRealCalc(255, 100, 50)

ImgProc.RGBToHSI(r, g, b)

Description: Converts RGB to HSI color space.

Syntax: ImgProc.RGBToHSI(r, g, b)

Parameter Description Default
r (Byte) Red component value. —
g (Byte) Green component value. —
b (Byte) Blue component value. —

Return Value: Void

Example:

imgproc.RGBToHSI(255, 128, 64)

ImgProc.RGBToHSI_Parallel(r, g, b, Hue, Saturation, Intensity)

Description: Converts RGB to HSI using parallel method.

Syntax: ImgProc.RGBToHSI_Parallel(r, g, b, Hue, Saturation, Intensity)

Parameter Description Default
r (Integer) Red component value. —
g (Integer) Green component value. —
b (Integer) Blue component value. —
Hue (Single) Output hue value.
Type: Single; required; passed by reference.
—
Saturation (Single) Output saturation value.
Type: Single; required; passed by reference.
—
Intensity (Single) Output intensity value.
Type: Single; required; passed by reference.
—

Return Value: Void

Example:

imgproc.RGBToHSI_Parallel(255, 128, 64, hue, sat, int)

ImgProc.RGBToLab(r, g, b)

Description: Converts RGB to CIELab color space.

Syntax: ImgProc.RGBToLab(r, g, b)

Parameter Description Default
r (Byte) Red component value. —
g (Byte) Green component value. —
b (Byte) Blue component value. —

Return Value: Void

Example:

imgproc.RGBToLab(255, 128, 64)

ImgProc.RGBToLab_OriginalValue(r, g, b, LabL, Laba, Labb)

Description: Converts RGB to CIELab with original value output.

Syntax: ImgProc.RGBToLab_OriginalValue(r, g, b, LabL, Laba, Labb)

Parameter Description Default
r (Byte) Red component value. —
g (Byte) Green component value. —
b (Byte) Blue component value. —
LabL (Double) Output L component.
Type: Double; required; passed by reference.
—
Laba (Double) Output a component.
Type: Double; required; passed by reference.
—
Labb (Double) Output b component.
Type: Double; required; passed by reference.
—

Return Value: Void

Example:

imgproc.RGBToLab_OriginalValue(255, 128, 64, labL, labA, labB)

ImgProc.RGBToLab_Parallel(r, g, b, Out_L, Out_a, Out_b)

Description: Converts RGB to CIELab using parallel method.

Syntax: ImgProc.RGBToLab_Parallel(r, g, b, Out_L, Out_a, Out_b)

Parameter Description Default
r (Byte) Red component value. —
g (Byte) Green component value. —
b (Byte) Blue component value. —
Out_L (Byte) Output L component.
Type: Byte; required; passed by reference.
—
Out_a (Byte) Output a component.
Type: Byte; required; passed by reference.
—
Out_b (Byte) Output b component.
Type: Byte; required; passed by reference.
—

Return Value: Void

Example:

imgproc.RGBToLab_Parallel(255, 128, 64, outL, outA, outB)

ImgProc.Split_a(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Splits a (color opponent) channel in Lab color space.

Syntax: result = ImgProc.Split_a(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to decompose.
Type: Bitmap; required; passed by reference.
—
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: a channel image, or Nothing if decomposition fails.

Example:

aChannel = imgproc.Split_a(bitmap)

ImgProc.Split_b(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Splits b (color opponent) channel in Lab color space.

Syntax: result = ImgProc.Split_b(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to decompose.
Type: Bitmap; required; passed by reference.
—
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: b channel image, or Nothing if decomposition fails.

Example:

bChannel = imgproc.Split_b(bitmap)

ImgProc.Split_Blue(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Extracts blue channel from color image as grayscale.

Syntax: result = ImgProc.Split_Blue(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source color image.
Type: Bitmap; required; passed by reference.
—
MaskImage (Bitmap, Optional) Optional mask to constrain extraction. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Blue channel as grayscale image, or Nothing if extraction fails.

Example:

blueChannel = imgproc.Split_Blue(bitmap)

ImgProc.Split_Cyan(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Splits C (cyan) channel in CMYK decomposition.

Syntax: result = ImgProc.Split_Cyan(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to decompose.
Type: Bitmap; required; passed by reference.
—
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: C channel image, or Nothing if decomposition fails.

Example:

cChannel = imgproc.Split_Cyan(bitmap)

ImgProc.Split_Green(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Extracts green channel from color image as grayscale.

Syntax: result = ImgProc.Split_Green(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source color image.
Type: Bitmap; required; passed by reference.
—
MaskImage (Bitmap, Optional) Optional mask to constrain extraction. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Green channel as grayscale image, or Nothing if extraction fails.

Example:

greenChannel = imgproc.Split_Green(bitmap)

ImgProc.Split_Hue(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Extracts hue channel from HSI color space.

Syntax: result = ImgProc.Split_Hue(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source color image.
Type: Bitmap; required; passed by reference.
—
MaskImage (Bitmap, Optional) Optional mask to constrain extraction. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Hue channel as image, or Nothing if extraction fails.

Example:

hueChannel = imgproc.Split_Hue(bitmap)

ImgProc.Split_Intensity(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Extracts intensity channel from HSI color space.

Syntax: result = ImgProc.Split_Intensity(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source color image.
Type: Bitmap; required; passed by reference.
—
MaskImage (Bitmap, Optional) Optional mask to constrain extraction. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Intensity channel as image, or Nothing if extraction fails.

Example:

intensity = imgproc.Split_Intensity(bitmap)

ImgProc.Split_KBlack(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Splits K (black) channel in CMYK decomposition.

Syntax: result = ImgProc.Split_KBlack(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to decompose.
Type: Bitmap; required; passed by reference.
—
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: K channel image, or Nothing if decomposition fails.

Example:

kChannel = imgproc.Split_KBlack(bitmap)

ImgProc.Split_L(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Splits L (lightness) channel in Lab color space.

Syntax: result = ImgProc.Split_L(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to decompose.
Type: Bitmap; required; passed by reference.
—
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: L channel image, or Nothing if decomposition fails.

Example:

lChannel = imgproc.Split_L(bitmap)

ImgProc.Split_Magenta(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Splits M (magenta) channel in CMYK decomposition.

Syntax: result = ImgProc.Split_Magenta(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to decompose.
Type: Bitmap; required; passed by reference.
—
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: M channel image, or Nothing if decomposition fails.

Example:

mChannel = imgproc.Split_Magenta(bitmap)

ImgProc.Split_Red(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Extracts red channel from color image as grayscale.

Syntax: result = ImgProc.Split_Red(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source color image.
Type: Bitmap; required; passed by reference.
—
MaskImage (Bitmap, Optional) Optional mask to constrain extraction. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Red channel as grayscale image, or Nothing if extraction fails.

Example:

redChannel = imgproc.Split_Red(bitmap)

ImgProc.Split_rgChromaticityBlue(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Splits rg chromaticity blue channel.

Syntax: result = ImgProc.Split_rgChromaticityBlue(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to decompose.
Type: Bitmap; required; passed by reference.
—
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: rg chromaticity blue channel image, or Nothing if splitting fails.

Example:

rgBlue = imgproc.Split_rgChromaticityBlue(bitmap)

ImgProc.Split_rgChromaticityGreen(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Splits rg chromaticity green channel.

Syntax: result = ImgProc.Split_rgChromaticityGreen(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to decompose.
Type: Bitmap; required; passed by reference.
—
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: rg chromaticity green channel image, or Nothing if splitting fails.

Example:

rgGreen = imgproc.Split_rgChromaticityGreen(bitmap)

ImgProc.Split_rgChromaticityRed(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Splits rg chromaticity red channel.

Syntax: result = ImgProc.Split_rgChromaticityRed(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to decompose.
Type: Bitmap; required; passed by reference.
—
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: rg chromaticity red channel image, or Nothing if splitting fails.

Example:

rgRed = imgproc.Split_rgChromaticityRed(bitmap)

ImgProc.Split_Saturation(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Extracts saturation channel from HSI color space.

Syntax: result = ImgProc.Split_Saturation(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source color image.
Type: Bitmap; required; passed by reference.
—
MaskImage (Bitmap, Optional) Optional mask to constrain extraction. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Saturation channel as image, or Nothing if extraction fails.

Example:

saturation = imgproc.Split_Saturation(bitmap)

ImgProc.Split_Yellow(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Splits Y (yellow) channel in CMYK decomposition.

Syntax: result = ImgProc.Split_Yellow(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to decompose.
Type: Bitmap; required; passed by reference.
—
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Y channel image, or Nothing if decomposition fails.

Example:

yChannel = imgproc.Split_Yellow(bitmap)

Data Extraction & Analysis Actions (75 functions)
ImgProc.AreImagesIdentical(img1, img2)

Description: Checks if two images are identical.

Syntax: result = ImgProc.AreImagesIdentical(img1, img2)

Parameter Description Default
img1 (Bitmap) First image to compare. —
img2 (Bitmap) Second image to compare. —

Return Value: Boolean

Return Description: True if images are identical, False otherwise.

Example:

identical = imgproc.AreImagesIdentical(bitmap1, bitmap2)

ImgProc.Calculate_AverageColorValue(SourceImage, TotalPixelsCount, AnalysisInterval, ColorChannel, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Calculates average color value of specified channel.

Syntax: result = ImgProc.Calculate_AverageColorValue(SourceImage, TotalPixelsCount, AnalysisInterval, ColorChannel, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to analyze. —
TotalPixelsCount (Long) Output total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisInterval (Integer) Sampling interval for analysis. —
ColorChannel (String) Color channel to analyze.
Supported values (case-insensitive):
"gray": Gray level
"red": Red
"green": Green
"blue": Blue
"hue": Hue
"saturation": Saturation
"intensity": Intensity
"cyan": Cyan
"magenta": Magenta
"yellow": Yellow
"k black": K (Black) of CMYK
"lab l": CIE Lab L (Lightness)
"lab a": CIE Lab a (Green-Red)
"lab b": CIE Lab b (Blue-Yellow)
"rg chromaticity red": rg chromaticity Red
"rg chromaticity green": rg chromaticity Green
"rg chromaticity blue": rg chromaticity Blue
Any other value: the function returns -1
—
MaskImage (Bitmap, Optional) Optional mask to constrain analysis. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Single

Return Description: Average color value of the specified channel, or 0 if calculation fails.

Example:

avgRed = imgproc.Calculate_AverageColorValue(bitmap, totPix, 1, "R")

ImgProc.Calculate_AverageColorValue_a(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Calculates average a (green-red) value in CIELab.

Syntax: result = ImgProc.Calculate_AverageColorValue_a(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to analyze. —
TotalPixelsCount (Long) Output total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisInterval (Integer) Sampling interval for analysis. —
MaskImage (Bitmap, Optional) Optional mask to constrain analysis. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Single

Return Description: Average a (green-red) value, or 0 if calculation fails.

Example:

avgA = imgproc.Calculate_AverageColorValue_a(bitmap, totPix, 1)

ImgProc.Calculate_AverageColorValue_b(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Calculates average b (blue-yellow) value in CIELab.

Syntax: result = ImgProc.Calculate_AverageColorValue_b(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to analyze. —
TotalPixelsCount (Long) Output total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisInterval (Integer) Sampling interval for analysis. —
MaskImage (Bitmap, Optional) Optional mask to constrain analysis. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Single

Return Description: Average b (blue-yellow) value, or 0 if calculation fails.

Example:

avgB = imgproc.Calculate_AverageColorValue_b(bitmap, totPix, 1)

ImgProc.Calculate_AverageColorValue_Blue(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Calculates average blue channel value.

Syntax: result = ImgProc.Calculate_AverageColorValue_Blue(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to analyze. —
TotalPixelsCount (Long) Output total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisInterval (Integer) Sampling interval for analysis. —
MaskImage (Bitmap, Optional) Optional mask to constrain analysis. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Single

Return Description: Average blue channel value, or 0 if calculation fails.

Example:

avgBlue = imgproc.Calculate_AverageColorValue_Blue(bitmap, totPix, 1)

ImgProc.Calculate_AverageColorValue_Cyan(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Calculates average cyan channel value.

Syntax: result = ImgProc.Calculate_AverageColorValue_Cyan(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to analyze. —
TotalPixelsCount (Long) Output total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisInterval (Integer) Sampling interval for analysis. —
MaskImage (Bitmap, Optional) Optional mask to constrain analysis. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Single

Return Description: Average cyan value, or 0 if calculation fails.

Example:

avgCyan = imgproc.Calculate_AverageColorValue_Cyan(bitmap, totPix, 1)

ImgProc.Calculate_AverageColorValue_Gray(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Calculates average grayscale value.

Syntax: result = ImgProc.Calculate_AverageColorValue_Gray(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to analyze. —
TotalPixelsCount (Long) Output total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisInterval (Integer) Sampling interval for analysis. —
MaskImage (Bitmap, Optional) Optional mask to constrain analysis. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Single

Return Description: Average grayscale value, or 0 if calculation fails.

Example:

avgGray = imgproc.Calculate_AverageColorValue_Gray(bitmap, totPix, 1)

ImgProc.Calculate_AverageColorValue_Green(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Calculates average green channel value.

Syntax: result = ImgProc.Calculate_AverageColorValue_Green(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to analyze. —
TotalPixelsCount (Long) Output total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisInterval (Integer) Sampling interval for analysis. —
MaskImage (Bitmap, Optional) Optional mask to constrain analysis. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Single

Return Description: Average green channel value, or 0 if calculation fails.

Example:

avgGreen = imgproc.Calculate_AverageColorValue_Green(bitmap, totPix, 1)

ImgProc.Calculate_AverageColorValue_Hue(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Calculates average hue value.

Syntax: result = ImgProc.Calculate_AverageColorValue_Hue(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to analyze. —
TotalPixelsCount (Long) Output total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisInterval (Integer) Sampling interval for analysis. —
MaskImage (Bitmap, Optional) Optional mask to constrain analysis. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Single

Return Description: Average hue value, or 0 if calculation fails.

Example:

avgHue = imgproc.Calculate_AverageColorValue_Hue(bitmap, totPix, 1)

ImgProc.Calculate_AverageColorValue_Intensity(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Calculates average intensity value.

Syntax: result = ImgProc.Calculate_AverageColorValue_Intensity(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to analyze. —
TotalPixelsCount (Long) Output total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisInterval (Integer) Sampling interval for analysis. —
MaskImage (Bitmap, Optional) Optional mask to constrain analysis. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Single

Return Description: Average intensity value, or 0 if calculation fails.

Example:

avgInt = imgproc.Calculate_AverageColorValue_Intensity(bitmap, totPix, 1)

ImgProc.Calculate_AverageColorValue_KBlack(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Calculates average black (K) channel value in CMYK.

Syntax: result = ImgProc.Calculate_AverageColorValue_KBlack(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to analyze. —
TotalPixelsCount (Long) Output total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisInterval (Integer) Sampling interval for analysis. —
MaskImage (Bitmap, Optional) Optional mask to constrain analysis. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Single

Return Description: Average black channel value, or 0 if calculation fails.

Example:

avgK = imgproc.Calculate_AverageColorValue_KBlack(bitmap, totPix, 1)

ImgProc.Calculate_AverageColorValue_L(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Calculates average L (lightness) value in CIELab.

Syntax: result = ImgProc.Calculate_AverageColorValue_L(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to analyze. —
TotalPixelsCount (Long) Output total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisInterval (Integer) Sampling interval for analysis. —
MaskImage (Bitmap, Optional) Optional mask to constrain analysis. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Single

Return Description: Average L (lightness) value, or 0 if calculation fails.

Example:

avgL = imgproc.Calculate_AverageColorValue_L(bitmap, totPix, 1)

ImgProc.Calculate_AverageColorValue_Magenta(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Calculates average magenta channel value.

Syntax: result = ImgProc.Calculate_AverageColorValue_Magenta(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to analyze. —
TotalPixelsCount (Long) Output total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisInterval (Integer) Sampling interval for analysis. —
MaskImage (Bitmap, Optional) Optional mask to constrain analysis. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Single

Return Description: Average magenta value, or 0 if calculation fails.

Example:

avgMag = imgproc.Calculate_AverageColorValue_Magenta(bitmap, totPix, 1)

ImgProc.Calculate_AverageColorValue_MultipleChannels(SourceImage, ShapeMode, X1, Y1, X2, Y2, ReturnRed, ReturnGreen, ReturnBlue, ReturnGray, ReturnHue, ReturnSat, ReturnIntensity, ReturnCyan, ReturnMagenta, ReturnYellow, ReturnK, ReturnLab_L, ReturnLab_a, ReturnLab_b, ReturnRG_Red, ReturnRG_Green, ReturnRG_Blue)

Description: Calculates multiple color channel averages simultaneously.

Syntax: ImgProc.Calculate_AverageColorValue_MultipleChannels(SourceImage, ShapeMode, X1, Y1, X2, Y2, ReturnRed, ReturnGreen, ReturnBlue, ReturnGray, ReturnHue, ReturnSat, ReturnIntensity, ReturnCyan, ReturnMagenta, ReturnYellow, ReturnK, ReturnLab_L, ReturnLab_a, ReturnLab_b, ReturnRG_Red, ReturnRG_Green, ReturnRG_Blue)

Parameter Description Default
SourceImage (Bitmap) Source image to analyze. —
ShapeMode (Integer) Shape mode for region selection.
Supported values:
1: Rectangle region
2: Circle region (inscribed in the X1-X2 range)
—
X1 (Integer) First X-coordinate. —
Y1 (Integer) First Y-coordinate. —
X2 (Integer) Second X-coordinate. —
Y2 (Integer) Second Y-coordinate. —
ReturnRed (Byte) Output red channel average.
Type: Byte; required; passed by reference.
—
ReturnGreen (Byte) Output green channel average.
Type: Byte; required; passed by reference.
—
ReturnBlue (Byte) Output blue channel average.
Type: Byte; required; passed by reference.
—
ReturnGray (Byte) Output gray channel average.
Type: Byte; required; passed by reference.
—
ReturnHue (Single) Output hue average.
Type: Single; required; passed by reference.
—
ReturnSat (Single) Output saturation average.
Type: Single; required; passed by reference.
—
ReturnIntensity (Single) Output intensity average.
Type: Single; required; passed by reference.
—
ReturnCyan (Single) Output cyan average.
Type: Single; required; passed by reference.
—
ReturnMagenta (Single) Output magenta average.
Type: Single; required; passed by reference.
—
ReturnYellow (Single) Output yellow average.
Type: Single; required; passed by reference.
—
ReturnK (Single) —
ReturnLab_L (Single) —
ReturnLab_a (Single) —
ReturnLab_b (Single) —
ReturnRG_Red (Single) —
ReturnRG_Green (Single) —
ReturnRG_Blue (Single) —

Return Value: Void

Example:

imgproc.Calculate_AverageColorValue_MultipleChannels(bitmap, 0, 0, 0, 100, 100, r, g, b, gray, hue, sat, int, cyan, mag, yel)

ImgProc.Calculate_AverageColorValue_Red(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Calculates average red channel value.

Syntax: result = ImgProc.Calculate_AverageColorValue_Red(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to analyze. —
TotalPixelsCount (Long) Output total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisInterval (Integer) Sampling interval for analysis. —
MaskImage (Bitmap, Optional) Optional mask to constrain analysis. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Single

Return Description: Average red channel value, or 0 if calculation fails.

Example:

avgRed = imgproc.Calculate_AverageColorValue_Red(bitmap, totPix, 1)

ImgProc.Calculate_AverageColorValue_rgChromaticityBlue(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Calculates average blue chromaticity value.

Syntax: result = ImgProc.Calculate_AverageColorValue_rgChromaticityBlue(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to analyze. —
TotalPixelsCount (Long) Output total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisInterval (Integer) Sampling interval for analysis. —
MaskImage (Bitmap, Optional) Optional mask to constrain analysis. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Single

Return Description: Average blue chromaticity value, or 0 if calculation fails.

Example:

avgRgBlue = imgproc.Calculate_AverageColorValue_rgChromaticityBlue(bitmap, totPix, 1)

ImgProc.Calculate_AverageColorValue_rgChromaticityGreen(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Calculates average green chromaticity value.

Syntax: result = ImgProc.Calculate_AverageColorValue_rgChromaticityGreen(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to analyze. —
TotalPixelsCount (Long) Output total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisInterval (Integer) Sampling interval for analysis. —
MaskImage (Bitmap, Optional) Optional mask to constrain analysis. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Single

Return Description: Average green chromaticity value, or 0 if calculation fails.

Example:

avgRgGreen = imgproc.Calculate_AverageColorValue_rgChromaticityGreen(bitmap, totPix, 1)

ImgProc.Calculate_AverageColorValue_rgChromaticityRed(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Calculates average red chromaticity value.

Syntax: result = ImgProc.Calculate_AverageColorValue_rgChromaticityRed(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to analyze. —
TotalPixelsCount (Long) Output total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisInterval (Integer) Sampling interval for analysis. —
MaskImage (Bitmap, Optional) Optional mask to constrain analysis. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Single

Return Description: Average red chromaticity value, or 0 if calculation fails.

Example:

avgRgRed = imgproc.Calculate_AverageColorValue_rgChromaticityRed(bitmap, totPix, 1)

ImgProc.Calculate_AverageColorValue_Saturation(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Calculates average saturation value.

Syntax: result = ImgProc.Calculate_AverageColorValue_Saturation(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to analyze. —
TotalPixelsCount (Long) Output total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisInterval (Integer) Sampling interval for analysis. —
MaskImage (Bitmap, Optional) Optional mask to constrain analysis. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Single

Return Description: Average saturation value, or 0 if calculation fails.

Example:

avgSat = imgproc.Calculate_AverageColorValue_Saturation(bitmap, totPix, 1)

ImgProc.Calculate_AverageColorValue_Yellow(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Calculates average yellow channel value.

Syntax: result = ImgProc.Calculate_AverageColorValue_Yellow(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to analyze. —
TotalPixelsCount (Long) Output total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisInterval (Integer) Sampling interval for analysis. —
MaskImage (Bitmap, Optional) Optional mask to constrain analysis. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Single

Return Description: Average yellow value, or 0 if calculation fails.

Example:

avgYellow = imgproc.Calculate_AverageColorValue_Yellow(bitmap, totPix, 1)

ImgProc.Calculate_AvgValueByPredefinedColorFormula(SourceImage, TotalPixelsCount, AnalysisInterval, FormulaMethod, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Calculates average using predefined color formula. The result is a 16-bit value combining two channels (low byte | high byte << 8).

Syntax: result = ImgProc.Calculate_AvgValueByPredefinedColorFormula(SourceImage, TotalPixelsCount, AnalysisInterval, FormulaMethod, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to analyze. —
TotalPixelsCount (Long) Output total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisInterval (Integer) Sampling interval for analysis. —
FormulaMethod (Integer) Color formula method to use.
Supported values:
0: Low byte = Red, High byte = Green
1: Low byte = Red, High byte = Blue
2: Low byte = Green, High byte = Red
3: Low byte = Green, High byte = Blue
4: Low byte = Blue, High byte = Red
5: Low byte = Blue, High byte = Green
—
MaskImage (Bitmap, Optional) Optional mask to constrain analysis. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Single

Return Description: Average value computed by formula, or 0 if calculation fails.

Example:

avgFormula = imgproc.Calculate_AvgValueByPredefinedColorFormula(bitmap, totPix, 1, 0)

ImgProc.Calculate_LocalGrayAvgValue(IntegralGrayImageMap(,), LocalBoxSize, CenterX, CenterY)

Description: Calculates local grayscale average from integral map.

Syntax: result = ImgProc.Calculate_LocalGrayAvgValue(IntegralGrayImageMap(,), LocalBoxSize, CenterX, CenterY)

Parameter Description Default
IntegralGrayImageMap(,) (Long) —
LocalBoxSize (Integer) Size of local box for averaging. —
CenterX (Integer) Center X-coordinate. —
CenterY (Integer) Center Y-coordinate. —

Return Value: Byte

Return Description: Local average grayscale value, or 0 if calculation fails.

Example:

localAvg = imgproc.Calculate_LocalGrayAvgValue(integralMap, 15, 50, 50)

ImgProc.Calculate_TotalPixels(SourceImage, SelectShape, X1, Y1, X2, Y2, ColorBW)

Description: Calculates total pixel count in selected region.

Syntax: result = ImgProc.Calculate_TotalPixels(SourceImage, SelectShape, X1, Y1, X2, Y2, ColorBW)

Parameter Description Default
SourceImage (Bitmap) Source image to analyze. —
SelectShape (Integer) Shape mode for region selection.
Supported values:
1: Rectangle region
Any other value: Circle region
—
X1 (Integer) First X-coordinate. —
Y1 (Integer) First Y-coordinate. —
X2 (Integer) Second X-coordinate. —
Y2 (Integer) Second Y-coordinate. —
ColorBW (Integer) Color for counting.
Supported values:
0: Count white pixels (255,255,255)
Any other value (e.g., 1): Count black pixels (0,0,0)
—

Return Value: Long

Return Description: Total pixel count, or 0 if calculation fails.

Example:

totPix = imgproc.Calculate_TotalPixels(bitmap, 0, 0, 0, 100, 100, 0)

ImgProc.Check_ImageSize(SourceImage, MinWidth, MinHeight, MaxWidth, MaxHeight)

Description: Validates image dimensions against constraints.

Syntax: result = ImgProc.Check_ImageSize(SourceImage, MinWidth, MinHeight, MaxWidth, MaxHeight)

Parameter Description Default
SourceImage (Bitmap) Source image to validate.
Type: Bitmap; required; passed by reference.
—
MinWidth (Integer, Optional) Minimum allowed width. 1
MinHeight (Integer, Optional) Minimum allowed height. 1
MaxWidth (Integer, Optional) Maximum allowed width. 10000
MaxHeight (Integer, Optional) Maximum allowed height. 10000

Return Value: String

Return Description: Validation result message, or empty string if validation fails.

Example:

msg = imgproc.Check_ImageSize(bitmap, 100, 100, 5000, 5000)

ImgProc.CompareBitmapImages(b1, b2)

Description: Compares two bitmaps for pixel-by-pixel equality.

Syntax: result = ImgProc.CompareBitmapImages(b1, b2)

Parameter Description Default
b1 (Bitmap) First bitmap to compare. —
b2 (Bitmap) Second bitmap to compare. —

Return Value: Boolean

Return Description: True if bitmaps are identical, False otherwise.

Example:

isSame = imgproc.CompareBitmapImages(bmp1, bmp2)

ImgProc.Compute_DifferentialImage(SourceGrayImage1, SourceGrayImage2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Computes difference between two images.

Syntax: result = ImgProc.Compute_DifferentialImage(SourceGrayImage1, SourceGrayImage2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceGrayImage1 (Bitmap) First grayscale image.
Type: Bitmap; required; passed by reference.
—
SourceGrayImage2 (Bitmap) Second grayscale image.
Type: Bitmap; required; passed by reference.
—
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Differential image, or Nothing if operation fails.

Example:

diff = imgproc.Compute_DifferentialImage(grayBitmap1, grayBitmap2)

ImgProc.Convert_GrayByteArray_To_RGBImage(SrcByteArray(,))

Description: Converts grayscale byte array to RGB image.

Syntax: result = ImgProc.Convert_GrayByteArray_To_RGBImage(SrcByteArray(,))

Parameter Description Default
SrcByteArray(,) (Byte) —

Return Value: Bitmap

Return Description: RGB image converted from byte array, or Nothing if conversion fails.

Example:

image = imgproc.Convert_GrayByteArray_To_RGBImage(grayArray)

ImgProc.Convert_GrayByteArray_To_RGBImage_Int(SrcByteArray(,))

Description: Converts grayscale integer array to RGB image.

Syntax: result = ImgProc.Convert_GrayByteArray_To_RGBImage_Int(SrcByteArray(,))

Parameter Description Default
SrcByteArray(,) (Integer) —

Return Value: Bitmap

Return Description: RGB image converted from integer array, or Nothing if conversion fails.

Example:

image = imgproc.Convert_GrayByteArray_To_RGBImage_Int(intArray)

ImgProc.Convert_GrayImage_To_GrayByteArray(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Extracts grayscale image pixels into byte array.

Syntax: result = ImgProc.Convert_GrayImage_To_GrayByteArray(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to extract. —
MaskImage (Bitmap, Optional) Optional mask to constrain extraction. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Byte(,)

Return Description: 2D byte array (height x width), or Nothing if extraction fails.

Example:

grayArray = imgproc.Convert_GrayImage_To_GrayByteArray(bitmap)

ImgProc.Convert_RGBByteArray_To_RGBImage(SrcByteArray(,,))

Description: Converts RGB byte array to RGB image.

Syntax: result = ImgProc.Convert_RGBByteArray_To_RGBImage(SrcByteArray(,,))

Parameter Description Default
SrcByteArray(,,) (Byte) —

Return Value: Bitmap

Return Description: RGB image converted from byte array, or Nothing if conversion fails.

Example:

image = imgproc.Convert_RGBByteArray_To_RGBImage(rgbArray)

ImgProc.Convert_RGBImage_To_GrayByteArray(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Converts RGB image pixels to grayscale byte array.

Syntax: result = ImgProc.Convert_RGBImage_To_GrayByteArray(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to convert. —
MaskImage (Bitmap, Optional) Optional mask to constrain conversion. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Byte(,)

Return Description: 2D byte array (height x width), or Nothing if conversion fails.

Example:

grayArray = imgproc.Convert_RGBImage_To_GrayByteArray(bitmap)

ImgProc.Convert_RGBImage_To_GrayIntegerArray(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Converts RGB image pixels to grayscale integer array.

Syntax: result = ImgProc.Convert_RGBImage_To_GrayIntegerArray(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to convert. —
MaskImage (Bitmap, Optional) Optional mask to constrain conversion. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Integer(,)

Return Description: 2D integer array (height x width), or Nothing if conversion fails.

Example:

grayIntArray = imgproc.Convert_RGBImage_To_GrayIntegerArray(bitmap)

ImgProc.Convert_RGBImage_To_RGBByteArray(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Extracts RGB image pixels into 3D byte array.

Syntax: result = ImgProc.Convert_RGBImage_To_RGBByteArray(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to extract. —
MaskImage (Bitmap, Optional) Optional mask to constrain extraction. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Byte(,,)

Return Description: 3D byte array (height x width x channels), or Nothing if extraction fails.

Example:

rgbArray = imgproc.Convert_RGBImage_To_RGBByteArray(bitmap)

ImgProc.Count_ColorPixelOfInterest(SourceImage, ColorOfInterest_RGBInt, TotalPixelCount, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Counts pixels of specific color.

Syntax: result = ImgProc.Count_ColorPixelOfInterest(SourceImage, ColorOfInterest_RGBInt, TotalPixelCount, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to scan. —
ColorOfInterest_RGBInt (Integer) Target color as RGB integer. —
TotalPixelCount (Integer) Output total pixel count.
Type: Integer; required; passed by reference.
—
MaskImage (Bitmap, Optional) Optional mask to constrain counting. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Integer

Return Description: Number of pixels matching the target color, or 0 if counting fails.

Example:

count = imgproc.Count_ColorPixelOfInterest(bitmap, Color.Red.ToArgb(), totPix)

ImgProc.Count_ColorPixelOfInterest_FromGrayArray(ImageGrayArray(,), ColorOfInterestByte)

Description: Counts pixels of specified color in grayscale array.

Syntax: result = ImgProc.Count_ColorPixelOfInterest_FromGrayArray(ImageGrayArray(,), ColorOfInterestByte)

Parameter Description Default
ImageGrayArray(,) (Byte) —
ColorOfInterestByte (Byte) Gray color value to count. —

Return Value: Integer

Return Description: Number of pixels matching color, or 0 if counting fails.

Example:

count = imgproc.Count_ColorPixelOfInterest_FromGrayArray(grayArray, 128)

ImgProc.Count_ColorPixelOfInterest_FromGrayArray_Region(ImageGrayArray(,), ColorOfInterestByte, X1, Y1, X2, Y2)

Description: Counts pixels of specified color in region.

Syntax: result = ImgProc.Count_ColorPixelOfInterest_FromGrayArray_Region(ImageGrayArray(,), ColorOfInterestByte, X1, Y1, X2, Y2)

Parameter Description Default
ImageGrayArray(,) (Byte) —
ColorOfInterestByte (Integer) Gray color value to count. —
X1 (Integer) Start X coordinate. —
Y1 (Integer) Start Y coordinate. —
X2 (Integer) End X coordinate. —
Y2 (Integer) End Y coordinate. —

Return Value: Integer

Return Description: Number of pixels matching color, or 0 if counting fails.

Example:

count = imgproc.Count_ColorPixelOfInterest_FromGrayArray_Region(grayArray, 128, 0, 0, 100, 100)

ImgProc.Count_NumberOfGrayPixel_OfInterest(SourceGrayImage, GrayColorOfInterest, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Counts grayscale pixels of specific value.

Syntax: result = ImgProc.Count_NumberOfGrayPixel_OfInterest(SourceGrayImage, GrayColorOfInterest, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceGrayImage (Bitmap) Source grayscale image. —
GrayColorOfInterest (Integer) Target gray value to count. —
MaskImage (Bitmap, Optional) Optional mask to constrain counting. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Integer

Return Description: Number of grayscale pixels matching the target value, or 0 if counting fails.

Example:

count = imgproc.Count_NumberOfGrayPixel_OfInterest(grayBitmap, 128)

ImgProc.CropExportRegions(SourceImage, MaskImage, use4WayConnectivity, outputModeType, marginPixels, transparentBackground, backgroundColorRed, backgroundColorGreen, backgroundColorBlue, destinationFolder, filePrefix, imageFormatType)

Description: Exports cropped regions based on a binary mask image directly from Bitmap objects.

Syntax: result = ImgProc.CropExportRegions(SourceImage, MaskImage, use4WayConnectivity, outputModeType, marginPixels, transparentBackground, backgroundColorRed, backgroundColorGreen, backgroundColorBlue, destinationFolder, filePrefix, imageFormatType)

Parameter Description Default
SourceImage (Bitmap) Source image to crop from. —
MaskImage (Bitmap) Binary mask defining regions. —
use4WayConnectivity (Boolean, Optional) Whether to use 4-way connectivity. False
outputModeType (Integer, Optional) Integer representing the region export output mode.
Supported outputModeType values:
0: ROI – rectangular region of interest
1: ExactShape – exact region shape
2: Binary – binary mask
1
marginPixels (Integer, Optional) Margin to add around regions. 0
transparentBackground (Boolean, Optional) Whether to use transparent background. True
backgroundColorRed (Integer, Optional) Background red component (0-255). 0
backgroundColorGreen (Integer, Optional) Background green component (0-255). 0
backgroundColorBlue (Integer, Optional) Background blue component (0-255). 0
destinationFolder (String, Optional) Folder to save exported regions. "C:\\ExportedRegions"
filePrefix (String, Optional) Prefix for exported file names. "Region\_"
imageFormatType (Integer, Optional) Integer representing the export image format.
Supported imageFormatType values:
0: PNG
1: JPEG
2: BMP
0

Return Value: Integer

Return Description: Number of successfully exported regions.

Example:

exported = imgproc.CropExportRegions(bitmap, maskBitmap, False, 1, 0, True)

ImgProc.Distance(X1, Y1, X2, Y2)

Description: Calculates Euclidean distance between two points.

Syntax: result = ImgProc.Distance(X1, Y1, X2, Y2)

Parameter Description Default
X1 (Double) X-coordinate of first point. —
Y1 (Double) Y-coordinate of first point. —
X2 (Double) X-coordinate of second point. —
Y2 (Double) Y-coordinate of second point. —

Return Value: Double

Return Description: Euclidean distance between the two points.

Example:

dist = imgproc.Distance(0, 0, 3, 4)

ImgProc.Draw_Histogram(ProfileData, TotPixelCount, Pic_Target, ProfileColor)

Description: Draws histogram within picture control.

Syntax: result = ImgProc.Draw_Histogram(ProfileData, TotPixelCount, Pic_Target, ProfileColor)

Parameter Description Default
ProfileData (Single()) Array of histogram bin data. —
TotPixelCount (Integer) Total pixel count for normalization. —
Pic_Target (PictureBox) Target picture control to draw in.
Type: PictureBox; required; passed by reference.
—
ProfileColor (Color) Color for histogram bars. —

Return Value: Bitmap

Return Description: Bitmap containing the histogram visualization, or Nothing if drawing fails.

Example:

hist = imgproc.Draw_Histogram(data, 1000000, picTarget, Color.Blue)

ImgProc.Draw_LineProfile(ProfileData, Pic_Target, ProfileColor, IsCenterLined)

Description: Draws line profile within picture control.

Syntax: result = ImgProc.Draw_LineProfile(ProfileData, Pic_Target, ProfileColor, IsCenterLined)

Parameter Description Default
ProfileData (Single()) Array of profile data values. —
Pic_Target (PictureBox) Target picture control to draw in.
Type: PictureBox; required; passed by reference.
—
ProfileColor (Color) Color for profile line. —
IsCenterLined (Boolean, Optional) Whether to draw center line. False

Return Value: Bitmap

Return Description: Bitmap containing the profile visualization, or Nothing if drawing fails.

Example:

profile = imgproc.Draw_LineProfile(data, picTarget, Color.Red)

ImgProc.Extract_PixelLocations(SourceGrayImage, GrayColorOfInterest, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Extracts pixel coordinates of specified gray color.

Syntax: result = ImgProc.Extract_PixelLocations(SourceGrayImage, GrayColorOfInterest, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceGrayImage (Bitmap) Source grayscale image. —
GrayColorOfInterest (Integer) Gray color value to find. —
MaskImage (Bitmap, Optional) Optional mask to constrain extraction. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Point()

Return Description: Array of Point coordinates matching color, or Nothing if extraction fails.

Example:

points = imgproc.Extract_PixelLocations(grayBitmap, 128)

ImgProc.Extract_PixelLocations_FromByte(SrcByteArray, GrayColorOfInterest, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Extracts pixel coordinates from byte array.

Syntax: result = ImgProc.Extract_PixelLocations_FromByte(SrcByteArray, GrayColorOfInterest, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SrcByteArray (Byte(,)) Source byte array [height, width]. —
GrayColorOfInterest (Integer) Gray color value to find. —
MaskImage (Bitmap, Optional) Optional mask to constrain extraction. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Point()

Return Description: Array of Point coordinates matching color, or Nothing if extraction fails.

Example:

points = imgproc.Extract_PixelLocations_FromByte(byteData, 128)

ImgProc.Extract_SkeletonPoints(SkeletonArray(,), foreground)

Description: Extracts all skeleton points from array.

Syntax: result = ImgProc.Extract_SkeletonPoints(SkeletonArray(,), foreground)

Parameter Description Default
SkeletonArray(,) (Byte) —
foreground (Byte) Foreground byte value. —

Return Value: Point()

Return Description: Array of skeleton points, or Nothing if extraction fails.

Example:

points = imgproc.Extract_SkeletonPoints(skelArray, 255)

ImgProc.Get_Avgerage_Color_3x3Box_ExceptOneColor(TargetX, TargetY, TargetColor_R, TargetColor_G, TargetColor_B, ColorChannelNum)

Description: Gets average color from 3×3 box excluding target color.

Syntax: result = ImgProc.Get_Avgerage_Color_3x3Box_ExceptOneColor(TargetX, TargetY, TargetColor_R, TargetColor_G, TargetColor_B, ColorChannelNum)

Parameter Description Default
TargetX (Integer) X coordinate of center pixel. —
TargetY (Integer) Y coordinate of center pixel. —
TargetColor_R (Byte) Red channel of color to exclude. —
TargetColor_G (Byte) Green channel of color to exclude. —
TargetColor_B (Byte) Blue channel of color to exclude. —
ColorChannelNum (Integer) Integer representing the color channel.
Supported ColorChannelNum values:
0: Red
1: Green
2: Blue
—

Return Value: Byte

Return Description: Average color value for the channel, or 0 if operation fails.

Example:

avgRed = imgproc.Get_Avgerage_Color_3x3Box_ExceptOneColor(10, 10, 0, 0, 0, 0)

ImgProc.Get_ColorRGB2DMap(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Gets 2D color RGB map from image.

Syntax: result = ImgProc.Get_ColorRGB2DMap(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to extract map from. —
MaskImage (Bitmap, Optional) Optional mask to constrain extraction. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Object

Return Description: 2D object array containing color RGB map, or Nothing if extraction fails.

Example:

rgbMap = imgproc.Get_ColorRGB2DMap(bitmap)

ImgProc.Get_GrayValues(SourceImage, x1, y1, x2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Extracts grayscale values from image line.

Syntax: result = ImgProc.Get_GrayValues(SourceImage, x1, y1, x2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to extract from. —
x1 (Integer) Start X coordinate. —
y1 (Integer) Start Y coordinate. —
x2 (Integer) End X coordinate. —
MaskImage (Bitmap, Optional) Optional mask to constrain extraction. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Byte()

Return Description: Array of grayscale values, or Nothing if extraction fails.

Example:

grayValues = imgproc.Get_GrayValues(bitmap, 0, 0, 100)

ImgProc.Get_Histogram(SourceImage, TotalPixelCount, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Calculates histogram of image pixel intensities.

Syntax: result = ImgProc.Get_Histogram(SourceImage, TotalPixelCount, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to analyze. —
TotalPixelCount (Integer) Output total pixel count.
Type: Integer; required; passed by reference.
—
MaskImage (Bitmap, Optional) Optional mask to constrain histogram. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Single(,)

Return Description: 2D array of histogram data, or Nothing if calculation fails.

Example:

hist = imgproc.Get_Histogram(bitmap, totalPix)

ImgProc.Get_LineProfile(SourceImage, StartAt, EndAt, LineThickness, IsNormalizeBy255)

Description: Gets pixel intensity profile along a line.

Syntax: result = ImgProc.Get_LineProfile(SourceImage, StartAt, EndAt, LineThickness, IsNormalizeBy255)

Parameter Description Default
SourceImage (Bitmap) Source image to extract profile from. —
StartAt (Point) Starting point of profile line. —
EndAt (Point) Ending point of profile line. —
LineThickness (Integer) Thickness of the profile line. —
IsNormalizeBy255 (Boolean, Optional) Whether to normalize values by 255. False

Return Value: Single(,)

Return Description: 2D array of profile data, or Nothing if extraction fails.

Example:

profile = imgproc.Get_LineProfile(bitmap, New Point(0, 0), New Point(100, 0), 5)

ImgProc.Get_MaxValue(Value1, Value2, Value3, Value4, Value5)

Description: Returns maximum value among five values.

Syntax: result = ImgProc.Get_MaxValue(Value1, Value2, Value3, Value4, Value5)

Parameter Description Default
Value1 (Single) First value. —
Value2 (Single) Second value. —
Value3 (Single) Third value. —
Value4 (Single) Fourth value. —
Value5 (Single) Fifth value. —

Return Value: Single

Return Description: Maximum among the five values.

Example:

maxVal = imgproc.Get_MaxValue(1.0, 2.5, 0.5, 3.0, 1.5)

ImgProc.Get_MinValue(Value1, Value2, Value3, Value4, Value5)

Description: Returns minimum value among five values.

Syntax: result = ImgProc.Get_MinValue(Value1, Value2, Value3, Value4, Value5)

Parameter Description Default
Value1 (Single) First value. —
Value2 (Single) Second value. —
Value3 (Single) Third value. —
Value4 (Single) Fourth value. —
Value5 (Single) Fifth value. —

Return Value: Single

Return Description: Minimum among the five values.

Example:

minVal = imgproc.Get_MinValue(1.0, 2.5, 0.5, 3.0, 1.5)

ImgProc.Get_MotionDetectHits(SourceImage1, SourceImage2, StepSize, Tolerance)

Description: Detects motion between two images.

Syntax: result = ImgProc.Get_MotionDetectHits(SourceImage1, SourceImage2, StepSize, Tolerance)

Parameter Description Default
SourceImage1 (Bitmap) First source image. —
SourceImage2 (Bitmap) Second source image to compare. —
StepSize (Single) Step size for motion sampling. —
Tolerance (Single) Motion detection tolerance. —

Return Value: Single

Return Description: Measure of motion detected between images.

Example:

motion = imgproc.Get_MotionDetectHits(frame1, frame2, 1.0, 10.0)

ImgProc.Get_PixelColor(SourceBitmap, TargetX, TargetY)

Description: Gets pixel color from bitmap at specified coordinates.

Syntax: result = ImgProc.Get_PixelColor(SourceBitmap, TargetX, TargetY)

Parameter Description Default
SourceBitmap (Bitmap) Source bitmap to sample. —
TargetX (Integer) X-coordinate within bitmap. —
TargetY (Integer) Y-coordinate within bitmap. —

Return Value: Integer

Return Description: Integer color value at specified bitmap location, or 0 if retrieval fails.

Example:

pixelColor = imgproc.Get_PixelColor(bitmap, 50, 75)

ImgProc.Get_PixelColor_From1PixelInScreen(TargetX, TargetY)

Description: Gets pixel color from screen at specified coordinates.

Syntax: result = ImgProc.Get_PixelColor_From1PixelInScreen(TargetX, TargetY)

Parameter Description Default
TargetX (Integer) X-coordinate on screen. —
TargetY (Integer) Y-coordinate on screen. —

Return Value: Integer

Return Description: Integer color value at specified screen location, or 0 if retrieval fails.

Example:

pixelColor = imgproc.Get_PixelColor_From1PixelInScreen(100, 100)

ImgProc.Get_PixelColor_FromScreen(TargetX, TargetY)

Description: Gets pixel color from screen.

Syntax: result = ImgProc.Get_PixelColor_FromScreen(TargetX, TargetY)

Parameter Description Default
TargetX (Integer) X-coordinate on screen. —
TargetY (Integer) Y-coordinate on screen. —

Return Value: Integer

Return Description: Integer color value at specified screen location, or 0 if retrieval fails.

Example:

pixelColor = imgproc.Get_PixelColor_FromScreen(200, 150)

ImgProc.Get_PixelColorValues(SourceImage, X1, Y1, ReturnRed, ReturnGreen, ReturnBlue, ReturnGray, ReturnHue, ReturnSat, ReturnIntensity, ReturnCyan, ReturnMagenta, ReturnYellow, ReturnK, ReturnLab_L, ReturnLab_a, ReturnLab_b, ReturnRG_Red, ReturnRG_Green, ReturnRG_Blue)

Description: Gets individual pixel color values in multiple color spaces.

Syntax: ImgProc.Get_PixelColorValues(SourceImage, X1, Y1, ReturnRed, ReturnGreen, ReturnBlue, ReturnGray, ReturnHue, ReturnSat, ReturnIntensity, ReturnCyan, ReturnMagenta, ReturnYellow, ReturnK, ReturnLab_L, ReturnLab_a, ReturnLab_b, ReturnRG_Red, ReturnRG_Green, ReturnRG_Blue)

Parameter Description Default
SourceImage (Bitmap) Source image to sample. —
X1 (Integer) X-coordinate of pixel. —
Y1 (Integer) Y-coordinate of pixel. —
ReturnRed (Byte) Output red component.
Type: Byte; required; passed by reference.
—
ReturnGreen (Byte) Output green component.
Type: Byte; required; passed by reference.
—
ReturnBlue (Byte) Output blue component.
Type: Byte; required; passed by reference.
—
ReturnGray (Byte) Output gray value.
Type: Byte; required; passed by reference.
—
ReturnHue (Single) Output hue.
Type: Single; required; passed by reference.
—
ReturnSat (Single) Output saturation.
Type: Single; required; passed by reference.
—
ReturnIntensity (Single) Output intensity.
Type: Single; required; passed by reference.
—
ReturnCyan (Single) Output cyan.
Type: Single; required; passed by reference.
—
ReturnMagenta (Single) Output magenta.
Type: Single; required; passed by reference.
—
ReturnYellow (Single) Output yellow.
Type: Single; required; passed by reference.
—
ReturnK (Single) Output K (black) in CMYK.
Type: Single; required; passed by reference.
—
ReturnLab_L (Single) Output Lab L.
Type: Single; required; passed by reference.
—
ReturnLab_a (Single) Output Lab a.
Type: Single; required; passed by reference.
—
ReturnLab_b (Single) Output Lab b.
Type: Single; required; passed by reference.
—
ReturnRG_Red (Single) Output rg chromaticity red.
Type: Single; required; passed by reference.
—
ReturnRG_Green (Single) Output rg chromaticity green.
Type: Single; required; passed by reference.
—
ReturnRG_Blue (Single) Output rg chromaticity blue.
Type: Single; required; passed by reference.
—

Return Value: Void

Example:

imgproc.Get_PixelColorValues(bitmap, 50, 50, r, g, b, gray, hue, sat, int, cyan, mag, yel, k, labL, labA, labB, rgR, rgG, rgB)

ImgProc.Get_PixelLocationArray(SourceGrayImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Gets all white pixel locations in grayscale image.

Syntax: result = ImgProc.Get_PixelLocationArray(SourceGrayImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceGrayImage (Bitmap) Source grayscale image to analyze. —
MaskImage (Bitmap, Optional) Optional mask to constrain search. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Point()

Return Description: Array of Point coordinates for white pixels, or Nothing if search fails.

Example:

whitePoints = imgproc.Get_PixelLocationArray(bitmap)

ImgProc.Get_PixelLocationArray_Bk(SourceGrayImage, DestPixelGray, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Gets pixel locations matching specified grayscale value.

Syntax: result = ImgProc.Get_PixelLocationArray_Bk(SourceGrayImage, DestPixelGray, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceGrayImage (Bitmap) Source grayscale image. —
DestPixelGray (Byte) Target grayscale value to find (0-255). —
MaskImage (Bitmap, Optional) Optional mask to constrain search. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Point()

Return Description: Array of Point coordinates, or Nothing if search fails.

Example:

points = imgproc.Get_PixelLocationArray_Bk(bitmap, 128)

ImgProc.Get_TrueSkeletonLength(SkeletonArray(,), foreground, umPerPixels, SplineVertexCount)

Description: Calculates true skeleton curve length with spline.

Syntax: result = ImgProc.Get_TrueSkeletonLength(SkeletonArray(,), foreground, umPerPixels, SplineVertexCount)

Parameter Description Default
SkeletonArray(,) (Byte) —
foreground (Byte) Foreground byte value. —
umPerPixels (Single) Micrometer per pixel ratio. —
SplineVertexCount (Integer) Number of spline vertices. —

Return Value: Single

Return Description: True skeleton length, or 0 if calculation fails.

Example:

length = imgproc.Get_TrueSkeletonLength(skelArray, 255, 1.0, 100)

ImgProc.GrayScaling_PutTo_2DByte(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Converts image to grayscale and stores in 2D byte array.

Syntax: result = ImgProc.GrayScaling_PutTo_2DByte(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to convert. —
MaskImage (Bitmap, Optional) Optional mask to constrain conversion. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Byte(,)

Return Description: 2D byte array (height x width), or Nothing if conversion fails.

Example:

grayArray = imgproc.GrayScaling_PutTo_2DByte(bitmap)

ImgProc.GrayScaling_PutTo_2DInt(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Converts image to grayscale and stores in 2D integer array.

Syntax: result = ImgProc.GrayScaling_PutTo_2DInt(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to convert. —
MaskImage (Bitmap, Optional) Optional mask to constrain conversion. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Integer(,)

Return Description: 2D integer array (height x width), or Nothing if conversion fails.

Example:

grayIntArray = imgproc.GrayScaling_PutTo_2DInt(bitmap)

ImgProc.GrayScaling_ReturnImg_From_2DInt(SourceImage, Gray2DInt, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Converts image to grayscale and returns result from 2D integer array.

Syntax: result = ImgProc.GrayScaling_ReturnImg_From_2DInt(SourceImage, Gray2DInt, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to process. —
Gray2DInt (Integer(,)) 2D integer array (height x width) to use. —
MaskImage (Bitmap, Optional) Optional mask to constrain processing. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Processed image, or Nothing if conversion fails.

Example:

result = imgproc.GrayScaling_ReturnImg_From_2DInt(bitmap, intArray)

ImgProc.IsSameImage(IsTheFirstImage, SourceImage)

Description: Checks if image is same as stored reference.

Syntax: result = ImgProc.IsSameImage(IsTheFirstImage, SourceImage)

Parameter Description Default
IsTheFirstImage (Boolean) Whether to check against first or second reference. —
SourceImage (Bitmap) Source image to check. —

Return Value: Boolean

Return Description: True if image matches reference, False otherwise.

Example:

isSame = imgproc.IsSameImage(True, bitmap)

ImgProc.IsSameImage_QuickCheck(IsTheFirstImage, SourceImage, x1, y1, x2)

Description: Quick check if image is same as stored reference.

Syntax: result = ImgProc.IsSameImage_QuickCheck(IsTheFirstImage, SourceImage, x1, y1, x2)

Parameter Description Default
IsTheFirstImage (Boolean) Whether to check against first or second reference. —
SourceImage (Bitmap) Source image to check. —
x1 (Integer) Start X coordinate. —
y1 (Integer) Start Y coordinate. —
x2 (Integer) End X coordinate. —

Return Value: Boolean

Return Description: True if image matches reference, False otherwise.

Example:

isSame = imgproc.IsSameImage_QuickCheck(True, bitmap, 0, 0, 100)

ImgProc.Overlay_GrayIntArray_On_Image(SourceImage, Gray2DInt, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Overlays grayscale integer array values as colors on image.

Syntax: result = ImgProc.Overlay_GrayIntArray_On_Image(SourceImage, Gray2DInt, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to overlay on. —
Gray2DInt (Integer(,)) 2D integer array (height x width) values. —
MaskImage (Bitmap) Mask image. —
MaskRegionBoundary (Rectangle) Boundary rectangle for masked region. —
IsMaskAllRegionSelected (Boolean) Whether entire region is selected. —

Return Value: Bitmap

Return Description: Image with overlay applied, or Nothing if overlay fails.

Example:

overlaid = imgproc.Overlay_GrayIntArray_On_Image(bitmap, intArray, mask, rect, True)

ImgProc.Quantify_ColorPixel(SourceImage, Return_ColorTable(,), TotalPixelCount, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Counts and classifies all color pixels.

Syntax: result = ImgProc.Quantify_ColorPixel(SourceImage, Return_ColorTable(,), TotalPixelCount, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to analyze. —
Return_ColorTable(,) (Integer) —
TotalPixelCount (Integer) Output total pixel count.
Type: Integer; required; passed by reference.
—
MaskImage (Bitmap, Optional) Optional mask to constrain analysis. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Integer

Return Description: Number of color classifications found, or 0 if quantification fails.

Example:

colorCount = imgproc.Quantify_ColorPixel(bitmap, colorTbl, totPix)

ImgProc.RegionExtract_BasicAnalysis(Src_IDMap(,), Src_ColorTable(,))

Description: Extracts basic region analysis statistics from label and color maps.

Syntax: result = ImgProc.RegionExtract_BasicAnalysis(Src_IDMap(,), Src_ColorTable(,))

Parameter Description Default
Src_IDMap(,) (Integer) —
Src_ColorTable(,) (Byte) —

Return Value: Double(,)

Return Description: 2D array of analysis statistics, or Nothing if analysis fails.

Example:

stats = imgproc.RegionExtract_BasicAnalysis(labelMap, colorTable)

ImgProc.RegionExtract_Convert_LabelIDMap_To_Image(LabelIDMap, ObjectRed, ObjectGreen, ObjectBlue)

Description: Converts label ID map to colored image representation.

Syntax: result = ImgProc.RegionExtract_Convert_LabelIDMap_To_Image(LabelIDMap, ObjectRed, ObjectGreen, ObjectBlue)

Parameter Description Default
LabelIDMap (Integer(,)) Region label map. —
ObjectRed (Byte, Optional) Red channel value for objects (0-255). 255
ObjectGreen (Byte, Optional) Green channel value for objects (0-255). 255
ObjectBlue (Byte, Optional) Blue channel value for objects (0-255). 255

Return Value: Bitmap

Return Description: Image with regions colored, or Nothing if conversion fails.

Example:

colored = imgproc.RegionExtract_Convert_LabelIDMap_To_Image(labelMap, 255, 0, 0)

ImgProc.RegionExtract_Create_GreenObjectOutlineImage(SourceLabelIDMap(,), SourceIDINfoIndex, x1, x2, y1, y2, DilateBoxSize)

Description: Creates green outlined image from label map with optional dilation.

Syntax: result = ImgProc.RegionExtract_Create_GreenObjectOutlineImage(SourceLabelIDMap(,), SourceIDINfoIndex, x1, x2, y1, y2, DilateBoxSize)

Parameter Description Default
SourceLabelIDMap(,) (Integer) —
SourceIDINfoIndex (Integer) Region ID index to extract. —
x1 (Integer) Left boundary coordinate. —
x2 (Integer) Right boundary coordinate. —
y1 (Integer) Top boundary coordinate. —
y2 (Integer) Bottom boundary coordinate. —
DilateBoxSize (Integer) Size of dilation box kernel. —

Return Value: Bitmap

Return Description: Green outlined image, or Nothing if creation fails.

Example:

outline = imgproc.RegionExtract_Create_GreenObjectOutlineImage(labelMap, 1, 0, 100, 0, 100, 3)

ImgProc.RegionExtract_Create_OutlinedOriginalImage(SourceImage, LabelIDMap, ObjectRed, ObjectGreen, ObjectBlue)

Description: Creates image with region outlines overlaid on original image.

Syntax: result = ImgProc.RegionExtract_Create_OutlinedOriginalImage(SourceImage, LabelIDMap, ObjectRed, ObjectGreen, ObjectBlue)

Parameter Description Default
SourceImage (Bitmap) Source image to overlay on. —
LabelIDMap (Integer(,)) Region label map. —
ObjectRed (Byte, Optional) Red channel value for outlines (0-255). 255
ObjectGreen (Byte, Optional) Green channel value for outlines (0-255). 255
ObjectBlue (Byte, Optional) Blue channel value for outlines (0-255). 255

Return Value: Bitmap

Return Description: Image with outlines overlaid, or Nothing if creation fails.

Example:

outlined = imgproc.RegionExtract_Create_OutlinedOriginalImage(bitmap, labelMap)

ImgProc.RegionExtract_Create_WhiteObjectOutlineImage(SourceLabelIDMap(,), SourceIDINfoIndex, x1, x2, y1, y2, DilateBoxSize)

Description: Creates white outlined image from label map with optional dilation.

Syntax: result = ImgProc.RegionExtract_Create_WhiteObjectOutlineImage(SourceLabelIDMap(,), SourceIDINfoIndex, x1, x2, y1, y2, DilateBoxSize)

Parameter Description Default
SourceLabelIDMap(,) (Integer) —
SourceIDINfoIndex (Integer) Region ID index to extract. —
x1 (Integer) Left boundary coordinate. —
x2 (Integer) Right boundary coordinate. —
y1 (Integer) Top boundary coordinate. —
y2 (Integer) Bottom boundary coordinate. —
DilateBoxSize (Integer) Size of dilation box kernel. —

Return Value: Bitmap

Return Description: White outlined image, or Nothing if creation fails.

Example:

outline = imgproc.RegionExtract_Create_WhiteObjectOutlineImage(labelMap, 1, 0, 100, 0, 100, 3)

ImgProc.RegionExtract_Crop_LabelIDMap_To_2DByte(LabelIDMap, IDInfoIndex, X1, X2, Y1, Y2)

Description: Extracts and converts specified regions from label map to byte array.

Syntax: result = ImgProc.RegionExtract_Crop_LabelIDMap_To_2DByte(LabelIDMap, IDInfoIndex, X1, X2, Y1, Y2)

Parameter Description Default
LabelIDMap (Integer(,)) Region label map. —
IDInfoIndex (Integer) Region ID index to extract. —
X1 (Integer) Left boundary coordinate. —
X2 (Integer) Right boundary coordinate. —
Y1 (Integer) Top boundary coordinate. —
Y2 (Integer) Bottom boundary coordinate. —

Return Value: Byte(,)

Return Description: 2D byte array of extracted region, or Nothing if extraction fails.

Example:

regionBytes = imgproc.RegionExtract_Crop_LabelIDMap_To_2DByte(labelMap, 1, 0, 100, 0, 100)

ImgProc.RegionExtract_Crop_WhiteObjectImage(SourceLabelIDMap(,), SourceIDINfoIndex, x1, x2, y1, y2)

Description: Crops white object region from label ID map.

Syntax: result = ImgProc.RegionExtract_Crop_WhiteObjectImage(SourceLabelIDMap(,), SourceIDINfoIndex, x1, x2, y1, y2)

Parameter Description Default
SourceLabelIDMap(,) (Integer) —
SourceIDINfoIndex (Integer) Region ID index to extract. —
x1 (Integer) Left boundary coordinate. —
x2 (Integer) Right boundary coordinate. —
y1 (Integer) Top boundary coordinate. —
y2 (Integer) Bottom boundary coordinate. —

Return Value: Bitmap

Return Description: White cropped region image, or Nothing if cropping fails.

Example:

cropped = imgproc.RegionExtract_Crop_WhiteObjectImage(labelMap, 1, 0, 100, 0, 100)

ImgProc.RegionExtract_Update_LabelIDMap_ByIncluding(LabelIDMap, IDArray)

Description: Updates label ID map to include only specified region IDs.

Syntax: result = ImgProc.RegionExtract_Update_LabelIDMap_ByIncluding(LabelIDMap, IDArray)

Parameter Description Default
LabelIDMap (Integer(,)) Region label map to update. —
IDArray (Dictionary(Of Integer, Boolean)) Dictionary of region IDs to include. —

Return Value: Integer(,)

Return Description: Updated label ID map, or Nothing if update fails.

Example:

filtered = imgproc.RegionExtract_Update_LabelIDMap_ByIncluding(labelMap, idDict)

ImgProc.RegionExtract_Update_LabelIDMap_To_Image(SourceImage, LabelIDMap, RegionColorTable, IsOverlap, BkColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Converts label ID map values to corresponding image colors.

Syntax: result = ImgProc.RegionExtract_Update_LabelIDMap_To_Image(SourceImage, LabelIDMap, RegionColorTable, IsOverlap, BkColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to use for color reference. —
LabelIDMap (Integer(,)) Region label map. —
RegionColorTable (Byte(,)) Region color table. —
IsOverlap (Boolean, Optional) Whether to overlap with source image. True
BkColor (Integer, Optional) Background color to use. 0
MaskImage (Bitmap, Optional) Optional mask to constrain conversion. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Image with labels converted to colors, or Nothing if conversion fails.

Example:

coloredRegions = imgproc.RegionExtract_Update_LabelIDMap_To_Image(bitmap, labelMap, colorTable)

Image Transforms & Filters (72 functions)
ImgProc.AdaptiveBinarization(SourceImage, LocalBoxSizeValue, IsObjectWhite, ThresholdLevel, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Converts to binary using local adaptive threshold.

Syntax: result = ImgProc.AdaptiveBinarization(SourceImage, LocalBoxSizeValue, IsObjectWhite, ThresholdLevel, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to binarize. —
LocalBoxSizeValue (Integer) Size of local adaptive box. —
IsObjectWhite (Boolean) Whether object is white (true) or black (false). —
ThresholdLevel (Integer) Threshold level for binarization. —
IsShowProgress (Boolean, Optional) Whether to show progress. True
MaskImage (Bitmap, Optional) Optional mask to constrain binarization. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Binarized image, or Nothing if binarization fails.

Example:

binary = imgproc.AdaptiveBinarization(bitmap, 15, True, 10)

ImgProc.AdaptiveContrast(SourceImage, Strength, TilesX, TilesY, ClipLimit, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Applies adaptive contrast enhancement with histogram equalization.

Syntax: result = ImgProc.AdaptiveContrast(SourceImage, Strength, TilesX, TilesY, ClipLimit, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to enhance. —
Strength (Single, Optional) Enhancement strength (0.0-1.0). 0.6F
TilesX (Integer, Optional) Number of horizontal tiles. 8
TilesY (Integer, Optional) Number of vertical tiles. 8
ClipLimit (Single, Optional) Histogram clip limit. 1.5F
IsShowProgress (Boolean, Optional) Whether to show progress. True
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) True

Return Value: Bitmap

Return Description: Contrast-enhanced image, or Nothing if enhancement fails.

Example:

enhanced = imgproc.AdaptiveContrast(bitmap, 0.6, 8, 8, 1.5)

ImgProc.AddMargin(SourceImage, LeftMargin, RightMargin, TopMargin, BottomMargin)

Description: Adds margins to image edges with background color.

Syntax: result = ImgProc.AddMargin(SourceImage, LeftMargin, RightMargin, TopMargin, BottomMargin)

Parameter Description Default
SourceImage (Bitmap) Source image to add margins to. —
LeftMargin (Integer) Left margin size in pixels. —
RightMargin (Integer) Right margin size in pixels. —
TopMargin (Integer) Top margin size in pixels. —
BottomMargin (Integer) Bottom margin size in pixels. —

Return Value: Bitmap

Return Description: Image with added margins, or Nothing if operation fails.

Example:

margined = imgproc.AddMargin(bitmap, 10, 10, 10, 10)

ImgProc.AutoContrast(SourceImage, ClipPercent)

Description: Auto adjusts contrast automatically.

Syntax: result = ImgProc.AutoContrast(SourceImage, ClipPercent)

Parameter Description Default
SourceImage (Bitmap) Source image to adjust. —
ClipPercent (Single, Optional) Clip percentage for contrast range. 0.5F

Return Value: Bitmap

Return Description: Contrast-adjusted image, or Nothing if adjustment fails.

Example:

contrasted = imgproc.AutoContrast(bitmap, 0.5)

ImgProc.AutoEqualize(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Auto equalizes histogram.

Syntax: result = ImgProc.AutoEqualize(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to equalize. —
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Histogram-equalized image, or Nothing if equalization fails.

Example:

equalized = imgproc.AutoEqualize(bitmap)

ImgProc.AutoGamma(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Auto adjusts gamma curve.

Syntax: result = ImgProc.AutoGamma(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to adjust. —
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Gamma-adjusted image, or Nothing if adjustment fails.

Example:

gammaed = imgproc.AutoGamma(bitmap)

ImgProc.AutoTone(SourceImage, ClipPercent, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Auto adjusts tonal range.

Syntax: result = ImgProc.AutoTone(SourceImage, ClipPercent, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to adjust. —
ClipPercent (Single, Optional) Clip percentage for tonal range. 0.5F
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Tone-adjusted image, or Nothing if adjustment fails.

Example:

toned = imgproc.AutoTone(bitmap, 0.5)

ImgProc.AutoWhiteBalance(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Auto adjusts white balance.

Syntax: result = ImgProc.AutoWhiteBalance(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to adjust. —
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: White-balanced image, or Nothing if adjustment fails.

Example:

balanced = imgproc.AutoWhiteBalance(bitmap)

ImgProc.BoxAveraging(SourceImage, BoxSizeHalf, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Applies box averaging (simple blur) filter.

Syntax: result = ImgProc.BoxAveraging(SourceImage, BoxSizeHalf, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to blur. —
BoxSizeHalf (Integer) Half-size of averaging box kernel. —
MaskImage (Bitmap, Optional) Optional mask to constrain blur. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Blurred image, or Nothing if processing fails.

Example:

blurred = imgproc.BoxAveraging(bitmap, 2)

ImgProc.BrightContrast(SourceImage, BrightLevel, ContrastLevel, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Adjusts brightness and contrast of image.

Syntax: result = ImgProc.BrightContrast(SourceImage, BrightLevel, ContrastLevel, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to adjust. —
BrightLevel (Integer) Brightness adjustment level. —
ContrastLevel (Integer) Contrast adjustment level. —
IsShowProgress (Boolean, Optional) Whether to show progress. True
MaskImage (Bitmap, Optional) Optional mask to constrain adjustment. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Adjusted image, or Nothing if adjustment fails.

Example:

brightened = imgproc.BrightContrast(bitmap, 20, 10)

ImgProc.BW_Dithering_FS(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Applies Floyd-Steinberg dithering for black and white conversion.

Syntax: result = ImgProc.BW_Dithering_FS(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to dither. —
MaskImage (Bitmap, Optional) Optional mask to constrain dithering. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Dithered black and white image, or Nothing if processing fails.

Example:

dithered = imgproc.BW_Dithering_FS(bitmap)

ImgProc.BW_Dithering_OrderedDither(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Applies ordered dithering for black and white conversion.

Syntax: result = ImgProc.BW_Dithering_OrderedDither(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to dither. —
MaskImage (Bitmap, Optional) Optional mask to constrain dithering. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Dithered black and white image, or Nothing if processing fails.

Example:

dithered = imgproc.BW_Dithering_OrderedDither(bitmap)

ImgProc.CannyEdgeDetecton(SourceImage, LocalBoxSize, SkipGrayScaling, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Detects edges using Canny edge detection algorithm.

Syntax: result = ImgProc.CannyEdgeDetecton(SourceImage, LocalBoxSize, SkipGrayScaling, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image for edge detection. —
LocalBoxSize (Integer) Local box size for Canny processing. —
SkipGrayScaling (Boolean, Optional) Whether to skip grayscale conversion. False
MaskImage (Bitmap, Optional) Optional mask to constrain detection. Nothing
MaskRegionBoundary (Rectangle, Optional) Nothing
IsMaskAllRegionSelected (Boolean, Optional) True

Return Value: Bitmap

Return Description: Edge-detected image, or Nothing if detection fails.

Example:

edges = imgproc.CannyEdgeDetecton(bitmap, 3)

ImgProc.ChangeNonBlackToWhite(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Converts all non-black pixels to white, creating binary image.

Syntax: result = ImgProc.ChangeNonBlackToWhite(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to process. —
MaskImage (Bitmap, Optional) Optional mask to constrain conversion. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Binary image with white non-black pixels, or Nothing if processing fails.

Example:

binary = imgproc.ChangeNonBlackToWhite(bitmap)

ImgProc.CompositeWithMask(originalImage, processedImage, maskImage, processedRegion)

Description: Composites processed image with mask on original.

Syntax: result = ImgProc.CompositeWithMask(originalImage, processedImage, maskImage, processedRegion)

Parameter Description Default
originalImage (Bitmap) Original source image. —
processedImage (Bitmap) Processed result image. —
maskImage (Bitmap) Mask image for blending. —
processedRegion (Rectangle) Region rectangle for processing. —

Return Value: Bitmap

Return Description: Composited image, or Nothing if compositing fails.

Example:

composite = imgproc.CompositeWithMask(origBitmap, procBitmap, maskBitmap, rect)

ImgProc.Convert_To_24bitBitmap(SourceImage)

Description: Converts image to 24-bit RGB bitmap.

Syntax: result = ImgProc.Convert_To_24bitBitmap(SourceImage)

Parameter Description Default
SourceImage (Bitmap) Source image to convert.
Type: Bitmap; required; passed by reference.
—

Return Value: Bitmap

Return Description: 24-bit RGB bitmap, or Nothing if conversion fails.

Example:

rgb24 = imgproc.Convert_To_24bitBitmap(bitmap)

ImgProc.Convert_To_24bitImage(SourceImage)

Description: Converts to 24-bit RGB image.

Syntax: result = ImgProc.Convert_To_24bitImage(SourceImage)

Parameter Description Default
SourceImage (Bitmap) Source image to convert.
Type: Bitmap; required; passed by reference.
—

Return Value: Bitmap

Return Description: 24-bit RGB image, or Nothing if conversion fails.

Example:

rgb24 = imgproc.Convert_To_24bitImage(bitmap)

ImgProc.CorrectUnevenIllumination(SourceImage, GridRows, GridCols, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Corrects uneven illumination using grid-based division.

Syntax: result = ImgProc.CorrectUnevenIllumination(SourceImage, GridRows, GridCols, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to correct. —
GridRows (Integer, Optional) Number of grid rows. 16
GridCols (Integer, Optional) Number of grid columns. 16
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Illumination-corrected image, or Nothing if correction fails.

Example:

corrected = imgproc.CorrectUnevenIllumination(bitmap, 16, 16)

ImgProc.Create_BlankImage(SourceImage, BackColor)

Description: Creates blank image with specified background color.

Syntax: result = ImgProc.Create_BlankImage(SourceImage, BackColor)

Parameter Description Default
SourceImage (Bitmap) Source image defining dimensions. —
BackColor (Color) Background color to fill. —

Return Value: Bitmap

Return Description: Blank image with specified color, or Nothing if creation fails.

Example:

blank = imgproc.Create_BlankImage(bitmap, Color.White)

ImgProc.Create_MaskEllipse(CanvasWidth, CanvasHeighT, MaskRect)

Description: Creates mask for single ellipse region.

Syntax: result = ImgProc.Create_MaskEllipse(CanvasWidth, CanvasHeighT, MaskRect)

Parameter Description Default
CanvasWidth (Integer) Canvas width. —
CanvasHeighT (Integer) Canvas height. —
MaskRect (Rectangle) Ellipse region for mask. —

Return Value: Bitmap

Return Description: Mask bitmap, or Nothing if creation fails.

Example:

mask = imgproc.Create_MaskEllipse(800, 600, ellipseRect)

ImgProc.Create_MaskEllipses(CanvasWidth, CanvasHeighT, MaskRects())

Description: Creates mask for multiple ellipse regions.

Syntax: result = ImgProc.Create_MaskEllipses(CanvasWidth, CanvasHeighT, MaskRects())

Parameter Description Default
CanvasWidth (Integer) Canvas width. —
CanvasHeighT (Integer) Canvas height. —
MaskRects() (Rectangle) —

Return Value: Bitmap

Return Description: Mask bitmap, or Nothing if creation fails.

Example:

mask = imgproc.Create_MaskEllipses(800, 600, ellipses())

ImgProc.Create_MaskRectangle(CanvasWidth, CanvasHeighT, MaskRect)

Description: Creates mask for single rectangle region.

Syntax: result = ImgProc.Create_MaskRectangle(CanvasWidth, CanvasHeighT, MaskRect)

Parameter Description Default
CanvasWidth (Integer) Canvas width. —
CanvasHeighT (Integer) Canvas height. —
MaskRect (Rectangle) Rectangle region for mask. —

Return Value: Bitmap

Return Description: Mask bitmap, or Nothing if creation fails.

Example:

mask = imgproc.Create_MaskRectangle(800, 600, rect)

ImgProc.Create_MaskRectangles(CanvasWidth, CanvasHeighT, MaskRects())

Description: Creates mask for multiple rectangle regions.

Syntax: result = ImgProc.Create_MaskRectangles(CanvasWidth, CanvasHeighT, MaskRects())

Parameter Description Default
CanvasWidth (Integer) Canvas width. —
CanvasHeighT (Integer) Canvas height. —
MaskRects() (Rectangle) —

Return Value: Bitmap

Return Description: Mask bitmap, or Nothing if creation fails.

Example:

mask = imgproc.Create_MaskRectangles(800, 600, rects())

ImgProc.Crop(SourceImage, nWidth, nHeight, TargetX, TargetY)

Description: Crops image to specified dimensions at target position.

Syntax: result = ImgProc.Crop(SourceImage, nWidth, nHeight, TargetX, TargetY)

Parameter Description Default
SourceImage (Bitmap) Source image to crop. —
nWidth (Integer) Width of crop area in pixels. —
nHeight (Integer) Height of crop area in pixels. —
TargetX (Integer) X coordinate of top-left corner. —
TargetY (Integer) Y coordinate of top-left corner. —

Return Value: Bitmap

Return Description: Cropped image, or Nothing if cropping fails.

Example:

cropped = imgproc.Crop(bitmap, 320, 240, 0, 0)

ImgProc.DeepCopy(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Creates deep copy of image region.

Syntax: result = ImgProc.DeepCopy(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to copy. —
MaskImage (Bitmap, Optional) Optional mask to constrain copy. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Copied image, or Nothing if copy fails.

Example:

copy = imgproc.DeepCopy(bitmap)

ImgProc.DilateOutlines(SourceGrayImage, BackgroundGray, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Expands specified outline color on grayscale image edges.

Syntax: result = ImgProc.DilateOutlines(SourceGrayImage, BackgroundGray, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceGrayImage (Bitmap) Source grayscale image. —
BackgroundGray (Byte) Background grayscale value. —
MaskImage (Bitmap, Optional) Optional mask to constrain processing. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Image with dilated outlines, or Nothing if processing fails.

Example:

dilated = imgproc.DilateOutlines(bitmap, 0)

ImgProc.Draw_Rectangles(Pic_Target, SourceRectangles(), LineColor)

Description: Draws rectangles on image with specified color.

Syntax: result = ImgProc.Draw_Rectangles(Pic_Target, SourceRectangles(), LineColor)

Parameter Description Default
Pic_Target (Bitmap) Target image to draw on. —
SourceRectangles() (Rectangle) —
LineColor (Color) Color of rectangle outlines. —

Return Value: Bitmap

Return Description: Image with drawn rectangles, or Nothing if drawing fails.

Example:

drawn = imgproc.Draw_Rectangles(bitmap, rects, Color.Red)

ImgProc.EdgeDetect_by_ExplicitComp(SourceImage, IsOverlay, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Detects edges using explicit comparison method.

Syntax: result = ImgProc.EdgeDetect_by_ExplicitComp(SourceImage, IsOverlay, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image for edge detection. —
IsOverlay (Boolean) Whether to overlay edges on original image. —
MaskImage (Bitmap, Optional) Optional mask to constrain detection. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Edge-detected image, or Nothing if processing fails.

Example:

edges = imgproc.EdgeDetect_by_ExplicitComp(bitmap, True)

ImgProc.EdgeDetect_by_Homogenity(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Detects edges using homogeneity measure.

Syntax: result = ImgProc.EdgeDetect_by_Homogenity(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image for edge detection. —
MaskImage (Bitmap, Optional) Optional mask to constrain detection. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Edge-detected image, or Nothing if detection fails.

Example:

edges = imgproc.EdgeDetect_by_Homogenity(bitmap)

ImgProc.EdgeDetect_by_LeftHand(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Detects edges using left-hand rule method.

Syntax: result = ImgProc.EdgeDetect_by_LeftHand(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image for edge detection. —
MaskImage (Bitmap, Optional) Optional mask to constrain detection. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Edge-detected image, or Nothing if detection fails.

Example:

edges = imgproc.EdgeDetect_by_LeftHand(bitmap)

ImgProc.EdgeDetect_by_Sobel(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Detects edges using Sobel operator.

Syntax: result = ImgProc.EdgeDetect_by_Sobel(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image for edge detection. —
MaskImage (Bitmap, Optional) Optional mask to constrain detection. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Edge-detected image, or Nothing if detection fails.

Example:

edges = imgproc.EdgeDetect_by_Sobel(bitmap)

ImgProc.EdgeDetect_by_UpperLeftHand(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Detects edges using upper-left hand kernel.

Syntax: result = ImgProc.EdgeDetect_by_UpperLeftHand(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image for edge detection. —
MaskImage (Bitmap, Optional) Optional mask to constrain detection. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Edge-detected image, or Nothing if detection fails.

Example:

edges = imgproc.EdgeDetect_by_UpperLeftHand(bitmap)

ImgProc.Emboss(SourceImage, Angle, Distance, Strength, Bias, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Applies emboss filter to create 3D relief effect.

Syntax: result = ImgProc.Emboss(SourceImage, Angle, Distance, Strength, Bias, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to emboss. —
Angle (Single, Optional) Direction of light source in degrees (0-360). 135.0F
Distance (Integer, Optional) Distance of emboss effect. 1
Strength (Single, Optional) Strength of emboss effect. 1.0F
Bias (Integer, Optional) Bias value for emboss calculation. 128
MaskImage (Bitmap, Optional) Optional mask to constrain effect. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Embossed image, or Nothing if processing fails.

Example:

embossed = imgproc.Emboss(bitmap, 135.0, 1, 1.0, 128)

ImgProc.ErodeOutlines(SourceGrayImage, BackgroundGray, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Removes specified outline color from grayscale image edges.

Syntax: result = ImgProc.ErodeOutlines(SourceGrayImage, BackgroundGray, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceGrayImage (Bitmap) Source grayscale image. —
BackgroundGray (Byte) Background grayscale value. —
MaskImage (Bitmap, Optional) Optional mask to constrain processing. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Image with eroded outlines, or Nothing if processing fails.

Example:

eroded = imgproc.ErodeOutlines(bitmap, 0)

ImgProc.Flip_Horizontal(SourceImage)

Description: Flips image horizontally (mirror left-right).

Syntax: result = ImgProc.Flip_Horizontal(SourceImage)

Parameter Description Default
SourceImage (Bitmap) Source image to flip. —

Return Value: Bitmap

Return Description: Horizontally flipped image, or Nothing if flipping fails.

Example:

flipped = imgproc.Flip_Horizontal(bitmap)

ImgProc.Flip_Vertical(SourceImage)

Description: Flips image vertically (mirror top-bottom).

Syntax: result = ImgProc.Flip_Vertical(SourceImage)

Parameter Description Default
SourceImage (Bitmap) Source image to flip. —

Return Value: Bitmap

Return Description: Vertically flipped image, or Nothing if flipping fails.

Example:

flipped = imgproc.Flip_Vertical(bitmap)

ImgProc.GammaAdjustment(SourceImage, gammaValue, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Applies gamma adjustment to modify the overall brightness and contrast of the image.

Syntax: result = ImgProc.GammaAdjustment(SourceImage, gammaValue, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image for gamma adjustment. —
gammaValue (Double) Gamma value for adjustment. —
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Gamma-adjusted image, or Nothing if adjustment fails.

Example:

adjusted = imgproc.GammaAdjustment(bitmap, 1.5)

ImgProc.GaussianFilter(SourceImage, FilterSize, WeightFactor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Applies Gaussian blur filter with configurable size.

Syntax: result = ImgProc.GaussianFilter(SourceImage, FilterSize, WeightFactor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to blur. —
FilterSize (Integer) Size of Gaussian kernel. —
WeightFactor (Integer, Optional) Weight factor for Gaussian (0 for default). 0
MaskImage (Bitmap, Optional) Optional mask to constrain blur. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Blurred image, or Nothing if processing fails.

Example:

blurred = imgproc.GaussianFilter(bitmap, 3, 0)

ImgProc.Generate_Canvas(nWidth, nHeight, BackColor)

Description: Creates blank canvas with specified dimensions and background color.

Syntax: result = ImgProc.Generate_Canvas(nWidth, nHeight, BackColor)

Parameter Description Default
nWidth (Integer) Canvas width in pixels. —
nHeight (Integer) Canvas height in pixels. —
BackColor (Color) Background color for canvas. —

Return Value: Bitmap

Return Description: Blank canvas image, or Nothing if creation fails.

Example:

canvas = imgproc.Generate_Canvas(640, 480, Color.White)

ImgProc.HoughTransform_For_Circle(SourceImage, Radius, AngleCount, IsAbsoluteNormalization, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Detects circles in image using Hough transform.

Syntax: result = ImgProc.HoughTransform_For_Circle(SourceImage, Radius, AngleCount, IsAbsoluteNormalization, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image for circle detection.
Type: Bitmap; required; passed by reference.
—
Radius (Single) Circle radius to detect. —
AngleCount (Integer) Number of angles to check. —
IsAbsoluteNormalization (Boolean) Whether to use absolute normalization. —
MaskImage (Bitmap, Optional) Optional mask to constrain detection. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Image with detected circles, or Nothing if detection fails.

Example:

circles = imgproc.HoughTransform_For_Circle(bitmap, 50.0, 360, True)

ImgProc.HoughTransform_For_Line(SourceImage, UserMaxCount, IsAbsoluteNormalization, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Detects lines in image using Hough transform.

Syntax: result = ImgProc.HoughTransform_For_Line(SourceImage, UserMaxCount, IsAbsoluteNormalization, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image for line detection.
Type: Bitmap; required; passed by reference.
—
UserMaxCount (Integer) Maximum line count to detect. —
IsAbsoluteNormalization (Boolean) Whether to use absolute normalization. —
MaskImage (Bitmap, Optional) Optional mask to constrain detection. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Image with detected lines, or Nothing if detection fails.

Example:

lines = imgproc.HoughTransform_For_Line(bitmap, 10, True)

ImgProc.Image_FromFile(FileName)

Description: Loads image from file path.

Syntax: result = ImgProc.Image_FromFile(FileName)

Parameter Description Default
FileName (String) Path to image file. —

Return Value: Bitmap

Return Description: Loaded image as Bitmap, or Nothing if loading fails.

Example:

bitmap = imgproc.Image_FromFile("C:\\Images\\photo.jpg")

ImgProc.ImageStamp(SourceImage, StampImage, destRectX, destRectY, destRectWidth, destRectHeight, angle, opacityPercent, enableTransparentColor, transparentColorArgb, enableFeather, featherRadius, enableGradualAlpha, tolerance)

Description: Stamps overlay image on source with transformation.

Syntax: result = ImgProc.ImageStamp(SourceImage, StampImage, destRectX, destRectY, destRectWidth, destRectHeight, angle, opacityPercent, enableTransparentColor, transparentColorArgb, enableFeather, featherRadius, enableGradualAlpha, tolerance)

Parameter Description Default
SourceImage (Bitmap) Source image to stamp on. —
StampImage (Bitmap) Stamp image to overlay. —
destRectX (Single) Destination rectangle X. —
destRectY (Single) Destination rectangle Y. —
destRectWidth (Single) Destination rectangle width. —
destRectHeight (Single) Destination rectangle height. —
angle (Single, Optional) Rotation angle in degrees. 0.0F
opacityPercent (Integer, Optional) Opacity percentage (0-100). 100
enableTransparentColor (Boolean, Optional) Whether to enable transparent color. False
transparentColorArgb (Integer, Optional) ARGB color value for transparency. -1
enableFeather (Boolean, Optional) Whether to enable edge feathering. False
featherRadius (Integer, Optional) Feather radius in pixels. 10
enableGradualAlpha (Boolean, Optional) Whether to enable gradual alpha. False
tolerance (Integer, Optional) Color tolerance threshold. 30

Return Value: Bitmap

Return Description: Stamped image, or Nothing if stamping fails.

Example:

stamped = imgproc.ImageStamp(bitmap, stampBitmap, 10, 10, 100, 100, 0, 100)

ImgProc.Invert(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Inverts image colors (photographic negative).

Syntax: result = ImgProc.Invert(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to invert. —
MaskImage (Bitmap, Optional) Optional mask to constrain inversion. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Inverted image, or Nothing if inversion fails.

Example:

inverted = imgproc.Invert(bitmap)

ImgProc.ManualBinarization(SourceImage, ThresholdValue, SkipGrayScaling, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Converts image to binary using manual threshold value.

Syntax: result = ImgProc.ManualBinarization(SourceImage, ThresholdValue, SkipGrayScaling, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to binarize. —
ThresholdValue (Integer) Threshold value for binarization (0-255). —
SkipGrayScaling (Boolean, Optional) Whether to skip grayscale conversion. False
IsShowProgress (Boolean, Optional) Whether to display progress. True
MaskImage (Bitmap, Optional) Optional mask to constrain binarization. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Binary image, or Nothing if binarization fails.

Example:

binary = imgproc.ManualBinarization(bitmap, 128)

ImgProc.MosaicFilter(SourceImage, isPixelMode, value, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Applies mosaic or pixelation effect to blur regions.

Syntax: result = ImgProc.MosaicFilter(SourceImage, isPixelMode, value, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to process. —
isPixelMode (Boolean) Whether to use pixel mode. —
value (Integer) Mosaic block size or pixel value. —
MaskImage (Bitmap, Optional) Optional mask to constrain effect. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Mosaiced image, or Nothing if processing fails.

Example:

mosaiced = imgproc.MosaicFilter(bitmap, True, 10)

ImgProc.MultibandColor(original, rSat, rInt, ySat, yInt, gSat, gInt, cSat, cyanInt, bSat, bInt, mSat, mInt, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Applies multiband color processing adjusting saturation and intensity by color band.

Syntax: result = ImgProc.MultibandColor(original, rSat, rInt, ySat, yInt, gSat, gInt, cSat, cyanInt, bSat, bInt, mSat, mInt, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
original (Bitmap) Source image to process. —
rSat (Integer) Red saturation adjustment (-100 to 100). —
rInt (Integer) Red intensity adjustment (-100 to 100). —
ySat (Integer) Yellow saturation adjustment (-100 to 100). —
yInt (Integer) Yellow intensity adjustment (-100 to 100). —
gSat (Integer) Green saturation adjustment (-100 to 100). —
gInt (Integer) Green intensity adjustment (-100 to 100). —
cSat (Integer) Cyan saturation adjustment (-100 to 100). —
cyanInt (Integer) Cyan intensity adjustment (-100 to 100). —
bSat (Integer) Blue saturation adjustment (-100 to 100). —
bInt (Integer) Blue intensity adjustment (-100 to 100). —
mSat (Integer) Magenta saturation adjustment (-100 to 100). —
mInt (Integer) Magenta intensity adjustment (-100 to 100). —
MaskImage (Image, Optional) Optional mask to constrain processing. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Color-adjusted image, or Nothing if processing fails.

Example:

mbcolor = imgproc.MultibandColor(bitmap, 10, 5, -5, 10, 0, 0, 5, 0, -10, 5, 0, 0)

ImgProc.Outline(SourceImage, InvertBinarization, ApplyBinarization, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Applies edge detection (outline) filter to extract object boundaries while always preserving the original pixel colors on the extracted outlines.

Syntax: result = ImgProc.Outline(SourceImage, InvertBinarization, ApplyBinarization, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image for edge detection. —
InvertBinarization (Boolean, Optional) Whether to invert the binarization or background result (e.g., dark objects on a light background). False
ApplyBinarization (Boolean, Optional) Whether to apply threshold-based pre-binarization for boundary detection. Set to False to skip binarization and extract boundaries directly from all non-zero color regions (e.g., after Region Coloring) without brightness threshold loss. Original outline colors are preserved in both modes. True
IsShowProgress (Boolean, Optional) Whether to display progress. False
MaskImage (Bitmap, Optional) Optional mask to constrain edge detection. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Edge-detected image with original pixel colors preserved on the outlines, or Nothing if processing fails.

Example:

edges = imgproc.Outline(bitmap, False, False, False)

ImgProc.Overlay_Mask3DByte_To_Image(SourceImage, SourceMaskImage3DByte, TransparentColor, Opacity, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Overlays 3D byte mask to image with transparency.

Syntax: result = ImgProc.Overlay_Mask3DByte_To_Image(SourceImage, SourceMaskImage3DByte, TransparentColor, Opacity, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to overlay.
Type: Bitmap; required; passed by reference.
—
SourceMaskImage3DByte (Byte(,,)) 3D byte array mask [height, width, channels].
Type: Byte(,,); required; passed by reference.
—
TransparentColor (Integer) Color to treat as transparent. —
Opacity (Single) Opacity level (0.0-1.0). —
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Overlaid image, or Nothing if overlay fails.

Example:

overlaid = imgproc.Overlay_Mask3DByte_To_Image(bitmap, maskArray, RGB(255,255,255), 0.5)

ImgProc.Overlay_MaskImage2DArray_To_Image3DArray(SourceImage2DArray(,,), MaskImage2DArray, MaskRed, MaskGreen, MaskBlue, x1, y1, TransparentColor)

Description: Overlays 2D mask array on 3D image array.

Syntax: ImgProc.Overlay_MaskImage2DArray_To_Image3DArray(SourceImage2DArray(,,), MaskImage2DArray, MaskRed, MaskGreen, MaskBlue, x1, y1, TransparentColor)

Parameter Description Default
SourceImage2DArray(,,) (Byte) —
MaskImage2DArray (Byte(,)) 2D byte array mask [height, width].
Type: Byte(,); required; passed by reference.
—
MaskRed (Byte) Red channel value for mask. —
MaskGreen (Byte) Green channel value for mask. —
MaskBlue (Byte) Blue channel value for mask. —
x1 (Integer) Start X coordinate. —
y1 (Integer) Start Y coordinate. —
TransparentColor (Byte) Transparent color value. —

Return Value: Void

Return Description: None.

Example:

imgproc.Overlay_MaskImage2DArray_To_Image3DArray(imageArray, maskArray, 255, 0, 0, 0, 0, 255)

ImgProc.Overlay_MaskImage_To_Image(SourceImage, SourceMaskImage, TransparentColor, Opacity)

Description: Overlays mask bitmap to image with transparency.

Syntax: result = ImgProc.Overlay_MaskImage_To_Image(SourceImage, SourceMaskImage, TransparentColor, Opacity)

Parameter Description Default
SourceImage (Bitmap) Source image to overlay.
Type: Bitmap; required; passed by reference.
—
SourceMaskImage (Bitmap) Mask image to overlay.
Type: Bitmap; required; passed by reference.
—
TransparentColor (Integer) Color to treat as transparent. —
Opacity (Single) Opacity level (0.0-1.0). —

Return Value: Bitmap

Return Description: Overlaid image, or Nothing if overlay fails.

Example:

overlaid = imgproc.Overlay_MaskImage_To_Image(bitmap, maskBitmap, RGB(255,255,255), 0.5)

ImgProc.OverlayImage(SourceImage, overlayImg, transR, transG, transB, opacity, isFeather, featherRadius, tolerance, isGradual, MaskImage, IsMaskAllRegionSelected)

Description: Overlays another image with transparency and feathering.

Syntax: result = ImgProc.OverlayImage(SourceImage, overlayImg, transR, transG, transB, opacity, isFeather, featherRadius, tolerance, isGradual, MaskImage, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image for overlay. —
overlayImg (Bitmap) Image to overlay on source. —
transR (Integer, Optional) Transparent red component (0-255). 255
transG (Integer, Optional) Transparent green component (0-255). 255
transB (Integer, Optional) Transparent blue component (0-255). 255
opacity (Single, Optional) Opacity factor (0.0-1.0). 1.0F
isFeather (Boolean, Optional) Whether to apply edge feathering. False
featherRadius (Integer, Optional) Feather radius in pixels. 10
tolerance (Integer, Optional) Color tolerance threshold (0-255). 0
isGradual (Boolean, Optional) Whether to apply gradual blending. False
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Overlaid image, or Nothing if operation fails.

Example:

overlaid = imgproc.OverlayImage(bitmap, overlayBitmap, 255, 255, 255, 1.0, False, 10)

ImgProc.OverlayMask_Parallel(sourceImage, maskImage, overlayColor, alpha)

Description: Overlays mask with color and alpha transparency.

Syntax: result = ImgProc.OverlayMask_Parallel(sourceImage, maskImage, overlayColor, alpha)

Parameter Description Default
sourceImage (Bitmap) Source image to overlay. —
maskImage (Bitmap) Mask image. —
overlayColor (Color) Color for overlay. —
alpha (Integer) Alpha transparency value. —

Return Value: Bitmap

Return Description: Overlaid image, or Nothing if overlay fails.

Example:

overlaid = imgproc.OverlayMask_Parallel(bitmap, maskBitmap, Color.Red, 128)

ImgProc.PasteAndFitToRectangle(BaseImage, OverlayImage, TargetRect)

Description: Pastes and fits overlay image into target rectangle.

Syntax: result = ImgProc.PasteAndFitToRectangle(BaseImage, OverlayImage, TargetRect)

Parameter Description Default
BaseImage (Bitmap) Base image to paste on. —
OverlayImage (Bitmap) Overlay image to paste. —
TargetRect (Rectangle) Target rectangle for pasting. —

Return Value: Bitmap

Return Description: Pasted and fitted image, or Nothing if operation fails.

Example:

pasted = imgproc.PasteAndFitToRectangle(baseImage, overlayImage, New Rectangle(10, 10, 100, 100))

ImgProc.Remap(SourceImage, mapX, mapY, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Remaps image using coordinate maps.

Syntax: result = ImgProc.Remap(SourceImage, mapX, mapY, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to remap. —
mapX (Single(,)) X coordinate map. —
mapY (Single(,)) Y coordinate map. —
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Remapped image, or Nothing if remapping fails.

Example:

remapped = imgproc.Remap(bitmap, xMap, yMap)

ImgProc.RemoveBackground(SourceImage, MatteImage, MaskRegionBoundary, IsMaskAllRegionSelected, BgColor, NewBackgroundImage)

Description: Removes background using matte with optional replacement.

Syntax: result = ImgProc.RemoveBackground(SourceImage, MatteImage, MaskRegionBoundary, IsMaskAllRegionSelected, BgColor, NewBackgroundImage)

Parameter Description Default
SourceImage (Bitmap) Source image to process. —
MatteImage (Bitmap) Matte/alpha mask image. —
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True
BgColor (Color, Optional) Background color replacement. Nothing
NewBackgroundImage (Bitmap, Optional) New background image to composite. Nothing

Return Value: Bitmap

Return Description: Image with background removed, or Nothing if operation fails.

Example:

noBackground = imgproc.RemoveBackground(bitmap, matteBitmap)

ImgProc.Resize(SourceImage, nWidth, nHeight, InterpolationMode)

Description: Resizes image to specified width and height.

Syntax: result = ImgProc.Resize(SourceImage, nWidth, nHeight, InterpolationMode)

Parameter Description Default
SourceImage (Bitmap) Source image to resize. —
nWidth (Integer) Target width in pixels. —
nHeight (Integer) Target height in pixels. —
InterpolationMode (Drawing2D.InterpolationMode, Optional) Enum representing the interpolation method.
Type: Drawing2D.InterpolationMode; optional; default: HighQualityBicubic.

Supported InterpolationMode values:
0: Default
1: Low
2: High
3: Bilinear
4: Bicubic
5: NearestNeighbor
6: HighQualityBilinear
7: HighQualityBicubic

Drawing2D.InterpolationMode.HighQualityBicubic

Return Value: Bitmap

Return Description: Resized image, or Nothing if resizing fails.

Example:

resized = imgproc.Resize(bitmap, 640, 480)

ImgProc.Resize_Canvas(SourceImage, nWidth, nHeight, StretchDirection, BackColor)

Description: Resizes canvas and places the image within new dimensions.

Syntax: result = ImgProc.Resize_Canvas(SourceImage, nWidth, nHeight, StretchDirection, BackColor)

Parameter Description Default
SourceImage (Bitmap) Source image to resize. —
nWidth (Integer) New canvas width. —
nHeight (Integer) New canvas height. —
StretchDirection (String) Image placement on the resized canvas.
Supported values:
"LeftTop": Place image at the top-left corner
"RightTop": Place image at the top-right corner
"LeftBottom": Place image at the bottom-left corner
"RightBottom": Place image at the bottom-right corner
Any other value (e.g., "Center"): Place image at the center
—
BackColor (Color) Background fill color. —

Return Value: Bitmap

Return Description: Resized canvas image, or Nothing if resizing fails.

Example:

resized = imgproc.Resize_Canvas(bitmap, 640, 480, "Center", Color.White)

ImgProc.ResizeByZoomFactor(SourceImage, ZoomFactor, InterpolationMode)

Description: Resizes image by specified zoom factor (e.g., 0.5 for 50%, 2.0 for 200%).

Syntax: result = ImgProc.ResizeByZoomFactor(SourceImage, ZoomFactor, InterpolationMode)

Parameter Description Default
SourceImage (Bitmap) Source image to resize. —
ZoomFactor (Single) Zoom factor multiplier. —
InterpolationMode (Drawing2D.InterpolationMode, Optional) Enum representing the interpolation method.
Type: Drawing2D.InterpolationMode; optional; default: HighQualityBicubic.

Supported InterpolationMode values:
0: Default
1: Low
2: High
3: Bilinear
4: Bicubic
5: NearestNeighbor
6: HighQualityBilinear
7: HighQualityBicubic

Drawing2D.InterpolationMode.HighQualityBicubic

Return Value: Bitmap

Return Description: Resized image, or Nothing if resizing fails.

Example:

resized = imgproc.ResizeByZoomFactor(bitmap, 0.5)

ImgProc.RollingBoxBackgroundSubtraction(SourceImage, Radius, IsAutomatic, IsObjectWhite, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Removes background using rolling box filter.

Syntax: result = ImgProc.RollingBoxBackgroundSubtraction(SourceImage, Radius, IsAutomatic, IsObjectWhite, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to process. —
Radius (Integer) Rolling box radius. —
IsAutomatic (Boolean, Optional) Whether to use automatic mode. False
IsObjectWhite (Boolean, Optional) Whether object is white or black. True
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Background-subtracted image, or Nothing if operation fails.

Example:

subtracted = imgproc.RollingBoxBackgroundSubtraction(bitmap, 50)

ImgProc.Rotate(SourceImage, CenterX, CenterY, AngleDegree, BackgroundColor)

Description: Rotates image around specified center point by angle in degrees.

Syntax: result = ImgProc.Rotate(SourceImage, CenterX, CenterY, AngleDegree, BackgroundColor)

Parameter Description Default
SourceImage (Bitmap) Source image to rotate. —
CenterX (Integer) X coordinate of rotation center. —
CenterY (Integer) Y coordinate of rotation center. —
AngleDegree (Single) Rotation angle in degrees. —
BackgroundColor (Color) Fill color for empty areas after rotation. —

Return Value: Bitmap

Return Description: Rotated image, or Nothing if rotation fails.

Example:

rotated = imgproc.Rotate(bitmap, 320, 240, 45.0, Color.White)

ImgProc.RotateAtCenter(SourceImage, AngleDegree)

Description: Rotates image around its center by specified angle in degrees.

Syntax: result = ImgProc.RotateAtCenter(SourceImage, AngleDegree)

Parameter Description Default
SourceImage (Bitmap) Source image to rotate. —
AngleDegree (Single) Rotation angle in degrees. —

Return Value: Bitmap

Return Description: Rotated image, or Nothing if rotation fails.

Example:

rotated = imgproc.RotateAtCenter(bitmap, 45.0)

ImgProc.RotateFlip(SourceImage, RotateFlipOption)

Description: Applies rotation and flip transformation to image.

Syntax: result = ImgProc.RotateFlip(SourceImage, RotateFlipOption)

Parameter Description Default
SourceImage (Bitmap) Source image to transform. —
RotateFlipOption (RotateFlipType) Type of rotation and flip operation.
Supported values:
0: RotateNoneFlipNone – No rotation, no flip
1: Rotate90FlipNone – Rotate 90 degrees clockwise
2: Rotate180FlipNone – Rotate 180 degrees
3: Rotate270FlipNone – Rotate 270 degrees clockwise
4: RotateNoneFlipX – Flip horizontally
5: Rotate90FlipX – Rotate 90 degrees, then flip horizontally
6: Rotate180FlipX – Rotate 180 degrees, then flip horizontally (same as flip vertically)
7: Rotate270FlipX – Rotate 270 degrees, then flip horizontally
—

Return Value: Bitmap

Return Description: Transformed image, or Nothing if transformation fails.

Example:

transformed = imgproc.RotateFlip(bitmap, RotateFlipType.Rotate90FlipNone)

ImgProc.ShadowsHighlights(SourceImage, ShadowAmount, HighlightAmount, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Adjusts shadows and highlights separately.

Syntax: result = ImgProc.ShadowsHighlights(SourceImage, ShadowAmount, HighlightAmount, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to adjust. —
ShadowAmount (Single, Optional) Shadow adjustment amount. 50.0F
HighlightAmount (Single, Optional) Highlight adjustment amount. 0.0F
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Adjusted image, or Nothing if adjustment fails.

Example:

adjusted = imgproc.ShadowsHighlights(bitmap, 50.0, 0.0)

ImgProc.Sharpen_3x3(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Sharpens image using basic 3×3 kernel.

Syntax: result = ImgProc.Sharpen_3x3(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to sharpen. —
MaskImage (Bitmap, Optional) Optional mask to constrain sharpening. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Sharpened image, or Nothing if processing fails.

Example:

sharpened = imgproc.Sharpen_3x3(bitmap)

ImgProc.Sharpen_3x3_Improved(SourceImage, Strength, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Sharpens image using improved 3×3 kernel with adjustable strength.

Syntax: result = ImgProc.Sharpen_3x3_Improved(SourceImage, Strength, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to sharpen. —
Strength (Single, Optional) Sharpening strength factor. 1.0F
MaskImage (Bitmap, Optional) Optional mask to constrain sharpening. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Sharpened image, or Nothing if processing fails.

Example:

sharpened = imgproc.Sharpen_3x3_Improved(bitmap, 1.5)

ImgProc.Sharpen_5x5_HighQuality_Fixed(SourceImage, Strength, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Sharpens image using high-quality 5×5 kernel.

Syntax: result = ImgProc.Sharpen_5x5_HighQuality_Fixed(SourceImage, Strength, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to sharpen. —
Strength (Single, Optional) Sharpening strength factor. 1.0F
MaskImage (Bitmap, Optional) Optional mask to constrain sharpening. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: High-quality sharpened image, or Nothing if processing fails.

Example:

sharpened = imgproc.Sharpen_5x5_HighQuality_Fixed(bitmap, 1.2)

ImgProc.Sharpen_UnsharpMask(SourceImage, FilterSize, AmountPercent, Threshold, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Sharpens image using unsharp mask technique.

Syntax: result = ImgProc.Sharpen_UnsharpMask(SourceImage, FilterSize, AmountPercent, Threshold, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to sharpen. —
FilterSize (Integer, Optional) Filter kernel size. 11
AmountPercent (Integer, Optional) Sharpening amount percentage. 100
Threshold (Integer, Optional) Edge detection threshold. 0
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Sharpened image, or Nothing if sharpening fails.

Example:

sharpened = imgproc.Sharpen_UnsharpMask(bitmap, 11, 100, 0)

ImgProc.SmartDenoise(SourceImage, Radius, Threshold, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Applies smart noise reduction preserving edges.

Syntax: result = ImgProc.SmartDenoise(SourceImage, Radius, Threshold, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to denoise. —
Radius (Integer, Optional) Filter radius. 5
Threshold (Integer, Optional) Edge preservation threshold. 30
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Denoised image, or Nothing if denoising fails.

Example:

denoised = imgproc.SmartDenoise(bitmap, 5, 30)

ImgProc.StackBlur(SourceImage, BoxSizeHalf, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Applies high-speed stack blur filter.

Syntax: result = ImgProc.StackBlur(SourceImage, BoxSizeHalf, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to blur. —
BoxSizeHalf (Integer) Blur radius (half-size). —
MaskImage (Bitmap, Optional) Optional mask to constrain blur. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Blurred image, or Nothing if processing fails.

Example:

blurred = imgproc.StackBlur(bitmap, 5)

ImgProc.StandardFilter(SourceImage, FilterMask(,), WeightFactor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Applies custom convolution filter mask to image.

Syntax: result = ImgProc.StandardFilter(SourceImage, FilterMask(,), WeightFactor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to filter. —
FilterMask(,) (Single) —
WeightFactor (Integer, Optional) Weight factor for filter (0 for default). 0
MaskImage (Bitmap, Optional) Optional mask to constrain filtering. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Filtered image, or Nothing if processing fails.

Example:

filtered = imgproc.StandardFilter(bitmap, {{0,1,0},{1,-4,1},{0,1,0}})

ImgProc.TextAnnotation(SourceImage, x, y, textString, fontName, fontSize, fontStyleInt, innerColorArgb, outerColorArgb, opacityPercent, outlineThickness, angle, isAntiAlias)

Description: Annotates image with text and outline style.

Syntax: result = ImgProc.TextAnnotation(SourceImage, x, y, textString, fontName, fontSize, fontStyleInt, innerColorArgb, outerColorArgb, opacityPercent, outlineThickness, angle, isAntiAlias)

Parameter Description Default
SourceImage (Bitmap) Source image to annotate. —
x (Single) Text X position. —
y (Single) Text Y position. —
textString (String) Text content to draw. —
fontName (String, Optional) Font name. "Microsoft Sans Serif"
fontSize (Single, Optional) Font size in points. 70.0F
fontStyleInt (Integer, Optional) Integer representing the font style.
Supported fontStyleInt values:
0: Regular
1: Bold
2: Italic
3: Bold Italic
4: Underline
8: Strikeout
0
innerColorArgb (Integer, Optional) Inner text color ARGB. -1
outerColorArgb (Integer, Optional) Outline color ARGB. -16777216
opacityPercent (Integer, Optional) Opacity percentage (0-100). 100
outlineThickness (Single, Optional) Outline thickness in pixels. 10.0F
angle (Single, Optional) Text rotation angle in degrees. 0.0F
isAntiAlias (Boolean, Optional) Whether to use anti-aliasing. True

Return Value: Bitmap

Return Description: Annotated image, or Nothing if annotation fails.

Example:

annotated = imgproc.TextAnnotation(bitmap, 10, 10, "Hello", "Arial", 70, 0, -1, -16777216)

Processing & Morphological Actions (21 functions)
ImgProc.BinaryOperation_AND(SourceGrayImage1, SourceGrayImage2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Performs binary AND operation on two grayscale images.

Syntax: result = ImgProc.BinaryOperation_AND(SourceGrayImage1, SourceGrayImage2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceGrayImage1 (Bitmap) First grayscale image.
Type: Bitmap; required; passed by reference.
—
SourceGrayImage2 (Bitmap) Second grayscale image.
Type: Bitmap; required; passed by reference.
—
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Result of AND operation, or Nothing if operation fails.

Example:

andResult = imgproc.BinaryOperation_AND(grayBitmap1, grayBitmap2)

ImgProc.BinaryOperation_OR(SourceGrayImage1, SourceGrayImage2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Performs binary OR operation on two grayscale images.

Syntax: result = ImgProc.BinaryOperation_OR(SourceGrayImage1, SourceGrayImage2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceGrayImage1 (Bitmap) First grayscale image.
Type: Bitmap; required; passed by reference.
—
SourceGrayImage2 (Bitmap) Second grayscale image.
Type: Bitmap; required; passed by reference.
—
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Result of OR operation, or Nothing if operation fails.

Example:

orResult = imgproc.BinaryOperation_OR(grayBitmap1, grayBitmap2)

ImgProc.BinaryOperation_XOR(SourceGrayImage1, SourceGrayImage2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Performs binary XOR operation on two grayscale images.

Syntax: result = ImgProc.BinaryOperation_XOR(SourceGrayImage1, SourceGrayImage2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceGrayImage1 (Bitmap) First grayscale image.
Type: Bitmap; required; passed by reference.
—
SourceGrayImage2 (Bitmap) Second grayscale image.
Type: Bitmap; required; passed by reference.
—
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Result of XOR operation, or Nothing if operation fails.

Example:

xorResult = imgproc.BinaryOperation_XOR(grayBitmap1, grayBitmap2)

ImgProc.BWLeveling_Using_FloodFillWithTolerance(SourceGrayImage, IsConductBlurring, IsFindThresholdValue, DefaultThresholdValue, Return_OptimalThresholdValue)

Description: Applies black-white leveling with optional auto thresholding.

Syntax: result = ImgProc.BWLeveling_Using_FloodFillWithTolerance(SourceGrayImage, IsConductBlurring, IsFindThresholdValue, DefaultThresholdValue, Return_OptimalThresholdValue)

Parameter Description Default
SourceGrayImage (Bitmap) Source grayscale image. —
IsConductBlurring (Boolean) Whether to conduct blurring. —
IsFindThresholdValue (Boolean) Whether to auto-find threshold. —
DefaultThresholdValue (Integer) Default threshold value if not auto-finding. —
Return_OptimalThresholdValue (Integer) Output optimal threshold value.
Type: Integer; required; passed by reference.
—

Return Value: Bitmap

Return Description: Leveled black-white image, or Nothing if leveling fails.

Example:

bwImage = imgproc.BWLeveling_Using_FloodFillWithTolerance(grayBitmap, True, True, 128, optThreshold)

ImgProc.BWLeveling_Using_FloodFillWithTolerance_Core(SourceGrayImage, ExcludeGrayRange_Min, ExcludeGrayRange_Max)

Description: Applies black-white leveling excluding specified gray range.

Syntax: result = ImgProc.BWLeveling_Using_FloodFillWithTolerance_Core(SourceGrayImage, ExcludeGrayRange_Min, ExcludeGrayRange_Max)

Parameter Description Default
SourceGrayImage (Bitmap) Source grayscale image. —
ExcludeGrayRange_Min (Integer) Minimum gray value to exclude. —
ExcludeGrayRange_Max (Integer) Maximum gray value to exclude. —

Return Value: Bitmap

Return Description: Leveled black-white image, or Nothing if leveling fails.

Example:

bwImage = imgproc.BWLeveling_Using_FloodFillWithTolerance_Core(grayBitmap, 100, 150)

ImgProc.Check_If_CloseShape(Src_BitMap(,), FalseTolerance)

Description: Checks if shape is closed (no gaps).

Syntax: result = ImgProc.Check_If_CloseShape(Src_BitMap(,), FalseTolerance)

Parameter Description Default
Src_BitMap(,) (Boolean) —
FalseTolerance (Integer, Optional) Tolerance for false detection. 2

Return Value: Boolean

Return Description: True if shape is closed, False otherwise.

Example:

isClosed = imgproc.Check_If_CloseShape(boolMap, 2)

ImgProc.Dilate(SourceImage, BoxSizeHalf, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Applies dilation morphological operation to expand bright regions.

Syntax: result = ImgProc.Dilate(SourceImage, BoxSizeHalf, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to dilate. —
BoxSizeHalf (Integer) Half-size of dilation kernel. —
MaskImage (Bitmap, Optional) Optional mask to constrain dilation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Dilated image, or Nothing if processing fails.

Example:

dilated = imgproc.Dilate(bitmap, 1)

ImgProc.Erode(SourceImage, BoxSizeHalf, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Applies erosion morphological operation to reduce bright regions.

Syntax: result = ImgProc.Erode(SourceImage, BoxSizeHalf, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to erode. —
BoxSizeHalf (Integer) Half-size of erosion kernel. —
MaskImage (Bitmap, Optional) Optional mask to constrain erosion. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Eroded image, or Nothing if processing fails.

Example:

eroded = imgproc.Erode(bitmap, 1)

ImgProc.Find_OptimalThreshold_For_BWLeveling_Using_FloodFillWithTolerance(SourceGrayImage, Return_BWGrayImage)

Description: Finds optimal threshold for black-white leveling using flood fill.

Syntax: result = ImgProc.Find_OptimalThreshold_For_BWLeveling_Using_FloodFillWithTolerance(SourceGrayImage, Return_BWGrayImage)

Parameter Description Default
SourceGrayImage (Bitmap) Source grayscale image. —
Return_BWGrayImage (Bitmap) Output binary image.
Type: Bitmap; required; passed by reference.
—

Return Value: Integer

Return Description: Optimal threshold value, or 0 if finding fails.

Example:

threshold = imgproc.Find_OptimalThreshold_For_BWLeveling_Using_FloodFillWithTolerance(grayBitmap, bwImage)

ImgProc.RegionColoring(SourceImage, Is8Connected, ApplyBinarization, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Applies region coloring (blob coloring) to the image using a high-speed parallel algorithm.

Syntax: result = ImgProc.RegionColoring(SourceImage, Is8Connected, ApplyBinarization, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to color regions. —
Is8Connected (Boolean) Whether to use 8-connectivity. —
ApplyBinarization (Boolean, Optional) Whether to apply binarization. False
IsShowProgress (Boolean, Optional) Whether to show processing progress. True
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Image with colored regions, or Nothing if operation fails.

Example:

colored = imgproc.RegionColoring(bitmap, True, False)

ImgProc.RegionExtract_ColorFloodFill4(SourceImage, LabelIDMap, RegionColorTable, BoundaryColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Extracts color-based connected regions using 4-connectivity flood fill.

Syntax: result = ImgProc.RegionExtract_ColorFloodFill4(SourceImage, LabelIDMap, RegionColorTable, BoundaryColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image for region extraction. —
LabelIDMap (Integer(,)) Output 2D array of region labels. —
RegionColorTable (Byte(,)) Output table of region colors. —
BoundaryColor (Integer, Optional) Boundary color integer. 16776960
MaskImage (Bitmap, Optional) Optional mask to constrain extraction. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Image with color-labeled regions, or Nothing if extraction fails.

Example:

colorRegions = imgproc.RegionExtract_ColorFloodFill4(bitmap, labels, colors)

ImgProc.RegionExtract_ColorFloodFill8(SourceImage, LabelIDMap, RegionColorTable, BoundaryColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Extracts color-based connected regions using 8-connectivity flood fill.

Syntax: result = ImgProc.RegionExtract_ColorFloodFill8(SourceImage, LabelIDMap, RegionColorTable, BoundaryColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image for region extraction. —
LabelIDMap (Integer(,)) Output 2D array of region labels. —
RegionColorTable (Byte(,)) Output table of region colors. —
BoundaryColor (Integer, Optional) Boundary color integer. 16776960
MaskImage (Bitmap, Optional) Optional mask to constrain extraction. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Image with color-labeled regions, or Nothing if extraction fails.

Example:

colorRegions = imgproc.RegionExtract_ColorFloodFill8(bitmap, labels, colors)

ImgProc.RegionExtract_FloodFill4(SourceImage, LabelIDMap, RegionColorTable, BkColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Extracts connected regions using 4-connectivity flood fill with label mapping.

Syntax: result = ImgProc.RegionExtract_FloodFill4(SourceImage, LabelIDMap, RegionColorTable, BkColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image for region extraction. —
LabelIDMap (Integer(,)) Output 2D array of region labels. —
RegionColorTable (Byte(,)) Output table of region colors. —
BkColor (Integer, Optional) Background color to identify. 0
MaskImage (Bitmap, Optional) Optional mask to constrain extraction. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Image with labeled regions, or Nothing if extraction fails.

Example:

regionMap = imgproc.RegionExtract_FloodFill4(bitmap, labels, colors)

ImgProc.RegionExtract_FloodFill8(SourceImage, LabelIDMap, RegionColorTable, BkColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Extracts connected regions using 8-connectivity flood fill with label mapping.

Syntax: result = ImgProc.RegionExtract_FloodFill8(SourceImage, LabelIDMap, RegionColorTable, BkColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image for region extraction. —
LabelIDMap (Integer(,)) Output 2D array of region labels. —
RegionColorTable (Byte(,)) Output table of region colors. —
BkColor (Integer, Optional) Background color to identify. 0
MaskImage (Bitmap, Optional) Optional mask to constrain extraction. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Image with labeled regions, or Nothing if extraction fails.

Example:

regionMap = imgproc.RegionExtract_FloodFill8(bitmap, labels, colors)

ImgProc.RegionExtract_RasterScanning(SourceImage, LabelIDMap, RegionColorTable, BkColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Extracts regions using raster scanning algorithm with optional mask support.

Syntax: result = ImgProc.RegionExtract_RasterScanning(SourceImage, LabelIDMap, RegionColorTable, BkColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image for region extraction. —
LabelIDMap (Integer(,)) Output 2D array of region labels. —
RegionColorTable (Byte(,)) Output table of region colors. —
BkColor (Integer, Optional) Background color to identify. 0
MaskImage (Bitmap, Optional) Optional mask to constrain extraction. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Image with labeled regions, or Nothing if extraction fails.

Example:

regions = imgproc.RegionExtract_RasterScanning(bitmap, labels, colors)

ImgProc.RegionExtract_RasterScanning_NoMaskImage(SourceImage, LabelIDMap, RegionColorTable, BkColor)

Description: Extracts regions using raster scanning algorithm without mask image.

Syntax: result = ImgProc.RegionExtract_RasterScanning_NoMaskImage(SourceImage, LabelIDMap, RegionColorTable, BkColor)

Parameter Description Default
SourceImage (Bitmap) Source image for region extraction. —
LabelIDMap (Integer(,)) Output 2D array of region labels. —
RegionColorTable (Byte(,)) Output table of region colors. —
BkColor (Integer, Optional) Background color to identify. 0

Return Value: Bitmap

Return Description: Image with labeled regions, or Nothing if extraction fails.

Example:

regions = imgproc.RegionExtract_RasterScanning_NoMaskImage(bitmap, labels, colors)

ImgProc.RemoveDots(SourceImage, DotMode, Is8Connected, MaxDotSize, ApplyBinarization, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Removes small isolated dots or noise from the image using parallel processing.

Syntax: result = ImgProc.RemoveDots(SourceImage, DotMode, Is8Connected, MaxDotSize, ApplyBinarization, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to process. —
DotMode (Integer) Dot removal mode.
Supported values:
0: Remove black dots (filled with white)
1: Remove white dots (filled with black)
2: Remove both black and white dots (filled with the opposite color)
—
Is8Connected (Boolean) Whether to use 8-connectivity. —
MaxDotSize (Integer) Maximum size of dots to remove. —
ApplyBinarization (Boolean, Optional) Whether to apply binarization. True
IsShowProgress (Boolean, Optional) Whether to show processing progress. True
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Processed image with dots removed, or Nothing if operation fails.

Example:

cleaned = imgproc.RemoveDots(bitmap, 0, True, 10, True)

ImgProc.Skeletonize(SourceImage, IsExtended, IsInverted, MinBranchLength, TailLength, ApplyBinarization, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Reduces binary objects to 1-pixel wide skeletons using parallel processing.

Syntax: result = ImgProc.Skeletonize(SourceImage, IsExtended, IsInverted, MinBranchLength, TailLength, ApplyBinarization, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to skeletonize. —
IsExtended (Boolean) Whether to use extended skeletonization. —
IsInverted (Boolean) Whether to invert the image before processing. —
MinBranchLength (Integer) Minimum branch length in pixels. —
TailLength (Integer) Tail length for pruning. —
ApplyBinarization (Boolean, Optional) Whether to apply binarization. True
IsShowProgress (Boolean, Optional) Whether to show processing progress. True
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Skeletonized image, or Nothing if operation fails.

Example:

skeleton = imgproc.Skeletonize(bitmap, True, False, 10, 5, True)

ImgProc.SplitObjects_ConvexityDefects(SourceImage, MinDefectDepth, MaxCutLength, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Splits connected objects using convexity defects.

Syntax: result = ImgProc.SplitObjects_ConvexityDefects(SourceImage, MinDefectDepth, MaxCutLength, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image with connected objects. —
MinDefectDepth (Single, Optional) Minimum defect depth threshold. 5.0F
MaxCutLength (Single, Optional) Maximum cut length for splitting. 50.0F
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Image with split objects, or Nothing if splitting fails.

Example:

split = imgproc.SplitObjects_ConvexityDefects(bitmap, 5.0, 50.0)

ImgProc.SuperPixelSegmentation(SourceImage, numSuperpixels, compactness, fillWithWhite, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Segments an image into superpixels using parallel SLIC algorithm.

Syntax: result = ImgProc.SuperPixelSegmentation(SourceImage, numSuperpixels, compactness, fillWithWhite, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to segment. —
numSuperpixels (Integer, Optional) Target number of superpixels. 400
compactness (Single, Optional) Spatial weight for compactness. 70.0F
fillWithWhite (Boolean, Optional) Whether to fill background with white. False
MaskImage (Bitmap, Optional) Optional mask to constrain segmentation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Segmented image with superpixel boundaries, or Nothing if processing fails.

Example:

segmented = imgproc.SuperPixelSegmentation(bitmap, 400, 70.0, False)

ImgProc.WatershedSegmentation(SourceImage, MinDistanceThreshold, SmoothRadius, BoundaryThickness, BoundR, BoundG, BoundB, ReturnOnlyBoundaries, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Segments image using watershed algorithm.

Syntax: result = ImgProc.WatershedSegmentation(SourceImage, MinDistanceThreshold, SmoothRadius, BoundaryThickness, BoundR, BoundG, BoundB, ReturnOnlyBoundaries, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to segment. —
MinDistanceThreshold (Integer, Optional) Minimum distance threshold. 10
SmoothRadius (Integer, Optional) Smoothing radius. 4
BoundaryThickness (Integer, Optional) Boundary line thickness. 1
BoundR (Byte, Optional) Red channel for boundary color. 0
BoundG (Byte, Optional) Green channel for boundary color. 0
BoundB (Byte, Optional) Blue channel for boundary color. 0
ReturnOnlyBoundaries (Boolean, Optional) Whether to return only boundary lines. True
MaskImage (Bitmap, Optional) Optional mask to constrain segmentation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Segmented image, or Nothing if segmentation fails.

Example:

segmented = imgproc.WatershedSegmentation(bitmap, 10, 4, 1)

System & Workspace Actions (26 functions)
ImgProc.CaptureDesktopScreen(PrintCursor)

Description: Captures entire desktop screen to bitmap.

Syntax: result = ImgProc.CaptureDesktopScreen(PrintCursor)

Parameter Description Default
PrintCursor (Boolean, Optional) Whether to render cursor on captured screen. True

Return Value: Bitmap

Return Description: Captured desktop screen image, or Nothing if capture fails.

Example:

screenshot = imgproc.CaptureDesktopScreen()

ImgProc.CaptureDesktopScreenByRegion(PrintCursor, IsAllRegion, X1, Y1, X2, Y2)

Description: Captures specified region of desktop screen.

Syntax: result = ImgProc.CaptureDesktopScreenByRegion(PrintCursor, IsAllRegion, X1, Y1, X2, Y2)

Parameter Description Default
PrintCursor (Boolean) Whether to render cursor on captured region. —
IsAllRegion (Boolean) Whether to capture entire screen region. —
X1 (Integer) Left coordinate of region. —
Y1 (Integer) Top coordinate of region. —
X2 (Integer) Right coordinate of region. —
Y2 (Integer) Bottom coordinate of region. —

Return Value: Bitmap

Return Description: Captured region image, or Nothing if capture fails.

Example:

regionCapture = imgproc.CaptureDesktopScreenByRegion(False, False, 0, 0, 800, 600)

ImgProc.CaptureObject(pHwnd)

Description: Captures window or UI object to bitmap.

Syntax: result = ImgProc.CaptureObject(pHwnd)

Parameter Description Default
pHwnd (IntPtr) Handle to window or UI object. —

Return Value: Bitmap

Return Description: Captured control image, or Nothing if capture fails.

Example:

windowCapture = imgproc.CaptureObject(formHandle)

ImgProc.ChromaKey(TargetCanvas, OverlayImage, ChromaR, ChromaG, ChromaB, Opacity, IsFeather, FeatherRadius, ChromaTolerance, ChromaSoftness, extractTransparent, MaskImage, IsMaskAllRegionSelected)

Description: Applies chroma key (green screen) effect to composite images.

Syntax: result = ImgProc.ChromaKey(TargetCanvas, OverlayImage, ChromaR, ChromaG, ChromaB, Opacity, IsFeather, FeatherRadius, ChromaTolerance, ChromaSoftness, extractTransparent, MaskImage, IsMaskAllRegionSelected)

Parameter Description Default
TargetCanvas (Bitmap) Target canvas background image. —
OverlayImage (Bitmap) Foreground image to composite. —
ChromaR (Byte) Red component of chroma key color (0-255). —
ChromaG (Byte) Green component of chroma key color (0-255). —
ChromaB (Byte) Blue component of chroma key color (0-255). —
Opacity (Single) Opacity factor (0.0-1.0). —
IsFeather (Boolean) Whether to feather edges. —
FeatherRadius (Integer) Feathering radius in pixels. —
ChromaTolerance (Single, Optional) Color matching tolerance range (0.0-100.0). 35.0F
ChromaSoftness (Single, Optional) Edge gradient softness range (0.0-100.0). 20.0F
extractTransparent (Boolean, Optional) Whether to extract transparency. False
MaskImage (Bitmap, Optional) Optional mask to constrain effect. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Composited image with chroma key applied, or Nothing if compositing fails.

Example:

composite = imgproc.ChromaKey(canvas, overlay, 0, 255, 0, 1.0F, True, 5, 35.0F, 20.0F)

ImgProc.CloneImage(SourceImage)

Description: Creates a deep copy of the image.

Syntax: result = ImgProc.CloneImage(SourceImage)

Parameter Description Default
SourceImage (Bitmap) Source image to clone. —

Return Value: Bitmap

Return Description: Independent clone of image, or Nothing if cloning fails.

Example:

clone = imgproc.CloneImage(bitmap)

ImgProc.CopyToClipboardWithTransparency(img)

Description: Copies image to clipboard with transparency.

Syntax: ImgProc.CopyToClipboardWithTransparency(img)

Parameter Description Default
img (Bitmap) Image to copy. —

Return Value: Void

Return Description: None.

Example:

imgproc.CopyToClipboardWithTransparency(bitmap)

ImgProc.Draw_ColorLevelBox(ColorMode, Pic_Target, LevelCount)

Description: Draws color level distribution box in picture control.

Syntax: ImgProc.Draw_ColorLevelBox(ColorMode, Pic_Target, LevelCount)

Parameter Description Default
ColorMode (Integer) Color mode for the distribution.
Supported values:
1: Red
2: Green
3: Blue
—
Pic_Target (PictureBox) Target picture control to draw in.
Type: PictureBox; required; passed by reference.
—
LevelCount (Integer) Number of discrete levels to display. —

Return Value: Void

Example:

imgproc.Draw_ColorLevelBox(0, picTarget, 8)

ImgProc.Draw_Line(Pic_Target, X1, Y1, X2, Y2, LineColor)

Description: Draws line on picture control.

Syntax: result = ImgProc.Draw_Line(Pic_Target, X1, Y1, X2, Y2, LineColor)

Parameter Description Default
Pic_Target (PictureBox) Target picture control.
Type: PictureBox; required; passed by reference.
—
X1 (Integer) Starting X-coordinate. —
Y1 (Integer) Starting Y-coordinate. —
X2 (Integer) Ending X-coordinate. —
Y2 (Integer) Ending Y-coordinate. —
LineColor (Color) Color of the line. —

Return Value: Bitmap

Return Description: Bitmap with drawn line, or Nothing if drawing fails.

Example:

lineBmp = imgproc.Draw_Line(picTarget, 0, 0, 100, 100, Color.Red)

ImgProc.Draw_Text_Outlined(Pic_Target, x, y, TextString, TextFont, InnerColor, OuterColor)

Description: Draws text with outline in picture control.

Syntax: result = ImgProc.Draw_Text_Outlined(Pic_Target, x, y, TextString, TextFont, InnerColor, OuterColor)

Parameter Description Default
Pic_Target (PictureBox) Target picture control.
Type: PictureBox; required; passed by reference.
—
x (Integer) X-coordinate for text. —
y (Integer) Y-coordinate for text. —
TextString (String) Text string to draw. —
TextFont (Font) Font for text. —
InnerColor (Color) Inner text color. —
OuterColor (Color) Outline color. —

Return Value: Bitmap

Return Description: Bitmap containing drawn text, or Nothing if drawing fails.

Example:

textBmp = imgproc.Draw_Text_Outlined(picTarget, 10, 10, "Hello", font, Color.White, Color.Black)

ImgProc.Draw_Text_Outlined_Bitmap(Pic_Target, x, y, TextString, TextFont, InnerColor, OuterColor)

Description: Draws outlined text on bitmap.

Syntax: result = ImgProc.Draw_Text_Outlined_Bitmap(Pic_Target, x, y, TextString, TextFont, InnerColor, OuterColor)

Parameter Description Default
Pic_Target (Bitmap) Target bitmap to draw text on. —
x (Integer) X-coordinate for text. —
y (Integer) Y-coordinate for text. —
TextString (String) Text string to draw. —
TextFont (Font) Font for text. —
InnerColor (Color) Inner text color. —
OuterColor (Color) Outline color. —

Return Value: Bitmap

Return Description: Bitmap with drawn text, or Nothing if drawing fails.

Example:

textBmp = imgproc.Draw_Text_Outlined_Bitmap(bitmap, 10, 10, "Hello", font, Color.White, Color.Black)

ImgProc.Draw_Text_Outlined_Graphics(SourceGraphics, x, y, TextString, TextFont, InnerColor, OuterColor)

Description: Draws outlined text on graphics object.

Syntax: ImgProc.Draw_Text_Outlined_Graphics(SourceGraphics, x, y, TextString, TextFont, InnerColor, OuterColor)

Parameter Description Default
SourceGraphics (Graphics) Target graphics object to draw on. —
x (Integer) X-coordinate for text. —
y (Integer) Y-coordinate for text. —
TextString (String) Text string to draw. —
TextFont (Font) Font for text. —
InnerColor (Color) Inner text color. —
OuterColor (Color) Outline color. —

Return Value: Void

Example:

imgproc.Draw_Text_Outlined_Graphics(g, 10, 10, "Hello", font, Color.White, Color.Black)

ImgProc.Draw_Text_Outlined_Image(SourceImage, x, y, TextString, TextFont, InnerColor, OuterColor)

Description: Draws outlined text on image.

Syntax: result = ImgProc.Draw_Text_Outlined_Image(SourceImage, x, y, TextString, TextFont, InnerColor, OuterColor)

Parameter Description Default
SourceImage (Bitmap) Source image to draw text on. —
x (Integer) X-coordinate for text. —
y (Integer) Y-coordinate for text. —
TextString (String) Text string to draw. —
TextFont (Font) Font for text. —
InnerColor (Color) Inner text color. —
OuterColor (Color) Outline color. —

Return Value: Bitmap

Return Description: Image with drawn text, or Nothing if drawing fails.

Example:

textImg = imgproc.Draw_Text_Outlined_Image(bitmap, 10, 10, "Hello", font, Color.White, Color.Black)

ImgProc.DrawSelectionBorder(SourceImage, cR, cG, cB, BorderThickness, Opacity)

Description: Draws selection border with RGB values on image.

Syntax: result = ImgProc.DrawSelectionBorder(SourceImage, cR, cG, cB, BorderThickness, Opacity)

Parameter Description Default
SourceImage (Bitmap) Source image to draw on. —
cR (Byte) Red component (0-255). —
cG (Byte) Green component (0-255). —
cB (Byte) Blue component (0-255). —
BorderThickness (Integer) Thickness of border line in pixels. —
Opacity (Byte) Alpha transparency (0-255). —

Return Value: Bitmap

Return Description: Image with selection border drawn, or Nothing if drawing fails.

Example:

bordered = imgproc.DrawSelectionBorder(bitmap, 255, 0, 0, 2, 255)

ImgProc.FillRegion(SourceImage, FillColorRed, FillColorGreen, FillColorBlue, IsFillInside, Opacity, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Fills image regions with RGB color value and opacity.

Syntax: result = ImgProc.FillRegion(SourceImage, FillColorRed, FillColorGreen, FillColorBlue, IsFillInside, Opacity, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to fill. —
FillColorRed (Byte) Red fill color (0-255). —
FillColorGreen (Byte) Green fill color (0-255). —
FillColorBlue (Byte) Blue fill color (0-255). —
IsFillInside (Boolean) Whether to fill inside (True) or outside (False). —
Opacity (Single) Fill opacity (0-1). —
IsShowProgress (Boolean, Optional) Whether to display progress. True
MaskImage (Bitmap, Optional) Optional mask to constrain filling. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Filled image, or Nothing if filling fails.

Example:

filled = imgproc.FillRegion(bitmap, 255, 0, 0, True, 0.5)

ImgProc.FloodFill(SourceImage, CenterX, CenterY, FillColorR, FillColorG, FillColorB, ToleranceR, ToleranceG, ToleranceB, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Fills region starting from center point with color.

Syntax: result = ImgProc.FloodFill(SourceImage, CenterX, CenterY, FillColorR, FillColorG, FillColorB, ToleranceR, ToleranceG, ToleranceB, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source image to fill. —
CenterX (Integer) Center X-coordinate to start fill. —
CenterY (Integer) Center Y-coordinate to start fill. —
FillColorR (Byte) Fill red component. —
FillColorG (Byte) Fill green component. —
FillColorB (Byte) Fill blue component. —
ToleranceR (Integer) Red color tolerance. —
ToleranceG (Integer) Green color tolerance. —
ToleranceB (Integer) Blue color tolerance. —
MaskImage (Bitmap, Optional) Optional mask to constrain fill. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: Bitmap

Return Description: Filled image, or Nothing if fill fails.

Example:

filled = imgproc.FloodFill(bitmap, 50, 50, 255, 0, 0, 10, 10, 10)

ImgProc.Generate_BlankImage(Pic_Target, BackColor)

Description: Generates blank image in picture control.

Syntax: ImgProc.Generate_BlankImage(Pic_Target, BackColor)

Parameter Description Default
Pic_Target (PictureBox) Target picture control.
Type: PictureBox; required; passed by reference.
—
BackColor (Color) Background color for the blank image. —

Return Value: Void

Example:

imgproc.Generate_BlankImage(picTarget, Color.White)

ImgProc.Get_ActualFormRect(SrcForm)

Description: Gets actual rectangle bounds of form.

Syntax: result = ImgProc.Get_ActualFormRect(SrcForm)

Parameter Description Default
SrcForm (Form) Source form window. —

Return Value: Rectangle

Return Description: Rectangle bounds of the form, or Rectangle.Empty if retrieval fails.

Example:

bounds = imgproc.Get_ActualFormRect(myForm)

ImgProc.Get_CoreCount()

Description: Gets number of processor cores.

Syntax: result = ImgProc.Get_CoreCount()

Return Value: Integer

Return Description: Number of available processor cores, or 1 if retrieval fails.

Example:

cores = imgproc.Get_CoreCount()

ImgProc.Get_CursorPosition(x, y)

Description: Gets current cursor position on screen.

Syntax: ImgProc.Get_CursorPosition(x, y)

Parameter Description Default
x (Integer) Output cursor X coordinate.
Type: Integer; required; passed by reference.
—
y (Integer) Output cursor Y coordinate.
Type: Integer; required; passed by reference.
—

Return Value: Void

Return Description: None.

Example:

imgproc.Get_CursorPosition(cursorX, cursorY)

ImgProc.Get_ImageFormat(FileExtension)

Description: Gets image format object from file extension.

Syntax: result = ImgProc.Get_ImageFormat(FileExtension)

Parameter Description Default
FileExtension (String) File extension (e.g., '.jpg', '.png'). —

Return Value: Object

Return Description: Image format object, or Nothing if format not found.

Example:

fmt = imgproc.Get_ImageFormat(".jpg")

ImgProc.Get_WindowHeightMargin(TargetForm)

Description: Gets window height margin value.

Syntax: result = ImgProc.Get_WindowHeightMargin(TargetForm)

Parameter Description Default
TargetForm (Form) Target form window. —

Return Value: Integer

Return Description: Window height margin, or 0 if retrieval fails.

Example:

margin = imgproc.Get_WindowHeightMargin(myForm)

ImgProc.Get_WindowWidthMargin(TargetForm)

Description: Gets window width margin value.

Syntax: result = ImgProc.Get_WindowWidthMargin(TargetForm)

Parameter Description Default
TargetForm (Form) Target form window. —

Return Value: Integer

Return Description: Window width margin, or 0 if retrieval fails.

Example:

margin = imgproc.Get_WindowWidthMargin(myForm)

ImgProc.GetControlBitmap(CTL)

Description: Gets bitmap snapshot of UI control.

Syntax: result = ImgProc.GetControlBitmap(CTL)

Parameter Description Default
CTL (Control) Source UI control. —

Return Value: Bitmap

Return Description: Bitmap snapshot of the control, or Nothing if snapshot fails.

Example:

ctlBitmap = imgproc.GetControlBitmap(myPictureBox)

ImgProc.SaveDepthMapToSTL_BoxFilter(SourceImage, FilePath, MaxSTLHeight, BaseThickness, SmoothingPasses, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Saves depth map as STL file using box filter.

Syntax: result = ImgProc.SaveDepthMapToSTL_BoxFilter(SourceImage, FilePath, MaxSTLHeight, BaseThickness, SmoothingPasses, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source depth map image. —
FilePath (String) Path to save STL file. —
MaxSTLHeight (Single, Optional) Maximum STL height. 15.0F
BaseThickness (Single, Optional) Base thickness for STL. 2.0F
SmoothingPasses (Integer, Optional) Number of smoothing passes. 3
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: String

Return Description: File path if save successful, empty string if operation fails.

Example:

result = imgproc.SaveDepthMapToSTL_BoxFilter(depthBitmap, "output.stl", 15.0, 2.0, 3)

ImgProc.SaveDepthMapToSTL_GaussianFilter(SourceImage, FilePath, MaxSTLHeight, BaseThickness, SmoothingPasses, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Saves depth map as STL file using Gaussian filter.

Syntax: result = ImgProc.SaveDepthMapToSTL_GaussianFilter(SourceImage, FilePath, MaxSTLHeight, BaseThickness, SmoothingPasses, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Parameter Description Default
SourceImage (Bitmap) Source depth map image. —
FilePath (String) Path to save STL file. —
MaxSTLHeight (Single, Optional) Maximum STL height. 15.0F
BaseThickness (Single, Optional) Base thickness for STL. 2.0F
SmoothingPasses (Integer, Optional) Number of smoothing passes. 3
MaskImage (Bitmap, Optional) Optional mask to constrain operation. Nothing
MaskRegionBoundary (Rectangle, Optional) Boundary rectangle for masked region. Nothing
IsMaskAllRegionSelected (Boolean, Optional) Whether entire region is selected. True

Return Value: String

Return Description: File path if save successful, empty string if operation fails.

Example:

result = imgproc.SaveDepthMapToSTL_GaussianFilter(depthBitmap, "output.stl", 15.0, 2.0, 3)

ImgProc.Stop_Processing()

Description: Stops the current image processing operation.

Syntax: ImgProc.Stop_Processing()

Return Value: Void

Example:

imgproc.Stop_Processing()

4. ObjectDetector (ScriptObjectDetectorHelper) – 8 functions

Description: Provides robust YOLOv3 ONNX-based object detection. Features hardware-accelerated AI inference, bounding box extraction, and class counting capabilities.

Neural & AI Processing Actions (8 functions)
ObjectDetector.Detect(img, confThreshold, nmsThreshold, useTiling)

Description: Detects objects in an image and stores the detection results.

Syntax: result = ObjectDetector.Detect(img, confThreshold, nmsThreshold, useTiling)

Parameter Description Default
img (Bitmap) Image to analyze. —
confThreshold (Double, Optional) Minimum confidence threshold. 0.5F
nmsThreshold (Double, Optional) Non-maximum suppression threshold. 0.4F
useTiling (Boolean, Optional) Whether to use tiled inference. False

Return Value: Integer

Return Description: Number of detected objects, or 0 if detection fails.

Example:

count = detector.Detect(bitmap, 0.5, 0.4, False)

ObjectDetector.GetAllResults()

Description: Returns all detection results from the most recent detection.

Syntax: result = ObjectDetector.GetAllResults()

Return Value: ONNX_YOLOv3Detector.DetectionResult()

Return Description: Array of detection results, or an empty array when no results are available.

Example:

results = detector.GetAllResults()

ObjectDetector.GetClassCount(className)

Description: Returns the number of detected objects with the specified class label.

Syntax: result = ObjectDetector.GetClassCount(className)

Parameter Description Default
className (String) Class label to count. —

Return Value: Integer

Return Description: Number of detections for the class.

Example:

count = detector.GetClassCount("person")

ObjectDetector.GetClassLocations(className)

Description: Returns bounding boxes for detections of the specified class.

Syntax: result = ObjectDetector.GetClassLocations(className)

Parameter Description Default
className (String) Class label to locate. —

Return Value: RectangleF()

Return Description: Array of bounding rectangles for matching detections.

Example:

locations = detector.GetClassLocations("person")

ObjectDetector.GetLastError()

Description: Returns the most recent error message produced by the helper.

Syntax: result = ObjectDetector.GetLastError()

Return Value: String

Return Description: The last error message, or an empty string when no error is recorded.

Example:

errorMessage = detector.GetLastError()

ObjectDetector.GetRenderedImage(img, showConfidence, colorName)

Description: Returns a copy of the image rendered with detection boxes and labels.

Syntax: result = ObjectDetector.GetRenderedImage(img, showConfidence, colorName)

Parameter Description Default
img (Bitmap) Source image to render. —
showConfidence (Boolean, Optional) Whether to display confidence values. True
colorName (String, Optional) Known .NET color name for boxes and labels. "Red"

Return Value: Bitmap

Return Description: Rendered bitmap, or Nothing if rendering fails.

Example:

rendered = detector.GetRenderedImage(bitmap, True, "Lime")

ObjectDetector.HasClass(className)

Description: Checks whether the most recent results contain the specified object class.

Syntax: result = ObjectDetector.HasClass(className)

Parameter Description Default
className (String) Class label to find. —

Return Value: Boolean

Return Description: True if the class was detected; otherwise False.

Example:

found = detector.HasClass("person")

ObjectDetector.Initialize()

Description: Initializes the YOLOv3 detector with its default model and settings.

Syntax: result = ObjectDetector.Initialize()

Return Value: Boolean

Return Description: True when the detector is initialized or already available; otherwise False.

Example:

ready = detector.Initialize()

5. Region (ScriptRegionHelper) – 38 functions

Description: The Region object provides programmatic access for defining, modifying, inspecting, and manipulating ROI (Region of Interest) selections, shape geometries, and binary masks in PhenoCapture.

Edit & Selection Actions (38 functions)
Region.AddCircle(left, top, right, bottom)

Description: Adds a circular area defined by a bounding rectangle to the current multi-region selection.

Syntax: Region.AddCircle(left, top, right, bottom)

Parameter Description Default
left (Integer) Left X coordinate. —
top (Integer) Top Y coordinate. —
right (Integer) Right X coordinate. —
bottom (Integer) Bottom Y coordinate. —

Return Value: Void

Return Description: Void. Coordinates are clipped to the workspace image bounds.

Example:

region.AddCircle(10, 20, 100, 120)

Region.AddMaskImage(appendBmp, offsetX, offsetY)

Description: Adds mask pixels from another bitmap at the specified offset.

Syntax: Region.AddMaskImage(appendBmp, offsetX, offsetY)

Parameter Description Default
appendBmp (Bitmap) Bitmap whose white pixels are added to the mask. —
offsetX (Integer, Optional) Horizontal offset in pixels. 0
offsetY (Integer, Optional) Vertical offset in pixels. 0

Return Value: Void

Return Description: Void.

Example:

region.AddMaskImage(mask, 10, 5)

Region.AddPolygon(coords)

Description: Adds a polygonal area to the current multi-region selection.

Syntax: Region.AddPolygon(coords)

Parameter Description Default
coords (Integer()) At least three coordinate pairs in X, Y order. —

Return Value: Void

Return Description: Void. Coordinates are clipped to the workspace image bounds.

Example:

region.AddPolygon(New Integer() {10, 10, 100, 10, 50, 80})

Region.AddRectangle(left, top, right, bottom)

Description: Adds a rectangular area to the current multi-region selection.

Syntax: Region.AddRectangle(left, top, right, bottom)

Parameter Description Default
left (Integer) Left X coordinate. —
top (Integer) Top Y coordinate. —
right (Integer) Right X coordinate. —
bottom (Integer) Bottom Y coordinate. —

Return Value: Void

Return Description: Void. Coordinates are clipped to the workspace image bounds.

Example:

region.AddRectangle(10, 20, 100, 120)

Region.GetBinaryMaskImage()

Description: Creates a binary bitmap representing the current selection mask.

Syntax: result = Region.GetBinaryMaskImage()

Return Value: Bitmap

Return Description: Mask bitmap with selected pixels in white and unselected pixels in black, or Nothing if unavailable.

Example:

mask = region.GetBinaryMaskImage()

Region.GetBoundaryBottom()

Description: Returns the bottom coordinate of the current selection boundary.

Syntax: result = Region.GetBoundaryBottom()

Return Value: Integer

Return Description: Bottom boundary coordinate in pixels.

Example:

bottom = region.GetBoundaryBottom()

Region.GetBoundaryLeft()

Description: Returns the left coordinate of the current selection boundary.

Syntax: result = Region.GetBoundaryLeft()

Return Value: Integer

Return Description: Left boundary coordinate in pixels.

Example:

left = region.GetBoundaryLeft()

Region.GetBoundaryRight()

Description: Returns the right coordinate of the current selection boundary.

Syntax: result = Region.GetBoundaryRight()

Return Value: Integer

Return Description: Right boundary coordinate in pixels.

Example:

right = region.GetBoundaryRight()

Region.GetBoundaryTop()

Description: Returns the top coordinate of the current selection boundary.

Syntax: result = Region.GetBoundaryTop()

Return Value: Integer

Return Description: Top boundary coordinate in pixels.

Example:

top = region.GetBoundaryTop()

Region.GetRectangleBottom()

Description: Returns the bottom coordinate of the current rectangular selection boundary.

Syntax: result = Region.GetRectangleBottom()

Return Value: Integer

Return Description: Bottom boundary coordinate in pixels.

Example:

bottom = region.GetRectangleBottom()

Region.GetRectangleLeft()

Description: Returns the left coordinate of the current rectangular selection boundary.

Syntax: result = Region.GetRectangleLeft()

Return Value: Integer

Return Description: Left boundary coordinate in pixels.

Example:

left = region.GetRectangleLeft()

Region.GetRectangleRight()

Description: Returns the right coordinate of the current rectangular selection boundary.

Syntax: result = Region.GetRectangleRight()

Return Value: Integer

Return Description: Right boundary coordinate in pixels.

Example:

right = region.GetRectangleRight()

Region.GetRectangleTop()

Description: Returns the top coordinate of the current rectangular selection boundary.

Syntax: result = Region.GetRectangleTop()

Return Value: Integer

Return Description: Top boundary coordinate in pixels.

Example:

top = region.GetRectangleTop()

Region.GetSelectMode()

Description: Returns the current selection mode.

Syntax: result = Region.GetSelectMode()

Return Value: String

Return Description: Selection mode name: None, Adding, or Subtracting.

Example:

mode = region.GetSelectMode()

Region.GetShape()

Description: Returns the name of the current selection shape type.

Syntax: result = Region.GetShape()

Return Value: String

Return Description: Selection shape name, or "None" when unavailable.

Example:

shapeName = region.GetShape()

Region.Hide()

Description: Hides the current selection shape.

Syntax: Region.Hide()

Return Value: Void

Return Description: Void.

Example:

region.Hide()

Region.Invalidate()

Description: Refreshes the workspace drawing canvas.

Syntax: Region.Invalidate()

Return Value: Void

Return Description: Void.

Example:

region.Invalidate()

Region.IsAllRegionSelected()

Description: Checks whether the entire workspace image region is selected.

Syntax: result = Region.IsAllRegionSelected()

Return Value: Boolean

Return Description: True when the entire region is selected or workspace state is unavailable; otherwise False.

Example:

allSelected = region.IsAllRegionSelected()

Region.IsBitmapMask()

Description: Checks whether the current selection is a bitmap mask.

Syntax: result = Region.IsBitmapMask()

Return Value: Boolean

Return Description: True when the selection is a bitmap mask; otherwise False.

Example:

isMask = region.IsBitmapMask()

Region.IsCircle()

Description: Checks whether the current selection shape is a circle.

Syntax: result = Region.IsCircle()

Return Value: Boolean

Return Description: True when the selection is a circle; otherwise False.

Example:

isCircle = region.IsCircle()

Region.IsLine()

Description: Checks whether the current selection shape is a line.

Syntax: result = Region.IsLine()

Return Value: Boolean

Return Description: True when the selection is a line; otherwise False.

Example:

isLine = region.IsLine()

Region.IsNone()

Description: Checks whether no selection shape is active.

Syntax: result = Region.IsNone()

Return Value: Boolean

Return Description: True when no selection shape is active; otherwise False.

Example:

isEmpty = region.IsNone()

Region.IsPath()

Description: Checks whether the current selection shape is a freehand path.

Syntax: result = Region.IsPath()

Return Value: Boolean

Return Description: True when the selection is a path; otherwise False.

Example:

isPath = region.IsPath()

Region.IsPolygon()

Description: Checks whether the current selection shape is a polygon.

Syntax: result = Region.IsPolygon()

Return Value: Boolean

Return Description: True when the selection is a polygon; otherwise False.

Example:

isPolygon = region.IsPolygon()

Region.IsRectangle()

Description: Checks whether the current selection shape is a rectangle.

Syntax: result = Region.IsRectangle()

Return Value: Boolean

Return Description: True when the selection is a rectangle; otherwise False.

Example:

isRectangle = region.IsRectangle()

Region.RemoveCircle(left, top, right, bottom)

Description: Removes a circular area defined by a bounding rectangle from the current multi-region selection.

Syntax: Region.RemoveCircle(left, top, right, bottom)

Parameter Description Default
left (Integer) Left X coordinate. —
top (Integer) Top Y coordinate. —
right (Integer) Right X coordinate. —
bottom (Integer) Bottom Y coordinate. —

Return Value: Void

Return Description: Void. Coordinates are clipped to the workspace image bounds.

Example:

region.RemoveCircle(10, 20, 100, 120)

Region.RemovePolygon(coords)

Description: Removes a polygonal area from the current multi-region selection.

Syntax: Region.RemovePolygon(coords)

Parameter Description Default
coords (Integer()) At least three coordinate pairs in X, Y order. —

Return Value: Void

Return Description: Void. Coordinates are clipped to the workspace image bounds.

Example:

region.RemovePolygon(New Integer() {10, 10, 100, 10, 50, 80})

Region.RemoveRectangle(left, top, right, bottom)

Description: Removes a rectangular area from the current multi-region selection.

Syntax: Region.RemoveRectangle(left, top, right, bottom)

Parameter Description Default
left (Integer) Left X coordinate. —
top (Integer) Top Y coordinate. —
right (Integer) Right X coordinate. —
bottom (Integer) Bottom Y coordinate. —

Return Value: Void

Return Description: Void. Coordinates are clipped to the workspace image bounds.

Example:

region.RemoveRectangle(10, 20, 100, 120)

Region.SetBinaryMaskImage(maskBmp)

Description: Sets the current selection from a binary mask bitmap.

Syntax: Region.SetBinaryMaskImage(maskBmp)

Parameter Description Default
maskBmp (Bitmap) Bitmap containing the selection mask. —

Return Value: Void

Return Description: Void. No change is made when the bitmap or workspace is unavailable.

Example:

region.SetBinaryMaskImage(mask)

Region.SetCircle(left, top, right, bottom)

Description: Creates a circular selection inside the specified bounding rectangle.

Syntax: Region.SetCircle(left, top, right, bottom)

Parameter Description Default
left (Integer) Left X coordinate. —
top (Integer) Top Y coordinate. —
right (Integer) Right X coordinate. —
bottom (Integer) Bottom Y coordinate. —

Return Value: Void

Return Description: Void.

Example:

region.SetCircle(10, 20, 100, 120)

Region.SetLine(x1, y1, x2, y2)

Description: Creates a line selection between two points.

Syntax: Region.SetLine(x1, y1, x2, y2)

Parameter Description Default
x1 (Integer) First endpoint X coordinate. —
y1 (Integer) First endpoint Y coordinate. —
x2 (Integer) Second endpoint X coordinate. —
y2 (Integer) Second endpoint Y coordinate. —

Return Value: Void

Return Description: Void.

Example:

region.SetLine(10, 20, 100, 120)

Region.SetPath(coords)

Description: Creates a freehand path selection from an array of alternating X and Y coordinates.

Syntax: Region.SetPath(coords)

Parameter Description Default
coords (Integer()) At least two coordinate pairs in X, Y order. —

Return Value: Void

Return Description: Void.

Example:

region.SetPath(New Integer() {10, 10, 50, 40, 100, 20})

Region.SetPolygon(coords)

Description: Creates a polygon selection from an array of alternating X and Y coordinates.

Syntax: Region.SetPolygon(coords)

Parameter Description Default
coords (Integer()) At least three coordinate pairs in X, Y order. —

Return Value: Void

Return Description: Void.

Example:

region.SetPolygon(New Integer() {10, 10, 100, 10, 50, 80})

Region.SetRectangle(left, top, right, bottom)

Description: Creates a rectangular selection from two corner coordinates.

Syntax: Region.SetRectangle(left, top, right, bottom)

Parameter Description Default
left (Integer) Left X coordinate. —
top (Integer) Top Y coordinate. —
right (Integer) Right X coordinate. —
bottom (Integer) Bottom Y coordinate. —

Return Value: Void

Return Description: Void.

Example:

region.SetRectangle(10, 20, 100, 120)

Region.SetSelectMode(modeName)

Description: Sets the selection mode to none, adding, or subtracting.

Syntax: Region.SetSelectMode(modeName)

Parameter Description Default
modeName (String) String representing the selection mode.
Supported modeName values:
"None": Clears the selection mode
"Adding" (or "Add"): Sets the mode to add new regions to the current selection
"Subtracting" (or "Subtract"): Sets the mode to subtract regions from the current selection
—

Return Value: Void

Return Description: Void. Unrecognized values are ignored.

Example:

region.SetSelectMode("Adding")

Region.Show()

Description: Displays the last drawn selection shape.

Syntax: Region.Show()

Return Value: Void

Return Description: Void.

Example:

region.Show()

Region.SubtractMaskImage(subtractBmp, offsetX, offsetY)

Description: Removes mask pixels using another bitmap at the specified offset.

Syntax: Region.SubtractMaskImage(subtractBmp, offsetX, offsetY)

Parameter Description Default
subtractBmp (Bitmap) Bitmap whose white pixels are removed from the mask. —
offsetX (Integer, Optional) Horizontal offset in pixels. 0
offsetY (Integer, Optional) Vertical offset in pixels. 0

Return Value: Void

Return Description: Void.

Example:

region.SubtractMaskImage(mask, 10, 5)

Region.Unselect()

Description: Clears the current selection and hides its selection shape.

Syntax: Region.Unselect()

Return Value: Void

Return Description: Void.

Example:

region.Unselect()

6. UI (ScriptUIHelper) – 4 functions

Description: The UI object provides access to user interface interaction, message box dialogs, event queue yielding, script cancellation tracking, and Windows clipboard operations in PhenoCapture.

System & Workspace Actions (4 functions)
UI.CopyToClipboard(text)

Description: Copies text to the system clipboard with license validation.

Syntax: UI.CopyToClipboard(text)

Parameter Description Default
text (Object) Text content to copy. —

Return Value: Void

Example:

uihelper.CopyToClipboard("Hello World")

UI.IsCancelled()

Description: Gets whether cancellation has been requested.

Syntax: result = UI.IsCancelled()

Return Value: Boolean

Return Description: True if cancellation is requested, False otherwise.

Example:

cancelled = uihelper.IsCancelled()

UI.MsgBox(prompt, buttons, title)

Description: Displays a message box dialog with customizable buttons and title.

Syntax: result = UI.MsgBox(prompt, buttons, title)

Parameter Description Default
prompt (Object) Message text to display. —
buttons (Object, Optional) Button style as MsgBoxStyle enumeration value. Nothing
title (Object, Optional) Dialog title text. Nothing

Return Value: Integer

Return Description: Integer representing the clicked button (VB.NET MsgBoxResult values).

Example:

result = uihelper.MsgBox("Continue?", 4, "Confirmation")

UI.YieldEvents()

Description: Yields control to allow event processing and UI updates.

Syntax: UI.YieldEvents()

Return Value: Void

Example:

uihelper.YieldEvents()