PhenoCapture Scripting API Reference — JavaScript (ClearScript)

Browse classes, categories, and methods below, or use the floating search bar to locate functions sequentially. 9 Classes • 494 Functions

⬇ Download PDF
1. Action (ScriptActionHelper) 130 Functions
▶
Color & Channel Actions 25 functions
▶
1. Action.AdaptiveContrast(contrastStrengthPercentage, gridTilesX, gridTilesY, contrastClipLimit) Returns: Boolean
▶
Description

Enhances local contrast using CLAHE.

Syntax

let result = Action.AdaptiveContrast(contrastStrengthPercentage, gridTilesX, gridTilesY, contrastClipLimit);

Parameters
ParameterDescriptionDefault
contrastStrengthPercentageInteger, OptionalContrast enhancement strength percentage.20
gridTilesXInteger, OptionalNumber of grid tiles horizontally.8
gridTilesYInteger, OptionalNumber of grid tiles vertically.8
contrastClipLimitSingle, OptionalCLAHE histogram clip limit.1.0F
Return Value

Boolean — True if contrast enhancement succeeded; otherwise False.

Example Code
let success = Action.AdaptiveContrast(20, 8, 8, 1.0F);
2. Action.AutoContrast(clipPercentage) Returns: Boolean
▶
Description

Automatically adjusts image contrast.

Syntax

let result = Action.AutoContrast(clipPercentage);

Parameters
ParameterDescriptionDefault
clipPercentageSingle, OptionalHistogram clipping percentage.0.5F
Return Value

Boolean — True if contrast adjustment succeeded; otherwise False.

Example Code
let success = Action.AutoContrast(0.5F);
3. Action.AutoEqualize() Returns: Boolean
▶
Description

Equalizes the image histogram across the tonal range.

Syntax

let result = Action.AutoEqualize();

Return Value

Boolean — True if equalization succeeded; otherwise False.

Example Code
let success = Action.AutoEqualize();
4. Action.AutoGamma() Returns: Boolean
▶
Description

Automatically adjusts image gamma.

Syntax

let result = Action.AutoGamma();

Return Value

Boolean — True if gamma adjustment succeeded; otherwise False.

Example Code
let success = Action.AutoGamma();
5. Action.AutoShadowsHighlights(shadowCorrectionStrengthPercentage, highlightCorrectionStrengthPercentage) Returns: Boolean
▶
Description

Corrects shadow and highlight regions.

Syntax

let result = Action.AutoShadowsHighlights(shadowCorrectionStrengthPercentage, highlightCorrectionStrengthPercentage);

Parameters
ParameterDescriptionDefault
shadowCorrectionStrengthPercentageSingle, OptionalShadow correction strength percentage.50.0F
highlightCorrectionStrengthPercentageSingle, OptionalHighlight correction strength percentage.10.0F
Return Value

Boolean — True if correction succeeded; otherwise False.

Example Code
let success = Action.AutoShadowsHighlights(50.0F, 10.0F);
6. Action.AutoTone(clipPercentage) Returns: Boolean
▶
Description

Automatically adjusts the image tonal range.

Syntax

let result = Action.AutoTone(clipPercentage);

Parameters
ParameterDescriptionDefault
clipPercentageSingle, OptionalHistogram clipping percentage.0.5F
Return Value

Boolean — True if tone adjustment succeeded; otherwise False.

Example Code
let success = Action.AutoTone(0.5F);
7. Action.AutoWhiteBalance() Returns: Boolean
▶
Description

Automatically corrects white balance and color casts.

Syntax

let result = Action.AutoWhiteBalance();

Return Value

Boolean — True if white balance succeeded; otherwise False.

Example Code
let success = Action.AutoWhiteBalance();
8. Action.BrightContrast(brightnessLevel, contrastLevel, autoBrightness) Returns: Boolean
▶
Description

Adjusts image brightness and contrast.

Syntax

let result = Action.BrightContrast(brightnessLevel, contrastLevel, autoBrightness);

Parameters
ParameterDescriptionDefault
brightnessLevelInteger, OptionalBrightness adjustment.0
contrastLevelInteger, OptionalContrast adjustment.0
autoBrightnessBoolean, OptionalWhether to calculate brightness automatically.False
Return Value

Boolean — True if the adjustment was applied; otherwise False.

Example Code
let success = Action.BrightContrast(0, 0, false);
9. Action.ChangeColor(sourceColorRed, sourceColorGreen, sourceColorBlue, targetColorRed, targetColorGreen, targetColorBlue) Returns: Boolean
▶
Description

Replaces one RGB color with another.

Syntax

let result = Action.ChangeColor(sourceColorRed, sourceColorGreen, sourceColorBlue, targetColorRed, targetColorGreen, targetColorBlue);

Parameters
ParameterDescriptionDefault
sourceColorRedInteger, OptionalSource color red component (0–255).255
sourceColorGreenInteger, OptionalSource color green component (0–255).255
sourceColorBlueInteger, OptionalSource color blue component (0–255).255
targetColorRedInteger, OptionalReplacement red component (0–255).0
targetColorGreenInteger, OptionalReplacement green component (0–255).0
targetColorBlueInteger, OptionalReplacement blue component (0–255).0
Return Value

Boolean — True if replacement succeeded; otherwise False.

Example Code
let success = Action.ChangeColor(255, 255, 255, 0, 0, 0);
10. Action.CIELab(lightnessShift, aAxisShift, bAxisShift) Returns: Boolean
▶
Description

Adjusts image color in the perceptually uniform CIE Lab space.

Syntax

let result = Action.CIELab(lightnessShift, aAxisShift, bAxisShift);

Parameters
ParameterDescriptionDefault
lightnessShiftInteger, OptionalChange to the L lightness axis.0
aAxisShiftInteger, OptionalChange to the a color axis.0
bAxisShiftInteger, OptionalChange to the b color axis.0
Return Value

Boolean — True if the adjustment was applied; otherwise False.

Example Code
let success = Action.CIELab(0, 0, 0);
11. Action.ColorDeconvolution(stainType, showColor) Returns: Boolean
▶
Description

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

Syntax

let result = Action.ColorDeconvolution(stainType, showColor);

Parameters
ParameterDescriptionDefault
stainTypeIntegerInteger 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)
—
showColorBooleanWhether to apply pseudo-coloring to the extracted stain result.—
Return Value

Boolean — True if the deconvolution process succeeded; otherwise False.

Example Code
let success = Action.ColorDeconvolution(0, true);
12. Action.ColorRangeSelection(targetColorRed, targetColorGreen, targetColorBlue, colorSpaceType, algorithmType, tolerance, keepOriginalColor) Returns: Boolean
▶
Description

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

Syntax

let result = Action.ColorRangeSelection(targetColorRed, targetColorGreen, targetColorBlue, colorSpaceType, algorithmType, tolerance, keepOriginalColor);

Parameters
ParameterDescriptionDefault
targetColorRedInteger, OptionalTarget color red component (0–255).0
targetColorGreenInteger, OptionalTarget color green component (0–255).255
targetColorBlueInteger, OptionalTarget color blue component (0–255).0
colorSpaceTypeInteger, OptionalInteger representing the color space model.
Supported colorSpaceType values:
0: RGB
1: HSI
2: Lab
3: Chroma
0
algorithmTypeInteger, OptionalInteger representing the distance calculation algorithm.
Supported algorithmType values:
0: Fast - Manhattan distance
1: Standard - Euclidean distance (Ignored when colorSpaceType is 3: Chroma)
1
toleranceInteger, OptionalColor matching tolerance range (0–255).40
keepOriginalColorBoolean, OptionalWhether to preserve original pixel colors for matched areas (False converts matched areas to white).True
Return Value

Boolean — True if the color range selection was applied; otherwise False.

Example Code
let success = Action.ColorRangeSelection(0, 255, 0, 3, 1, 40, true);
13. Action.ConvertToRgChrom() Returns: Boolean
▶
Description

Converts the image to RG chromaticity coordinates.

Syntax

let result = Action.ConvertToRgChrom();

Return Value

Boolean — True if conversion succeeded; otherwise False.

Example Code
let success = Action.ConvertToRgChrom();
14. Action.CorrectUnevenIllumination(illuminationGridSize) Returns: Boolean
▶
Description

Corrects uneven image illumination using a rolling-ball algorithm.

Syntax

let result = Action.CorrectUnevenIllumination(illuminationGridSize);

Parameters
ParameterDescriptionDefault
illuminationGridSizeInteger, OptionalGrid size used for illumination estimation.8
Return Value

Boolean — True if illumination correction succeeded; otherwise False.

Example Code
let success = Action.CorrectUnevenIllumination(8);
15. Action.DeleteChannel(channelToDeleteType) Returns: Boolean
▶
Description

Removes the specified color channel from the image.

Syntax

let result = Action.DeleteChannel(channelToDeleteType);

Parameters
ParameterDescriptionDefault
channelToDeleteTypeInteger, OptionalInteger representing the color channel.
Supported channelToDeleteType values:
0: Red
1: Green
2: Blue
0
Return Value

Boolean — True if the channel was removed; otherwise False.

Example Code
let success = Action.DeleteChannel(0);
16. Action.GrayFrom(sourceChannelType) Returns: Boolean
▶
Description

Creates a grayscale image from the selected color channel.

Syntax

let result = Action.GrayFrom(sourceChannelType);

Parameters
ParameterDescriptionDefault
sourceChannelTypeInteger, OptionalInteger representing the source color channel.
Supported sourceChannelType values:
0: Red
1: Green
2: Blue
0
Return Value

Boolean — True if conversion succeeded; otherwise False.

Example Code
let success = Action.GrayFrom(0);
17. Action.GrayScaling() Returns: Boolean
▶
Description

Converts the image to grayscale.

Syntax

let result = Action.GrayScaling();

Return Value

Boolean — True if conversion succeeded; otherwise False.

Example Code
let success = Action.GrayScaling();
18. Action.GrayToColor(mapType, isReversed) Returns: Boolean
▶
Description

Applies a color map to a grayscale image.

Syntax

let result = Action.GrayToColor(mapType, isReversed);

Parameters
ParameterDescriptionDefault
mapTypeInteger, OptionalInteger 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
isReversedBoolean, OptionalWhether to reverse the color map.False
Return Value

Boolean — True if the color map was applied; otherwise False.

Example Code
let success = Action.GrayToColor(0, false);
19. Action.HueSaturationIntensity(hue, saturation, intensity) Returns: Boolean
▶
Description

Adjusts hue, saturation, and intensity independently.

Syntax

let result = Action.HueSaturationIntensity(hue, saturation, intensity);

Parameters
ParameterDescriptionDefault
hueInteger, OptionalHue adjustment.0
saturationInteger, OptionalSaturation adjustment.0
intensityInteger, OptionalIntensity adjustment.0
Return Value

Boolean — True if the adjustment was applied; otherwise False.

Example Code
let success = Action.HueSaturationIntensity(0, 0, 0);
20. Action.Invert() Returns: Boolean
▶
Description

Inverts all image colors to create a negative.

Syntax

let result = Action.Invert();

Return Value

Boolean — True if colors were inverted; otherwise False.

Example Code
let success = Action.Invert();
21. Action.MergeChannels(colorSpaceType, image1Source, image2Source, image3Source) Returns: Boolean
▶
Description

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

Syntax

let result = Action.MergeChannels(colorSpaceType, image1Source, image2Source, image3Source);

Parameters
ParameterDescriptionDefault
colorSpaceTypeInteger, OptionalInteger representing the target color space.
Supported colorSpaceType values:
0: RGB
1: HSI
2: LAB
0
image1SourceInteger, OptionalFirst source image index.0
image2SourceInteger, OptionalSecond source image index.1
image3SourceInteger, OptionalThird source image index.2
Return Value

Boolean — True if the channels were merged; otherwise False.

Example Code
let success = Action.MergeChannels(0, 0, 1, 2);
22. Action.MultibandColor(rSat, rInt, ySat, yInt, gSat, gInt, cyanSat, cyanInt, bSat, bInt, mSat, mInt) Returns: Boolean
▶
Description

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

Syntax

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

Parameters
ParameterDescriptionDefault
rSatInteger, OptionalRed-band saturation adjustment.0
rIntInteger, OptionalRed-band intensity adjustment.0
ySatInteger, OptionalYellow-band saturation adjustment.0
yIntInteger, OptionalYellow-band intensity adjustment.0
gSatInteger, OptionalGreen-band saturation adjustment.0
gIntInteger, OptionalGreen-band intensity adjustment.0
cyanSatInteger, OptionalCyan-band saturation adjustment.0
cyanIntInteger, OptionalCyan-band intensity adjustment.0
bSatInteger, OptionalBlue-band saturation adjustment.0
bIntInteger, OptionalBlue-band intensity adjustment.0
mSatInteger, OptionalMagenta-band saturation adjustment.0
mIntInteger, OptionalMagenta-band intensity adjustment.0
Return Value

Boolean — True if the adjustment was applied; otherwise False.

Example Code
let success = Action.MultibandColor(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
23. Action.RollingBallBackgroundSubtraction(rollingBallBoxSize, isObjectColorAutomatic, manualObjectColorType) Returns: Boolean
▶
Description

Removes background using rolling-ball subtraction.

Syntax

let result = Action.RollingBallBackgroundSubtraction(rollingBallBoxSize, isObjectColorAutomatic, manualObjectColorType);

Parameters
ParameterDescriptionDefault
rollingBallBoxSizeInteger, OptionalRolling-ball box size in pixels.50
isObjectColorAutomaticBoolean, OptionalWhether to detect object color automatically.True
manualObjectColorTypeInteger, OptionalInteger representing the manual object color.
Supported manualObjectColorType values (used when automatic detection is disabled):
0: White
1: Black
0
Return Value

Boolean — True if background subtraction succeeded; otherwise False.

Example Code
let success = Action.RollingBallBackgroundSubtraction(50, true, 0);
24. Action.SplitRGB(rgbSplitChannelType) Returns: Boolean
▶
Description

Splits the image into the selected RGB channel.

Syntax

let result = Action.SplitRGB(rgbSplitChannelType);

Parameters
ParameterDescriptionDefault
rgbSplitChannelTypeInteger, OptionalInteger 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 — True if the channel was extracted; otherwise False.

Example Code
let success = Action.SplitRGB(0);
25. Action.SplitToning(shadowHue, highlightHue, toneStrength, tonalBalance) Returns: Boolean
▶
Description

Applies dual-tone color grading to shadows and highlights independently using a high-speed 256-entry luminance LUT.

Syntax

let result = Action.SplitToning(shadowHue, highlightHue, toneStrength, tonalBalance);

Parameters
ParameterDescriptionDefault
shadowHueInteger, OptionalColor hue angle in degrees for shadows. Range: 0 to 360.210
highlightHueInteger, OptionalColor hue angle in degrees for highlights. Range: 0 to 360.35
toneStrengthSingle, OptionalOverall color toning intensity. Range: 0.0 to 1.0.0.4F
tonalBalanceInteger, OptionalBalance shift between shadow and highlight tints. Range: -100 to 100.0
Return Value

Boolean — True if the Split Toning filter was applied; otherwise False.

Example Code
let success = Action.SplitToning(210, 35, 0.4F, 0);
Data Extraction & Analysis Actions 5 functions
▶
1. Action.AverageColorValue(analysisTargetChannelType) Returns: String
▶
Description

Extracts the average value of the selected color channel.

Syntax

let result = Action.AverageColorValue(analysisTargetChannelType);

Parameters
ParameterDescriptionDefault
analysisTargetChannelTypeInteger, OptionalInteger 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 — String containing the extracted value, or an empty string if extraction fails.

Example Code
let average = Action.AverageColorValue(0);
2. Action.CropExportRegions(maskSourceLocation, connectivityType, marginPixels, outputModeType, transparentBackground, backgroundColorRed, backgroundColorGreen, backgroundColorBlue, destinationFolder, filePrefix, imageFormatType) Returns: Boolean
▶
Description

Exports individual regions identified by a binary mask image.

Syntax

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

Parameters
ParameterDescriptionDefault
maskSourceLocationInteger, OptionalMask image source buffer index.1
connectivityTypeInteger, OptionalInteger representing the connected-component connectivity.
Supported connectivityType values:
0: FourWay (4-connected)
1: EightWay (8-connected)
0
marginPixelsInteger, OptionalExtra margin around each exported region.0
outputModeTypeInteger, OptionalInteger 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
transparentBackgroundBoolean, OptionalWhether exported backgrounds are transparent.True
backgroundColorRedInteger, OptionalBackground red component (0–255).0
backgroundColorGreenInteger, OptionalBackground green component (0–255).0
backgroundColorBlueInteger, OptionalBackground blue component (0–255).0
destinationFolderString, OptionalDirectory for exported region files."C:\\ExportedRegions"
filePrefixString, OptionalPrefix for exported file names."Region\_"
imageFormatTypeInteger, OptionalInteger representing the export image format.
Supported imageFormatType values:
0: PNG
1: JPEG
2: BMP
0
Return Value

Boolean — True if region export succeeded; otherwise False.

Example Code
let success = Action.CropExportRegions(1, 0, 0, 1, true, 0, 0, 0, "C:\\ExportedRegions", "Region\_", 0);
3. Action.MultiCellAnalysis(gridColumnsX, gridRowsY, cellShapeType, cellDiameterPixels, analysisModeType, analysisTargetChannelType, targetColorPresetName) Returns: String
▶
Description

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

Syntax

let result = Action.MultiCellAnalysis(gridColumnsX, gridRowsY, cellShapeType, cellDiameterPixels, analysisModeType, analysisTargetChannelType, targetColorPresetName);

Parameters
ParameterDescriptionDefault
gridColumnsXInteger, OptionalNumber of grid columns.5
gridRowsYInteger, OptionalNumber of grid rows.5
cellShapeTypeInteger, OptionalInteger representing the cell shape.
Supported cellShapeType values:
0: Rectangle
1: Circle
2: Point
1
cellDiameterPixelsInteger, OptionalCell diameter in pixels.20
analysisModeTypeInteger, OptionalInteger representing the analysis mode.
Supported analysisModeType values:
0: AverageColorValue
1: PixelCount
0
analysisTargetChannelTypeInteger, OptionalInteger 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
targetColorPresetNameString, OptionalTarget color preset name."White"
Return Value

String — String containing analysis data, or an empty string if analysis fails.

Example Code
let data = Action.MultiCellAnalysis(5, 5, 1, 20, 0, 0, "White");
4. Action.OCRTextExtraction() Returns: String
▶
Description

Extracts text from the workspace image using OCR.

Syntax

let result = Action.OCRTextExtraction();

Return Value

String — Extracted text, an empty string when no text is found, or an error message.

Example Code
let text = Action.OCRTextExtraction();
5. Action.PixelCounter(targetColorRed, targetColorGreen, targetColorBlue, resultOutputFormatType) Returns: String
▶
Description

Counts pixels matching the specified RGB color.

Syntax

let result = Action.PixelCounter(targetColorRed, targetColorGreen, targetColorBlue, resultOutputFormatType);

Parameters
ParameterDescriptionDefault
targetColorRedInteger, OptionalTarget color red component (0–255).255
targetColorGreenInteger, OptionalTarget color green component (0–255).255
targetColorBlueInteger, OptionalTarget color blue component (0–255).255
resultOutputFormatTypeInteger, OptionalInteger representing the result output format.
Supported resultOutputFormatType values:
0: TotalCount
1: Percentage
0
Return Value

String — String containing the count results, or an empty string if extraction fails.

Example Code
let counts = Action.PixelCounter(255, 255, 255, 0);
Edit & Selection Actions 13 functions
▶
1. Action.AddSelectionFromBinaryImage(sourceImageLocation) Returns: Boolean
▶
Description

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

Syntax

let result = Action.AddSelectionFromBinaryImage(sourceImageLocation);

Parameters
ParameterDescriptionDefault
sourceImageLocationInteger, OptionalSource buffer index from 1 to 10.1
Return Value

Boolean — True if the selection was updated; otherwise False.

Example Code
let success = Action.AddSelectionFromBinaryImage(1);
2. Action.Copy() Returns: Boolean
▶
Description

Copies the current image to the clipboard.

Syntax

let result = Action.Copy();

Return Value

Boolean — True if the image was copied; otherwise False.

Example Code
let success = Action.Copy();
3. Action.CreateSelectionFromBinaryImage(sourceImageLocation) Returns: Boolean
▶
Description

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

Syntax

let result = Action.CreateSelectionFromBinaryImage(sourceImageLocation);

Parameters
ParameterDescriptionDefault
sourceImageLocationInteger, Optional0 selects the workspace; 1–10 selects a buffer.0
Return Value

Boolean — True if the selection was created; otherwise False.

Example Code
let success = Action.CreateSelectionFromBinaryImage(1);
4. Action.ExpandSelection(expandByPixels) Returns: Boolean
▶
Description

Expands the current selection by a specified number of pixels.

Syntax

let result = Action.ExpandSelection(expandByPixels);

Parameters
ParameterDescriptionDefault
expandByPixelsInteger, OptionalExpansion distance in pixels.5
Return Value

Boolean — True if the selection changed; otherwise False.

Example Code
let success = Action.ExpandSelection(8);
5. Action.GetFromImageBuffer(sourceLocation) Returns: Boolean
▶
Description

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

Syntax

let result = Action.GetFromImageBuffer(sourceLocation);

Parameters
ParameterDescriptionDefault
sourceLocationInteger, OptionalSource buffer index from 1 to 10.1
Return Value

Boolean — True if the image was loaded; otherwise False.

Example Code
let success = Action.GetFromImageBuffer(1);
6. Action.Paste() Returns: Boolean
▶
Description

Pastes an image from the clipboard into the workspace.

Syntax

let result = Action.Paste();

Return Value

Boolean — True if an image was pasted; otherwise False.

Example Code
let success = Action.Paste();
7. Action.PasteAndFitToRectangle() Returns: Boolean
▶
Description

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

Syntax

let result = Action.PasteAndFitToRectangle();

Return Value

Boolean — True if an image was pasted; otherwise False.

Example Code
let success = Action.PasteAndFitToRectangle();
8. Action.PasteSelectionAsBinaryToBuffer(targetBufferIndex) Returns: Boolean
▶
Description

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

Syntax

let result = Action.PasteSelectionAsBinaryToBuffer(targetBufferIndex);

Parameters
ParameterDescriptionDefault
targetBufferIndexInteger, OptionalTarget buffer index from 1 to 10.1
Return Value

Boolean — True if the mask was written; otherwise False.

Example Code
let success = Action.PasteSelectionAsBinaryToBuffer(1);
9. Action.PutToImageBuffer(targetLocation) Returns: Boolean
▶
Description

Copies the current image to an image-buffer location.

Syntax

let result = Action.PutToImageBuffer(targetLocation);

Parameters
ParameterDescriptionDefault
targetLocationInteger, OptionalTarget buffer index from 1 to 10.1
Return Value

Boolean — True if the image was stored; otherwise False.

Example Code
let success = Action.PutToImageBuffer(1);
10. Action.ReverseSelection() Returns: Boolean
▶
Description

Inverts the current selection mask.

Syntax

let result = Action.ReverseSelection();

Return Value

Boolean — True if the selection was reversed; otherwise False.

Example Code
let success = Action.ReverseSelection();
11. Action.ShrinkSelection(shrinkByPixels) Returns: Boolean
▶
Description

Shrinks the current selection by a specified number of pixels.

Syntax

let result = Action.ShrinkSelection(shrinkByPixels);

Parameters
ParameterDescriptionDefault
shrinkByPixelsInteger, OptionalShrink distance in pixels.5
Return Value

Boolean — True if the selection changed; otherwise False.

Example Code
let success = Action.ShrinkSelection(3);
12. Action.SubtractSelectionFromBinaryImage(sourceImageLocation) Returns: Boolean
▶
Description

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

Syntax

let result = Action.SubtractSelectionFromBinaryImage(sourceImageLocation);

Parameters
ParameterDescriptionDefault
sourceImageLocationInteger, OptionalSource buffer index from 1 to 10.1
Return Value

Boolean — True if the selection was updated; otherwise False.

Example Code
let success = Action.SubtractSelectionFromBinaryImage(1);
13. Action.Unselect() Returns: Boolean
▶
Description

Clears the current selection.

Syntax

let result = Action.Unselect();

Return Value

Boolean — True if the selection was cleared; otherwise False.

Example Code
let success = Action.Unselect();
Hardware & Capture Actions 2 functions
▶
1. Action.AcquireImagefromScanner(useSilentMode) Returns: Boolean
▶
Description

Acquires an image from a scanner.

Syntax

let result = Action.AcquireImagefromScanner(useSilentMode);

Parameters
ParameterDescriptionDefault
useSilentModeBoolean, OptionalWhether to acquire without showing the scanner UI.True
Return Value

Boolean — True if acquisition succeeded; otherwise False.

Example Code
let success = Action.AcquireImagefromScanner(true);
2. Action.Capture() Returns: Boolean
▶
Description

Captures an image from a connected camera or scanner.

Syntax

let result = Action.Capture();

Return Value

Boolean — True if capture succeeded; otherwise False.

Example Code
let success = Action.Capture();
Image Transforms & Filters 32 functions
▶
1. Action.AdvancedSharpening(sharpenAmountPercentage) Returns: Boolean
▶
Description

Sharpens the image using the advanced sharpening filter.

Syntax

let result = Action.AdvancedSharpening(sharpenAmountPercentage);

Parameters
ParameterDescriptionDefault
sharpenAmountPercentageInteger, OptionalSharpening amount percentage.100
Return Value

Boolean — True if sharpening was applied; otherwise False.

Example Code
let success = Action.AdvancedSharpening(125);
2. Action.BoxAveraging(kernelSize) Returns: Boolean
▶
Description

Smooths the image using a box-averaging filter.

Syntax

let result = Action.BoxAveraging(kernelSize);

Parameters
ParameterDescriptionDefault
kernelSizeInteger, OptionalAveraging kernel width and height in pixels.3
Return Value

Boolean — True if the filter was applied; otherwise False.

Example Code
let success = Action.BoxAveraging(5);
3. Action.ChromaKeyOverlay(sourceLocation1, targetColorRed, targetColorGreen, targetColorBlue, sourceLocation2, opacity, enableFeathering, featheringRadius, tolerance, softness) Returns: Boolean
▶
Description

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

Syntax

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

Parameters
ParameterDescriptionDefault
sourceLocation1Integer, OptionalForeground image source (0 for workspace, 1–10 for buffers).1
targetColorRedInteger, OptionalRed component of the chroma-key color (0–255).0
targetColorGreenInteger, OptionalGreen component of the chroma-key color (0–255).0
targetColorBlueInteger, OptionalBlue component of the chroma-key color (0–255).0
sourceLocation2Integer, OptionalBackground image source (0 for workspace, 1–10 for buffers).0
opacityInteger, OptionalOverlay opacity percentage (0–100).100
enableFeatheringBoolean, OptionalWhether to soften the keyed edge.False
featheringRadiusInteger, OptionalEdge feathering radius in pixels.30
toleranceInteger, OptionalColor matching tolerance range (0–100).35
softnessInteger, OptionalEdge gradient softness range (0–100).20
Return Value

Boolean — True if the overlay was applied; otherwise False.

Example Code
let success = Action.ChromaKeyOverlay(1, 0, 255, 0, 0, 100, false, 30, 35, 20);
4. Action.Crop(cropWidthPixels, cropHeightPixels, startXCoordinate, startYCoordinate) Returns: Boolean
▶
Description

Crops a rectangular area from the image.

Syntax

let result = Action.Crop(cropWidthPixels, cropHeightPixels, startXCoordinate, startYCoordinate);

Parameters
ParameterDescriptionDefault
cropWidthPixelsInteger, OptionalCrop width in pixels.500
cropHeightPixelsInteger, OptionalCrop height in pixels.500
startXCoordinateInteger, OptionalLeft coordinate of the crop in pixels.0
startYCoordinateInteger, OptionalTop coordinate of the crop in pixels.0
Return Value

Boolean — True if cropping was applied; otherwise False.

Example Code
let success = Action.Crop(500, 500, 0, 0);
5. Action.Dehaze(patchRadius, dehazeStrength, saturationBoost, brightnessBoost) Returns: Boolean
▶
Description

Removes atmospheric haze, fog, and chamber glare to restore crisp contrast and vivid colors using a high-speed O(1) Dark Channel Prior algorithm.

Syntax

let result = Action.Dehaze(patchRadius, dehazeStrength, saturationBoost, brightnessBoost);

Parameters
ParameterDescriptionDefault
patchRadiusInteger, OptionalLocal patch radius in pixels for haze estimation. Range: 1 to 150.25
dehazeStrengthSingle, OptionalHaze removal intensity. Range: 0.0 to 1.0.0.7F
saturationBoostSingle, OptionalColor saturation boost after haze removal. Range: -1.0 to 1.0.0.15F
brightnessBoostInteger, OptionalAdditional brightness compensation. Range: -100 to 100.10
Return Value

Boolean — True if the Dehaze filter was applied; otherwise False.

Example Code
let success = Action.Dehaze(25, 0.7F, 0.15F, 10);
6. Action.Dithering(ditheringAlgorithmType) Returns: Boolean
▶
Description

Applies a dithering algorithm to reduce image color depth.

Syntax

let result = Action.Dithering(ditheringAlgorithmType);

Parameters
ParameterDescriptionDefault
ditheringAlgorithmTypeInteger, OptionalInteger representing the dithering algorithm.
Supported ditheringAlgorithmType values:
0: Ordered
1: FloydSteinberg
0
Return Value

Boolean — True if dithering was applied; otherwise False.

Example Code
let success = Action.Dithering(0);
7. Action.Emboss(angle, distance, strength, bias) Returns: Boolean
▶
Description

Creates an embossed relief effect.

Syntax

let result = Action.Emboss(angle, distance, strength, bias);

Parameters
ParameterDescriptionDefault
angleSingle, OptionalLight-source angle in degrees.135.0F
distanceInteger, OptionalRelief offset in pixels.1
strengthInteger, OptionalEffect strength percentage.100
biasInteger, OptionalOutput intensity bias.128
Return Value

Boolean — True if the effect was applied; otherwise False.

Example Code
let success = Action.Emboss(135.0F, 1, 100, 128);
8. Action.FFT() Returns: Boolean
▶
Description

Transforms the image into the frequency domain using FFT.

Syntax

let result = Action.FFT();

Return Value

Boolean — True if the transform was applied; otherwise False.

Example Code
let success = Action.FFT();
9. Action.FlipHorizontally() Returns: Boolean
▶
Description

Flips the image horizontally.

Syntax

let result = Action.FlipHorizontally();

Return Value

Boolean — True if the image was transformed; otherwise False.

Example Code
let success = Action.FlipHorizontally();
10. Action.FlipVertically() Returns: Boolean
▶
Description

Flips the image vertically.

Syntax

let result = Action.FlipVertically();

Return Value

Boolean — True if the image was transformed; otherwise False.

Example Code
let success = Action.FlipVertically();
11. Action.GammaAdjustment(gammaValue) Returns: Boolean
▶
Description

Adjusts image brightness using gamma correction.

Syntax

let result = Action.GammaAdjustment(gammaValue);

Parameters
ParameterDescriptionDefault
gammaValueDouble, OptionalGamma correction value.0.1
Return Value

Boolean — True if the adjustment was applied; otherwise False.

Example Code
let success = Action.GammaAdjustment(0.8);
12. Action.GaussianFilter(kernelSize) Returns: Boolean
▶
Description

Blurs the image using a Gaussian filter.

Syntax

let result = Action.GaussianFilter(kernelSize);

Parameters
ParameterDescriptionDefault
kernelSizeInteger, OptionalGaussian kernel width and height in pixels.3
Return Value

Boolean — True if the filter was applied; otherwise False.

Example Code
let success = Action.GaussianFilter(5);
13. Action.HDRLocalToneMapping(blurRadius, detailStrength, toneCompression, brightnessBoost) Returns: Boolean
▶
Description

Enhances local contrast and compresses dynamic range (shadow/highlight recovery) using a high-speed O(1) Stack Blur algorithm.

Syntax

let result = Action.HDRLocalToneMapping(blurRadius, detailStrength, toneCompression, brightnessBoost);

Parameters
ParameterDescriptionDefault
blurRadiusInteger, OptionalLocal neighborhood radius in pixels. Range: 1 to 150.40
detailStrengthSingle, OptionalClarity and fine-detail amplification strength. Range: 0.0 to 3.0.1.2F
toneCompressionSingle, OptionalShadow/highlight dynamic range compression strength. Range: 0.0 to 1.0.0.5F
brightnessBoostInteger, OptionalAdditional brightness boost applied to the final pixels. Range: -100 to 100.0
Return Value

Boolean — True if the HDR Local Tone Mapping filter was applied; otherwise False.

Example Code
let success = Action.HDRLocalToneMapping(40, 1.2F, 0.5F, 0);
14. Action.HighlightBloomHalation(spreadRadius, threshold, bloomStrength, halationTint) Returns: Boolean
▶
Description

Applies selective optical highlight bloom and analog cinema film halation to bright light sources using a high-speed O(1) Stack Blur engine.

Syntax

let result = Action.HighlightBloomHalation(spreadRadius, threshold, bloomStrength, halationTint);

Parameters
ParameterDescriptionDefault
spreadRadiusInteger, OptionalDiffusion radius in pixels. Range: 1 to 150.25
thresholdInteger, OptionalLuminance threshold for isolating bright highlights. Range: 0 to 250.180
bloomStrengthSingle, OptionalIntensity of the highlight bloom glow. Range: 0.0 to 2.0.0.8F
halationTintSingle, OptionalRed-orange cinema film halation tint ratio (0.0 for pure optical bloom, 1.0 for full film halation). Range: 0.0 to 1.0.0.0F
Return Value

Boolean — True if the Highlight Bloom & Halation filter was applied; otherwise False.

Example Code
let success = Action.HighlightBloomHalation(25, 180, 0.8F, 0.35F);
15. Action.HighPassSharpening(radius, strength, threshold, blendMode) Returns: Boolean
▶
Description

Sharpens multi-scale structural edges and surface textures using a high-speed O(1) High-Pass frequency extraction algorithm.

Syntax

let result = Action.HighPassSharpening(radius, strength, threshold, blendMode);

Parameters
ParameterDescriptionDefault
radiusInteger, OptionalFrequency radius in pixels. Range: 1 to 100.10
strengthSingle, OptionalHigh-frequency detail amplification strength. Range: 0.0 to 2.0.1.0F
thresholdInteger, OptionalNoise suppression threshold in pixel levels. Range: 0 to 50.3
blendModeInteger, OptionalInteger representing the blending algorithm.
Supported blendMode values:
0: Overlay (Balanced)
1: SoftLight (Subtle)
2: HardLight (Intense)
0
Return Value

Boolean — True if the High-Pass Sharpening filter was applied; otherwise False.

Example Code
let success = Action.HighPassSharpening(10, 1.0F, 3, 0);
16. Action.ImageStamp(stampImageSource, locationX, locationY, scaleX, scaleY, angle, opacity, enableTransparentColor, transparentColorArgb, enableGradualAlpha, tolerance, enableFeather, featherRadius) Returns: Boolean
▶
Description

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

Syntax

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

Parameters
ParameterDescriptionDefault
stampImageSourceInteger, OptionalStamp image source buffer index.1
locationXInteger, OptionalStamp left coordinate in pixels.0
locationYInteger, OptionalStamp top coordinate in pixels.0
scaleXInteger, OptionalHorizontal scale percentage.100
scaleYInteger, OptionalVertical scale percentage.100
angleSingle, OptionalRotation angle in degrees.0.0F
opacityInteger, OptionalStamp opacity percentage.100
enableTransparentColorBoolean, OptionalWhether to make a selected color transparent.False
transparentColorArgbInteger, OptionalARGB value of the transparent color.-1
enableGradualAlphaBoolean, OptionalWhether to apply gradual alpha blending.False
toleranceInteger, OptionalTransparent-color matching tolerance.30
enableFeatherBoolean, OptionalWhether to feather stamp edges.False
featherRadiusInteger, OptionalFeathering radius in pixels.10
Return Value

Boolean — True if the stamp was applied; otherwise False.

Example Code
let success = Action.ImageStamp(1, 0, 0, 100, 100, 0.0F, 100, false, -1, false, 30, false, 10);
17. Action.InverseFFT() Returns: Boolean
▶
Description

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

Syntax

let result = Action.InverseFFT();

Return Value

Boolean — True if the inverse transform was applied; otherwise False.

Example Code
let success = Action.InverseFFT();
18. Action.MiniatureEffect(blurRadius, focusPosition, focusSize, saturationBoost) Returns: Boolean
▶
Description

Simulates a tilt-shift miniature lens effect with smooth depth-of-field blurring and saturation enhancement.

Syntax

let result = Action.MiniatureEffect(blurRadius, focusPosition, focusSize, saturationBoost);

Parameters
ParameterDescriptionDefault
blurRadiusInteger, OptionalOut-of-focus blur radius in pixels. Range: 1 to 150.25
focusPositionSingle, OptionalVertical center position of the sharp focus zone (0.0 = top, 0.5 = center, 1.0 = bottom). Range: 0.0 to 1.0.0.5F
focusSizeSingle, OptionalRelative height of the sharp focus band. Range: 0.05 to 0.80.0.25F
saturationBoostSingle, OptionalColor vibrancy boost for a miniature model look. Range: -1.0 to 1.0.0.25F
Return Value

Boolean — True if the Miniature Effect filter was applied; otherwise False.

Example Code
let success = Action.MiniatureEffect(25, 0.5F, 0.25F, 0.25F);
19. Action.MosaicFilter(mosaicModeType, value) Returns: Boolean
▶
Description

Applies a mosaic or pixelation effect.

Syntax

let result = Action.MosaicFilter(mosaicModeType, value);

Parameters
ParameterDescriptionDefault
mosaicModeTypeInteger, OptionalInteger 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
valueInteger, OptionalMosaic block size or mode-specific amount.10
Return Value

Boolean — True if the effect was applied; otherwise False.

Example Code
let success = Action.MosaicFilter(0, 10);
20. Action.OrtonEffect(blurRadius, glowStrength, exposureBoost, brightnessBoost) Returns: Boolean
▶
Description

Applies a dreamy, painterly luminescence (Orton Effect) by combining overexposed sharp and blurred layers via Multiply blending.

Syntax

let result = Action.OrtonEffect(blurRadius, glowStrength, exposureBoost, brightnessBoost);

Parameters
ParameterDescriptionDefault
blurRadiusInteger, OptionalBlur radius for the glow diffusion in pixels. Range: 1 to 150.25
glowStrengthSingle, OptionalOverall blending opacity of the Orton effect. Range: 0.0 to 1.0.0.6F
exposureBoostSingle, OptionalHighlight overexposure boost in the Screen pass. Range: 0.0 to 1.0.0.7F
brightnessBoostInteger, OptionalAdditional brightness boost applied to the final pixels. Range: -100 to 100.0
Return Value

Boolean — True if the Orton Effect filter was applied; otherwise False.

Example Code
let success = Action.OrtonEffect(25, 0.6F, 0.7F, 0);
21. Action.OverlayImage(sourceLocation1, sourceLocation2, targetColorRed, targetColorGreen, targetColorBlue, opacity, enableFeathering, featheringRadius, tolerance, gradientAlpha) Returns: Boolean
▶
Description

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

Syntax

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

Parameters
ParameterDescriptionDefault
sourceLocation1Integer, OptionalFirst image source (0 for workspace, 1–10 for buffers).1
sourceLocation2Integer, OptionalSecond image source (0 for workspace, 1–10 for buffers).0
targetColorRedInteger, OptionalRed component of the target color (0–255).0
targetColorGreenInteger, OptionalGreen component of the target color (0–255).0
targetColorBlueInteger, OptionalBlue component of the target color (0–255).0
opacityInteger, OptionalOverlay opacity percentage.100
enableFeatheringBoolean, OptionalWhether to feather the overlay edge.False
featheringRadiusInteger, OptionalFeathering radius in pixels.30
toleranceInteger, OptionalColor matching tolerance.0
gradientAlphaBoolean, OptionalWhether to apply gradual alpha blending.False
Return Value

Boolean — True if the overlay was applied; otherwise False.

Example Code
let success = Action.OverlayImage(1, 0, 0, 0, 0, 100, false, 30, 0, false);
22. Action.Resize(resizeUnitType, maintainAspectRatio, baseDimensionType, targetWidth, targetHeight, interpolationAlgorithmType) Returns: Boolean
▶
Description

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

Syntax

let result = Action.Resize(resizeUnitType, maintainAspectRatio, baseDimensionType, targetWidth, targetHeight, interpolationAlgorithmType);

Parameters
ParameterDescriptionDefault
resizeUnitTypeInteger, OptionalInteger representing the resize units.
Supported resizeUnitType values:
0: Pixels
1: Percent
0
maintainAspectRatioBoolean, OptionalWhether to preserve the image aspect ratio.True
baseDimensionTypeInteger, OptionalInteger representing the dimension basis.
Supported baseDimensionType values:
0: Width
1: Height
0
targetWidthInteger, OptionalRequested width.800
targetHeightInteger, OptionalRequested height.600
interpolationAlgorithmTypeInteger, OptionalInteger representing the interpolation algorithm.
Supported interpolationAlgorithmType values:
0: NearestNeighbor
1: Bilinear
2: Bicubic
3: HighQualityBilinear
4: HighQualityBicubic
4
Return Value

Boolean — True if the image was resized; otherwise False.

Example Code
let success = Action.Resize(0, true, 0, 800, 600, 4);
23. Action.ResizeCanvas(resizeUnitType, maintainAspectRatio, baseDimensionType, targetWidth, targetHeight, canvasAlignmentType, backgroundColorRed, backgroundColorGreen, backgroundColorBlue) Returns: Boolean
▶
Description

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

Syntax

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

Parameters
ParameterDescriptionDefault
resizeUnitTypeInteger, OptionalInteger representing the resize units.
Supported resizeUnitType values:
0: Pixels
1: Percent
0
maintainAspectRatioBoolean, OptionalWhether to preserve the image aspect ratio.True
baseDimensionTypeInteger, OptionalInteger representing the dimension basis.
Supported baseDimensionType values:
0: Width
1: Height
0
targetWidthInteger, OptionalRequested canvas width.800
targetHeightInteger, OptionalRequested canvas height.600
canvasAlignmentTypeInteger, OptionalInteger representing the image alignment.
Supported canvasAlignmentType values:
0: Center
1: LeftTop
2: RightTop
3: LeftBottom
4: RightBottom
0
backgroundColorRedInteger, OptionalRed component of the canvas fill color (0–255).255
backgroundColorGreenInteger, OptionalGreen component of the canvas fill color (0–255).255
backgroundColorBlueInteger, OptionalBlue component of the canvas fill color (0–255).255
Return Value

Boolean — True if the canvas was resized; otherwise False.

Example Code
let success = Action.ResizeCanvas(0, true, 0, 800, 600, 0, 255, 255, 255);
24. Action.Rotate(rotationAngleDegrees, rotationDirectionType, backgroundColorRed, backgroundColorGreen, backgroundColorBlue) Returns: Boolean
▶
Description

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

Syntax

let result = Action.Rotate(rotationAngleDegrees, rotationDirectionType, backgroundColorRed, backgroundColorGreen, backgroundColorBlue);

Parameters
ParameterDescriptionDefault
rotationAngleDegreesSingle, OptionalRotation angle in degrees.90.0F
rotationDirectionTypeInteger, OptionalInteger representing the rotation direction.
Supported rotationDirectionType values:
0: CounterClockwise
1: Clockwise
1
backgroundColorRedInteger, OptionalRed component of the fill color (0–255).255
backgroundColorGreenInteger, OptionalGreen component of the fill color (0–255).255
backgroundColorBlueInteger, OptionalBlue component of the fill color (0–255).255
Return Value

Boolean — True if rotation was applied; otherwise False.

Example Code
let success = Action.Rotate(90.0F, 1, 255, 255, 255);
25. Action.RotationalAlignmentByLine(backgroundColorRed, backgroundColorGreen, backgroundColorBlue) Returns: Boolean
▶
Description

Rotates the image to align it with a detected line.

Syntax

let result = Action.RotationalAlignmentByLine(backgroundColorRed, backgroundColorGreen, backgroundColorBlue);

Parameters
ParameterDescriptionDefault
backgroundColorRedInteger, OptionalRed component of the fill color (0–255).255
backgroundColorGreenInteger, OptionalGreen component of the fill color (0–255).255
backgroundColorBlueInteger, OptionalBlue component of the fill color (0–255).255
Return Value

Boolean — True if alignment was applied; otherwise False.

Example Code
let success = Action.RotationalAlignmentByLine(255, 255, 255);
26. Action.Sharpen3x3() Returns: Boolean
▶
Description

Sharpens image details using a 3×3 convolution filter.

Syntax

let result = Action.Sharpen3x3();

Return Value

Boolean — True if sharpening was applied; otherwise False.

Example Code
let success = Action.Sharpen3x3();
27. Action.Sharpen5x5HighQuality(sharpenStrengthPercentage) Returns: Boolean
▶
Description

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

Syntax

let result = Action.Sharpen5x5HighQuality(sharpenStrengthPercentage);

Parameters
ParameterDescriptionDefault
sharpenStrengthPercentageInteger, OptionalSharpening strength percentage.10
Return Value

Boolean — True if sharpening was applied; otherwise False.

Example Code
let success = Action.Sharpen5x5HighQuality(20);
28. Action.SmartDenoise(radius, threshold) Returns: Boolean
▶
Description

Reduces image noise while preserving edges.

Syntax

let result = Action.SmartDenoise(radius, threshold);

Parameters
ParameterDescriptionDefault
radiusInteger, OptionalDenoising neighborhood radius.5
thresholdInteger, OptionalNoise similarity threshold.30
Return Value

Boolean — True if denoising was applied; otherwise False.

Example Code
let success = Action.SmartDenoise(5, 30);
29. Action.SmartSketch(strokeWidth, pencilDarkness, colorBlend, paperBrightness) Returns: Boolean
▶
Description

Converts the image into a fine pencil sketch or colored-pencil technical line art using a high-speed O(1) Color Dodge algorithm.

Syntax

let result = Action.SmartSketch(strokeWidth, pencilDarkness, colorBlend, paperBrightness);

Parameters
ParameterDescriptionDefault
strokeWidthInteger, OptionalStroke width (blur radius) in pixels. Range: 1 to 100.15
pencilDarknessSingle, OptionalGraphite line darkness and shading intensity. Range: 0.01 to 1.0.0.5F
colorBlendSingle, OptionalOriginal color blending ratio (0.0 for pure grayscale sketch, up to 1.0 for colored-pencil look). Range: 0.0 to 1.0.0.0F
paperBrightnessInteger, OptionalBackground paper brightness adjustment. Range: -100 to 100.0
Return Value

Boolean — True if the Smart Sketch filter was applied; otherwise False.

Example Code
let success = Action.SmartSketch(15, 0.5F, 0.0F, 0);
30. Action.SoftGlow(blurRadius, glowStrength, brightnessBoost, blendMode) Returns: Boolean
▶
Description

Applies a dreamy, radiant luminescence effect using a high-speed O(1) Stack Blur and Screen/SoftLight blending.

Syntax

let result = Action.SoftGlow(blurRadius, glowStrength, brightnessBoost, blendMode);

Parameters
ParameterDescriptionDefault
blurRadiusInteger, OptionalBlur radius for the glow diffusion in pixels. Range: 1 to 150.20
glowStrengthSingle, OptionalBlending strength (opacity) of the glow layer. Range: 0.0 to 1.0.0.45F
brightnessBoostInteger, OptionalAdditional brightness boost applied to the final blended pixels. Range: -100 to 100.5
blendModeInteger, OptionalInteger representing the blending algorithm used to combine the glow layer with the base image.
Supported blendMode values:
0: Screen (Bright & Airy)
1: SoftLight (Gentle Contrast)
0
Return Value

Boolean — True if the Soft Glow filter was applied; otherwise False.

Example Code
let success = Action.SoftGlow(20, 0.45F, 5, 0);
31. Action.StackBlur(kernelSize) Returns: Boolean
▶
Description

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

Syntax

let result = Action.StackBlur(kernelSize);

Parameters
ParameterDescriptionDefault
kernelSizeInteger, OptionalBlur radius (half size of the kernel) in pixels. Range: 1 to 100.3
Return Value

Boolean — True if the filter was applied; otherwise False.

Example Code
let success = Action.StackBlur(5);
32. Action.TextAnnotation(textString, locationX, locationY, fontName, fontSize, fontStyleInt, innerColorArgb, outerColorArgb, opacity, outlineThickness, angle, isAntiAlias) Returns: Boolean
▶
Description

Adds a styled text annotation or watermark to the image.

Syntax

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

Parameters
ParameterDescriptionDefault
textStringString, OptionalText to draw."Text"
locationXInteger, OptionalText left coordinate in pixels.0
locationYInteger, OptionalText top coordinate in pixels.0
fontNameString, OptionalFont family name."Arial"
fontSizeSingle, OptionalFont size in points.12.0F
fontStyleIntInteger, OptionalInteger representing the font style.
Supported fontStyleInt values:
0: Regular
1: Bold
2: Italic
3: Bold Italic
4: Underline
8: Strikeout
0
innerColorArgbInteger, OptionalARGB value of the text fill color.-256
outerColorArgbInteger, OptionalARGB value of the outline color.-16777216
opacityInteger, OptionalText opacity percentage.100
outlineThicknessSingle, OptionalOutline thickness in pixels.1.0F
angleSingle, OptionalText rotation angle in degrees.0.0F
isAntiAliasBoolean, OptionalWhether to antialias the text.True
Return Value

Boolean — True if the annotation was drawn; otherwise False.

Example Code
let success = Action.TextAnnotation("Sample", 20, 20, "Arial", 12.0F, 0, -256, -16777216, 100, 1.0F, 0.0F, true);
Neural & AI Processing Actions 23 functions
▶
1. Action.AIAutoSubjectSelectionGeneral() Returns: Boolean
▶
Description

Automatically selects the main subject in a general image.

Syntax

let result = Action.AIAutoSubjectSelectionGeneral();

Return Value

Boolean — True if subject selection succeeded; otherwise False.

Example Code
let success = Action.AIAutoSubjectSelectionGeneral();
2. Action.AIAutoSubjectSelectionPortrait() Returns: Boolean
▶
Description

Automatically selects the subject in a portrait image.

Syntax

let result = Action.AIAutoSubjectSelectionPortrait();

Return Value

Boolean — True if subject selection succeeded; otherwise False.

Example Code
let success = Action.AIAutoSubjectSelectionPortrait();
3. Action.AIBackgroundRemovalGeneral(virtualBackgroundColorRed, virtualBackgroundColorGreen, virtualBackgroundColorBlue) Returns: Boolean
▶
Description

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

Syntax

let result = Action.AIBackgroundRemovalGeneral(virtualBackgroundColorRed, virtualBackgroundColorGreen, virtualBackgroundColorBlue);

Parameters
ParameterDescriptionDefault
virtualBackgroundColorRedInteger, OptionalReplacement background red component (0–255).255
virtualBackgroundColorGreenInteger, OptionalReplacement background green component (0–255).255
virtualBackgroundColorBlueInteger, OptionalReplacement background blue component (0–255).255
Return Value

Boolean — True if background removal succeeded; otherwise False.

Example Code
let success = Action.AIBackgroundRemovalGeneral(255, 255, 255);
4. Action.AIBackgroundRemovalPortrait(virtualBackgroundColorRed, virtualBackgroundColorGreen, virtualBackgroundColorBlue) Returns: Boolean
▶
Description

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

Syntax

let result = Action.AIBackgroundRemovalPortrait(virtualBackgroundColorRed, virtualBackgroundColorGreen, virtualBackgroundColorBlue);

Parameters
ParameterDescriptionDefault
virtualBackgroundColorRedInteger, OptionalReplacement background red component (0–255).255
virtualBackgroundColorGreenInteger, OptionalReplacement background green component (0–255).255
virtualBackgroundColorBlueInteger, OptionalReplacement background blue component (0–255).255
Return Value

Boolean — True if background removal succeeded; otherwise False.

Example Code
let success = Action.AIBackgroundRemovalPortrait(255, 255, 255);
5. Action.AIBackgroundRemovalSelfie(virtualBackgroundColorRed, virtualBackgroundColorGreen, virtualBackgroundColorBlue) Returns: Boolean
▶
Description

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

Syntax

let result = Action.AIBackgroundRemovalSelfie(virtualBackgroundColorRed, virtualBackgroundColorGreen, virtualBackgroundColorBlue);

Parameters
ParameterDescriptionDefault
virtualBackgroundColorRedInteger, OptionalReplacement background red component (0–255).255
virtualBackgroundColorGreenInteger, OptionalReplacement background green component (0–255).255
virtualBackgroundColorBlueInteger, OptionalReplacement background blue component (0–255).255
Return Value

Boolean — True if background removal succeeded; otherwise False.

Example Code
let success = Action.AIBackgroundRemovalSelfie(255, 255, 255);
6. Action.AIBinarizationSegmentation() Returns: Boolean
▶
Description

Segments cells or nuclei in an image and binarizes them using the StarDist AI model.

Syntax

let result = Action.AIBinarizationSegmentation();

Return Value

Boolean — True if StarDist segmentation and binarization succeeded; otherwise False.

Example Code
let success = Action.AIBinarizationSegmentationStarDist();
7. Action.AICustomBinarization(targetModelName) Returns: Boolean
▶
Description

Binarizes the image using a selected custom ONNX model.

Syntax

let result = Action.AICustomBinarization(targetModelName);

Parameters
ParameterDescriptionDefault
targetModelNameString, OptionalModel name to use; an empty string selects the default model.""
Return Value

Boolean — True if binarization succeeded; otherwise False.

Example Code
let success = Action.AICustomBinarization("");
8. Action.AIDepthEstimation(autoResizeLargeImages) Returns: Boolean
▶
Description

Estimates an image depth map using an AI model.

Syntax

let result = Action.AIDepthEstimation(autoResizeLargeImages);

Parameters
ParameterDescriptionDefault
autoResizeLargeImagesBoolean, OptionalWhether to resize large images before inference.True
Return Value

Boolean — True if depth estimation succeeded; otherwise False.

Example Code
let success = Action.AIDepthEstimation(true);
9. Action.AIDocumentUnwarping() Returns: Boolean
▶
Description

Straightens and unwarps a perspective-distorted document image.

Syntax

let result = Action.AIDocumentUnwarping();

Return Value

Boolean — True if document unwarping succeeded; otherwise False.

Example Code
let success = Action.AIDocumentUnwarping();
10. Action.AIFaceDetection(confidenceThreshold, nmsThreshold, enableTiling, useRotatedEllipse, applyToMask, drawBoundingBoxes, showFaceID, showConfidence, showKeypoints, boxColorRed, boxColorGreen, boxColorBlue, exportCSV, csvExportDirectory) Returns: Boolean
▶
Description

Detects faces and 6-point landmarks using an AI model, and optionally applies an ROI selection mask, draws visual overlays, or exports a CSV.

Syntax

let result = Action.AIFaceDetection(confidenceThreshold, nmsThreshold, enableTiling, useRotatedEllipse, applyToMask, drawBoundingBoxes, showFaceID, showConfidence, showKeypoints, boxColorRed, boxColorGreen, boxColorBlue, exportCSV, csvExportDirectory);

Parameters
ParameterDescriptionDefault
confidenceThresholdSingle, OptionalMinimum face detection confidence (0.0–1.0).0.45F
nmsThresholdSingle, OptionalNon-maximum suppression threshold (0.0–1.0).0.4F
enableTilingBoolean, OptionalWhether to process the image in multi-scale tiles for high-res/group photos.True
useRotatedEllipseBoolean, OptionalTrue to use eye-aligned rotated ellipses; False for rectangles.True
applyToMaskBoolean, OptionalTrue to convert detected faces into an active workspace selection mask (AdvSel) for subsequent filtering/blurring.False
drawBoundingBoxesBoolean, OptionalWhether to draw the bounding ROI shape (ellipse or rectangle).True
showFaceIDBoolean, OptionalWhether to display the sequential face ID (#1, #2...).True
showConfidenceBoolean, OptionalWhether to display confidence scores.False
showKeypointsBoolean, OptionalWhether to draw the 6 facial landmarks.True
boxColorRedInteger, OptionalBounding-box red component (0–255).255
boxColorGreenInteger, OptionalBounding-box green component (0–255).0
boxColorBlueInteger, OptionalBounding-box blue component (0–255).0
exportCSVBoolean, OptionalWhether to export face ROI and 6-keypoint coordinates as CSV.False
csvExportDirectoryString, OptionalDirectory for CSV output; empty uses the source image folder.""
Return Value

Boolean — True if face detection completed; otherwise False.

Example Code
let success = Action.AIFaceDetection(0.45F, 0.4F, true, true, false, true, true, false, true, 255, 0, 0, false, "");
11. Action.AIImageQualityRestorationFast(restorationBoostFactor) Returns: Boolean
▶
Description

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

Syntax

let result = Action.AIImageQualityRestorationFast(restorationBoostFactor);

Parameters
ParameterDescriptionDefault
restorationBoostFactorSingle, OptionalRestoration boost factor.1.0F
Return Value

Boolean — True if restoration succeeded; otherwise False.

Example Code
let success = Action.AIImageQualityRestorationFast(1.0F);
12. Action.AIImageQualityRestorationFastest() Returns: Boolean
▶
Description

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

Syntax

let result = Action.AIImageQualityRestorationFastest();

Return Value

Boolean — True if restoration succeeded; otherwise False.

Example Code
let success = Action.AIImageQualityRestorationFastest();
13. Action.AIImageQualityRestorationSlow() Returns: Boolean
▶
Description

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

Syntax

let result = Action.AIImageQualityRestorationSlow();

Return Value

Boolean — True if restoration succeeded; otherwise False.

Example Code
let success = Action.AIImageQualityRestorationSlow();
14. Action.AIImageQualityRestorationSlowest() Returns: Boolean
▶
Description

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

Syntax

let result = Action.AIImageQualityRestorationSlowest();

Return Value

Boolean — True if restoration succeeded; otherwise False.

Example Code
let success = Action.AIImageQualityRestorationSlowest();
15. Action.AIImageSharpening(sharpenBoostFactor) Returns: Boolean
▶
Description

Sharpens the image using AI enhancement.

Syntax

let result = Action.AIImageSharpening(sharpenBoostFactor);

Parameters
ParameterDescriptionDefault
sharpenBoostFactorSingle, OptionalAI sharpening boost factor.2.5F
Return Value

Boolean — True if sharpening succeeded; otherwise False.

Example Code
let success = Action.AIImageSharpening(2.5F);
16. Action.AIImageUpscaleRealESRFast() Returns: Boolean
▶
Description

Upscales the image using the fast RealESRGAN model variant.

Syntax

let result = Action.AIImageUpscaleRealESRFast();

Return Value

Boolean — True if upscaling succeeded; otherwise False.

Example Code
let success = Action.AIImageUpscaleRealESRFast();
17. Action.AIImageUpscaleRealESRGAN(upscaleMagnificationType) Returns: Boolean
▶
Description

Upscales the image using the RealESRGAN AI model.

Syntax

let result = Action.AIImageUpscaleRealESRGAN(upscaleMagnificationType);

Parameters
ParameterDescriptionDefault
upscaleMagnificationTypeInteger, OptionalInteger representing the upscaling magnification.
Supported upscaleMagnificationType values:
2: 2x
4: 4x
8: 8x
4
Return Value

Boolean — True if upscaling succeeded; otherwise False.

Example Code
let success = Action.AIImageUpscaleRealESRGAN(4);
18. Action.AIInpainting() Returns: Boolean
▶
Description

Removes unwanted image content using AI inpainting.

Syntax

let result = Action.AIInpainting();

Return Value

Boolean — True if inpainting succeeded; otherwise False.

Example Code
let success = Action.AIInpainting();
19. Action.AIMotionDeblur() Returns: Boolean
▶
Description

Removes motion blur and restores sharpness in an image using deep learning.

Syntax

let result = Action.AIMotionDeblur();

Return Value

Boolean — True if motion deblurring succeeded; otherwise False.

Example Code
let success = Action.AIMotionDeblur();
20. Action.AIObjectDetection(confidenceThreshold, nmsThreshold, enableTiling, targetClasses, drawBoundingBoxes, showConfidence, boxColorRed, boxColorGreen, boxColorBlue, exportCSV, csvExportDirectory) Returns: Boolean
▶
Description

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

Syntax

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

Parameters
ParameterDescriptionDefault
confidenceThresholdSingle, OptionalMinimum detection confidence.0.5F
nmsThresholdSingle, OptionalNon-maximum suppression threshold.0.5F
enableTilingBoolean, OptionalWhether to process the image in tiles.False
targetClassesString, OptionalComma-separated target class names; empty selects all classes.""
drawBoundingBoxesBoolean, OptionalWhether to draw detected bounding boxes.True
showConfidenceBoolean, OptionalWhether to show confidence values with boxes.True
boxColorRedInteger, OptionalBounding-box red component (0–255).255
boxColorGreenInteger, OptionalBounding-box green component (0–255).0
boxColorBlueInteger, OptionalBounding-box blue component (0–255).0
exportCSVBoolean, OptionalWhether to export detection results as CSV.False
csvExportDirectoryString, OptionalDirectory for CSV output.""
Return Value

Boolean — True if detection completed; otherwise False.

Example Code
let success = Action.AIObjectDetection(0.5F, 0.4F, false, "", true, true, 255, 0, 0, false, "");
21. Action.AIOverExposureCorrection() Returns: Boolean
▶
Description

Restores details in an overexposed image using an AI model.

Syntax

let result = Action.AIOverExposureCorrection();

Return Value

Boolean — True if correction succeeded; otherwise False.

Example Code
let success = Action.AIOverExposureCorrection();
22. Action.AISmartSelection() Returns: Boolean
▶
Description

Creates an intelligent selection using image content analysis.

Syntax

let result = Action.AISmartSelection();

Return Value

Boolean — True if the selection was created; otherwise False.

Example Code
let success = Action.AISmartSelection();
23. Action.AIUnderExposureCorrection() Returns: Boolean
▶
Description

Restores details in an underexposed image using an AI model.

Syntax

let result = Action.AIUnderExposureCorrection();

Return Value

Boolean — True if correction succeeded; otherwise False.

Example Code
let success = Action.AIUnderExposureCorrection();
Processing & Morphological Actions 22 functions
▶
1. Action.AdaptiveThresholding(adaptiveBoxSize, adaptiveThresholdLevel, isObjectColorAutomatic, manualObjectColorType) Returns: Boolean
▶
Description

Applies adaptive thresholding to images with varying illumination.

Syntax

let result = Action.AdaptiveThresholding(adaptiveBoxSize, adaptiveThresholdLevel, isObjectColorAutomatic, manualObjectColorType);

Parameters
ParameterDescriptionDefault
adaptiveBoxSizeInteger, OptionalBox size used for local threshold calculation.80
adaptiveThresholdLevelInteger, OptionalThreshold tuning level.86
isObjectColorAutomaticBoolean, OptionalWhether to detect object color automatically.True
manualObjectColorTypeInteger, OptionalInteger representing the manual object color.
Supported manualObjectColorType values (used when automatic detection is disabled):
0: White
1: Black
0
Return Value

Boolean — True if thresholding succeeded; otherwise False.

Example Code
let success = Action.AdaptiveThresholding(100, 90, false, 1);
2. Action.BinaryOperation(logicalOperationType, firstImageSourceLocation, secondImageSourceLocation) Returns: Boolean
▶
Description

Performs a logical operation between two workspace or buffer images.

Syntax

let result = Action.BinaryOperation(logicalOperationType, firstImageSourceLocation, secondImageSourceLocation);

Parameters
ParameterDescriptionDefault
logicalOperationTypeInteger, OptionalInteger representing the binary logical operation.
Supported logicalOperationType values:
0: AND
1: OR
2: XOR
0
firstImageSourceLocationInteger, OptionalFirst image source index.0
secondImageSourceLocationInteger, OptionalSecond image source index.1
Return Value

Boolean — True if the operation succeeded; otherwise False.

Example Code
let success = Action.BinaryOperation(0, 0, 1);
3. Action.BoundaryDetection(boundaryOverlayModeType) Returns: Boolean
▶
Description

Detects object boundaries using the selected overlay mode.

Syntax

let result = Action.BoundaryDetection(boundaryOverlayModeType);

Parameters
ParameterDescriptionDefault
boundaryOverlayModeTypeInteger, OptionalInteger 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 — True if boundary detection succeeded; otherwise False.

Example Code
let success = Action.BoundaryDetection(0);
4. Action.CannyEdge(cannyHighThreshold) Returns: Boolean
▶
Description

Detects edges using the Canny algorithm.

Syntax

let result = Action.CannyEdge(cannyHighThreshold);

Parameters
ParameterDescriptionDefault
cannyHighThresholdInteger, OptionalHigh threshold used by the Canny detector.100
Return Value

Boolean — True if detection succeeded; otherwise False.

Example Code
let success = Action.CannyEdge(100);
5. Action.ChangeNonBlackToWhite() Returns: Boolean
▶
Description

Converts every non-black pixel to white.

Syntax

let result = Action.ChangeNonBlackToWhite();

Return Value

Boolean — True if conversion succeeded; otherwise False.

Example Code
let success = Action.ChangeNonBlackToWhite();
6. Action.DifferentialImage(firstImageSourceLocation, secondImageSourceLocation) Returns: Boolean
▶
Description

Computes the difference between two workspace or buffer images.

Syntax

let result = Action.DifferentialImage(firstImageSourceLocation, secondImageSourceLocation);

Parameters
ParameterDescriptionDefault
firstImageSourceLocationInteger, OptionalFirst image source index.0
secondImageSourceLocationInteger, OptionalSecond image source index.1
Return Value

Boolean — True if the difference image was created; otherwise False.

Example Code
let success = Action.DifferentialImage(0, 1);
7. Action.Dilate(morphologyKernelSize) Returns: Boolean
▶
Description

Applies morphological dilation to expand foreground objects.

Syntax

let result = Action.Dilate(morphologyKernelSize);

Parameters
ParameterDescriptionDefault
morphologyKernelSizeInteger, OptionalMorphological kernel size.3
Return Value

Boolean — True if dilation was applied; otherwise False.

Example Code
let success = Action.Dilate(3);
8. Action.DilateOutline() Returns: Boolean
▶
Description

Dilates traced outlines to make them thicker.

Syntax

let result = Action.DilateOutline();

Return Value

Boolean — True if outlines were dilated; otherwise False.

Example Code
let success = Action.DilateOutline();
9. Action.DrawSelectionBorder(borderColorRed, borderColorGreen, borderColorBlue, borderThicknessPixels, borderOpacityPercentage, applyToMultipleROIs) Returns: Boolean
▶
Description

Draws a colored border around the selected region or ROIs.

Syntax

let result = Action.DrawSelectionBorder(borderColorRed, borderColorGreen, borderColorBlue, borderThicknessPixels, borderOpacityPercentage, applyToMultipleROIs);

Parameters
ParameterDescriptionDefault
borderColorRedInteger, OptionalBorder red component (0–255).0
borderColorGreenInteger, OptionalBorder green component (0–255).0
borderColorBlueInteger, OptionalBorder blue component (0–255).0
borderThicknessPixelsInteger, OptionalBorder thickness in pixels.1
borderOpacityPercentageInteger, OptionalBorder opacity percentage.100
applyToMultipleROIsBoolean, OptionalWhether to apply to multiple ROIs.False
Return Value

Boolean — True if the border was drawn; otherwise False.

Example Code
let success = Action.DrawSelectionBorder(0, 0, 0, 1, 100, false);
10. Action.EdgeDetection(edgeDetectionAlgorithmType) Returns: Boolean
▶
Description

Detects image edges using the selected algorithm.

Syntax

let result = Action.EdgeDetection(edgeDetectionAlgorithmType);

Parameters
ParameterDescriptionDefault
edgeDetectionAlgorithmTypeInteger, OptionalInteger representing the edge detection algorithm.
Supported edgeDetectionAlgorithmType values:
0: Homogeneity
1: Sobel
2: LeftHand
3: UpperLeftHand
0
Return Value

Boolean — True if detection succeeded; otherwise False.

Example Code
let success = Action.EdgeDetection(0);
11. Action.Erode(morphologyKernelSize) Returns: Boolean
▶
Description

Applies morphological erosion to shrink foreground objects.

Syntax

let result = Action.Erode(morphologyKernelSize);

Parameters
ParameterDescriptionDefault
morphologyKernelSizeInteger, OptionalMorphological kernel size.3
Return Value

Boolean — True if erosion was applied; otherwise False.

Example Code
let success = Action.Erode(3);
12. Action.ErodeOutline() Returns: Boolean
▶
Description

Erodes traced outlines to make them thinner.

Syntax

let result = Action.ErodeOutline();

Return Value

Boolean — True if outlines were eroded; otherwise False.

Example Code
let success = Action.ErodeOutline();
13. Action.FillRegion(fillRegionType, fillColorRed, fillColorGreen, fillColorBlue, fillOpacityPercentage) Returns: Boolean
▶
Description

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

Syntax

let result = Action.FillRegion(fillRegionType, fillColorRed, fillColorGreen, fillColorBlue, fillOpacityPercentage);

Parameters
ParameterDescriptionDefault
fillRegionTypeInteger, OptionalInteger representing the fill target.
Supported fillRegionType values:
0: Inside - fill inside the region
1: Outside - fill outside the region
0
fillColorRedInteger, OptionalFill color red component (0–255).0
fillColorGreenInteger, OptionalFill color green component (0–255).0
fillColorBlueInteger, OptionalFill color blue component (0–255).0
fillOpacityPercentageInteger, OptionalFill opacity percentage.100
Return Value

Boolean — True if the region was filled; otherwise False.

Example Code
let success = Action.FillRegion(0, 0, 0, 0, 100);
14. Action.HideOutlines(targetColorRed, targetColorGreen, targetColorBlue, useMostFrequentColor, repeatCount) Returns: Boolean
▶
Description

Hides object outlines using a specified or most frequent color.

Syntax

let result = Action.HideOutlines(targetColorRed, targetColorGreen, targetColorBlue, useMostFrequentColor, repeatCount);

Parameters
ParameterDescriptionDefault
targetColorRedInteger, OptionalReplacement red component (0–255).255
targetColorGreenInteger, OptionalReplacement green component (0–255).255
targetColorBlueInteger, OptionalReplacement blue component (0–255).255
useMostFrequentColorBoolean, OptionalWhether to use the most frequent image color instead.True
repeatCountInteger, OptionalNumber of iterations to repeat the outline hiding process (1–50).1
Return Value

Boolean — True if outlines were hidden; otherwise False.

Example Code
let success = Action.HideOutlines(255, 255, 255, true, 3);
15. Action.ManualThresholding(binarizationThresholdValue) Returns: Boolean
▶
Description

Converts the image to binary using a manual intensity threshold.

Syntax

let result = Action.ManualThresholding(binarizationThresholdValue);

Parameters
ParameterDescriptionDefault
binarizationThresholdValueInteger, OptionalThreshold intensity.128
Return Value

Boolean — True if binarization succeeded; otherwise False.

Example Code
let success = Action.ManualThresholding(128);
16. Action.MultiStepThresholding(redChannelLevels, greenChannelLevels, blueChannelLevels) Returns: Boolean
▶
Description

Applies multilevel thresholding independently to RGB channels.

Syntax

let result = Action.MultiStepThresholding(redChannelLevels, greenChannelLevels, blueChannelLevels);

Parameters
ParameterDescriptionDefault
redChannelLevelsInteger, OptionalNumber of red-channel intensity levels.5
greenChannelLevelsInteger, OptionalNumber of green-channel intensity levels.5
blueChannelLevelsInteger, OptionalNumber of blue-channel intensity levels.5
Return Value

Boolean — True if thresholding succeeded; otherwise False.

Example Code
let success = Action.MultiStepThresholding(5, 5, 5);
17. Action.Outline(isInverted, applyBinarization) Returns: Boolean
▶
Description

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

Syntax

let result = Action.Outline(isInverted, applyBinarization);

Parameters
ParameterDescriptionDefault
isInvertedBoolean, OptionalWhether to invert the binarization or background result before extracting outlines (dark objects on a light background).False
applyBinarizationBoolean, OptionalWhether 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 — True if outlines were traced; otherwise False.

Example Code
let success = Action.Outline(false, false);
18. Action.RegionColoring(connectivity) Returns: Boolean
▶
Description

Colors connected image regions to distinguish them.

Syntax

let result = Action.RegionColoring(connectivity);

Parameters
ParameterDescriptionDefault
connectivityInteger, OptionalInteger 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 — True if the regions were colored; otherwise False.

Example Code
let success = Action.RegionColoring(8);
19. Action.RemoveDots(dotMode, maxDotSize, connectivity) Returns: Boolean
▶
Description

Removes small connected components from a binary image.

Syntax

let result = Action.RemoveDots(dotMode, maxDotSize, connectivity);

Parameters
ParameterDescriptionDefault
dotModeIntegerInteger 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
—
maxDotSizeIntegerMaximum component area in pixels to remove.—
connectivityInteger, OptionalInteger 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 — True if dot removal succeeded; otherwise False.

Example Code
let success = Action.RemoveDots(2, 20, 8);
20. Action.Skeletonize(isExtended, isInverted, minBranchLength, tailLength) Returns: Boolean
▶
Description

Reduces binary objects to one-pixel-wide skeletons.

Syntax

let result = Action.Skeletonize(isExtended, isInverted, minBranchLength, tailLength);

Parameters
ParameterDescriptionDefault
isExtendedBoolean, OptionalWhether to use extended skeleton processing.True
isInvertedBoolean, OptionalWhether to invert the binary image before processing.False
minBranchLengthInteger, OptionalMinimum branch length to retain.15
tailLengthInteger, OptionalTail length setting for skeleton processing.10
Return Value

Boolean — True if skeletonization succeeded; otherwise False.

Example Code
let success = Action.Skeletonize(true, false, 15, 10);
21. Action.SuperPixelSegmentation(numSuperpixels, compactness, fillWithWhite) Returns: Boolean
▶
Description

Segments the image into superpixels.

Syntax

let result = Action.SuperPixelSegmentation(numSuperpixels, compactness, fillWithWhite);

Parameters
ParameterDescriptionDefault
numSuperpixelsInteger, OptionalRequested number of superpixels.400
compactnessSingle, OptionalSuperpixel compactness factor.30.0F
fillWithWhiteBoolean, OptionalWhether to fill superpixel regions with white.False
Return Value

Boolean — True if segmentation succeeded; otherwise False.

Example Code
let success = Action.SuperPixelSegmentation(400, 30.0F, false);
22. Action.WatershedSegmentation(minDistanceThreshold, smoothingRadius, boundaryThickness, boundaryColorRed, boundaryColorGreen, boundaryColorBlue) Returns: Boolean
▶
Description

Segments touching objects using watershed separation.

Syntax

let result = Action.WatershedSegmentation(minDistanceThreshold, smoothingRadius, boundaryThickness, boundaryColorRed, boundaryColorGreen, boundaryColorBlue);

Parameters
ParameterDescriptionDefault
minDistanceThresholdInteger, OptionalMinimum distance threshold between object centers.10
smoothingRadiusInteger, OptionalPre-segmentation smoothing radius.3
boundaryThicknessInteger, OptionalBoundary thickness in pixels.1
boundaryColorRedInteger, OptionalBoundary red component (0–255).255
boundaryColorGreenInteger, OptionalBoundary green component (0–255).0
boundaryColorBlueInteger, OptionalBoundary blue component (0–255).0
Return Value

Boolean — True if segmentation succeeded; otherwise False.

Example Code
let success = Action.WatershedSegmentation(10, 3, 1, 255, 0, 0);
System & Workspace Actions 8 functions
▶
1. Action.ActivateUndoEngine() Returns: Void
▶
Description

Activates undo tracking for workspace operations.

Syntax

Action.ActivateUndoEngine();

Return Value

Void — Void.

Example Code
Action.ActivateUndoEngine();
2. Action.DeactivateUndoEngine() Returns: Void
▶
Description

Deactivates undo tracking for workspace operations.

Syntax

Action.DeactivateUndoEngine();

Return Value

Void — Void.

Example Code
Action.DeactivateUndoEngine();
3. Action.GetImage(sourceLocation) Returns: Bitmap
▶
Description

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

Syntax

let result = Action.GetImage(sourceLocation);

Parameters
ParameterDescriptionDefault
sourceLocationInteger, Optional0 selects the workspace; 1–10 selects a buffer.0
Return Value

Bitmap — Bitmap clone, or Nothing when unavailable or export is not allowed.

Example Code
let bitmap = Action.GetImage(0);
4. Action.SaveImage(sourceBitmap, destFileName, jpegQuality) Returns: String
▶
Description

Saves a bitmap image to the specified file path.

Syntax

let result = Action.SaveImage(sourceBitmap, destFileName, jpegQuality);

Parameters
ParameterDescriptionDefault
sourceBitmapBitmapBitmap to save.—
destFileNameStringDestination file path.—
jpegQualityInteger, OptionalJPEG quality from 0 to 100.90
Return Value

String — String containing the save result or an error message.

Example Code
let message = Action.SaveImage(bitmap, "C:\Images\result.jpg", 90);
5. Action.SaveImageDialog(targetBitmap, selectedExtension, selectedQuality) Returns: Void
▶
Description

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

Syntax

Action.SaveImageDialog(targetBitmap, selectedExtension, selectedQuality);

Parameters
ParameterDescriptionDefault
targetBitmapBitmapBitmap to save.—
selectedExtensionStringSelected file extension.—
selectedQualityIntegerJPEG quality setting.—
Return Value

Void — Void. Throws an exception if export is not allowed.

Example Code
Action.SaveImageDialog(bitmap, ".jpg", 90);
6. Action.SaveWorkspaceAs() Returns: Void
▶
Description

Saves the current workspace with a new name.

Syntax

Action.SaveWorkspaceAs();

Return Value

Void — Void. Throws an exception if export is not allowed.

Example Code
Action.SaveWorkspaceAs();
7. Action.SaveWorkspaceSelectionAs() Returns: Void
▶
Description

Saves the current workspace selection as a new file.

Syntax

Action.SaveWorkspaceSelectionAs();

Return Value

Void — Void. Throws an exception if export is not allowed.

Example Code
Action.SaveWorkspaceSelectionAs();
8. Action.SetImage(newImage, targetLocation) Returns: Boolean
▶
Description

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

Syntax

let result = Action.SetImage(newImage, targetLocation);

Parameters
ParameterDescriptionDefault
newImageBitmapImage to assign.—
targetLocationInteger, Optional0 selects the workspace; 1–10 selects a buffer.0
Return Value

Boolean — True when the image is assigned; otherwise False.

Example Code
let success = Action.SetImage(bitmap, 0);
2. DNNClassifier (ScriptDNNClassifierHelper) 3 Functions
▶
Class Overview: 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
▶
1. DNNClassifier.GetLastError() Returns: String
▶
Description

Returns the most recent error message produced by the helper.

Syntax

let result = DNNClassifier.GetLastError();

Return Value

String — The last error message, or an empty string when no error is recorded.

Example Code
let errorMessage = DNNClassifier.GetLastError();
2. DNNClassifier.LoadModel(modelFilename, forceReload) Returns: Boolean
▶
Description

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

Syntax

let result = DNNClassifier.LoadModel(modelFilename, forceReload);

Parameters
ParameterDescriptionDefault
modelFilenameStringModel ZIP file name.—
forceReloadBoolean, OptionalWhether to reload the model when the same model is already loaded.False
Return Value

Boolean — True when the model is loaded or already loaded; otherwise False.

Example Code
let loaded = DNNClassifier.LoadModel("model.zip", true);
3. DNNClassifier.Predict(img) Returns: String
▶
Description

Predicts the class label for the supplied bitmap image.

Syntax

let result = DNNClassifier.Predict(img);

Parameters
ParameterDescriptionDefault
imgBitmapImage to classify.—
Return Value

String — Predicted class label, or an empty string if prediction fails.

Example Code
let label = DNNClassifier.Predict(bitmap);
3. FaceDetector (ScriptFaceDetectorHelper) 12 Functions
▶
Neural & AI Processing Actions 12 functions
▶
1. FaceDetector.ApplyFaceMaskToWorkspace(useRotatedEllipse, scaleExpand) Returns: Boolean
▶
Description

Applies the detected face regions directly to the active workspace selection mask (AdvSel).

Syntax

let result = FaceDetector.ApplyFaceMaskToWorkspace(useRotatedEllipse, scaleExpand);

Parameters
ParameterDescriptionDefault
useRotatedEllipseBoolean, OptionalTrue to use rotated elliptical masks; False for rectangular masks.True
scaleExpandDouble, OptionalExpansion scale factor for face ROI coverage.1.08
Return Value

Boolean — True if the face mask was successfully applied to the workspace selection; otherwise False.

Example Code
let ok = FaceDetector.ApplyFaceMaskToWorkspace(true, 1.08);
2. FaceDetector.Detect(img, confThreshold, nmsThreshold, useTiling) Returns: Integer
▶
Description

Detects faces and 6-point facial landmarks in an image and stores the detection results.

Syntax

let result = FaceDetector.Detect(img, confThreshold, nmsThreshold, useTiling);

Parameters
ParameterDescriptionDefault
imgBitmapImage to analyze.—
confThresholdDouble, OptionalMinimum confidence threshold.0.45
nmsThresholdDouble, OptionalNon-maximum suppression threshold.0.4
useTilingBoolean, OptionalWhether to use multi-scale tiled inference for high-res/group images.True
Return Value

Integer — Number of detected faces, or 0 if detection fails.

Example Code
let count = FaceDetector.Detect(bitmap, 0.45, 0.4, true);
3. FaceDetector.GetAllResults() Returns: ONNX_FaceDetection.FaceDetectionResult()
▶
Description

Returns all face detection results from the most recent detection.

Syntax

let result = FaceDetector.GetAllResults();

Return Value

ONNX_FaceDetection.FaceDetectionResult() — Array of face detection results, or an empty array when no results are available.

Example Code
let results = FaceDetector.GetAllResults();
4. FaceDetector.GetFaceCount() Returns: Integer
▶
Description

Returns the total number of faces from the most recent detection.

Syntax

let result = FaceDetector.GetFaceCount();

Return Value

Integer — Number of detected faces.

Example Code
let count = FaceDetector.GetFaceCount();
5. FaceDetector.GetFaceKeypoints(faceIndex) Returns: PointF()
▶
Description

Returns the 6 facial keypoints (0:LeftEye, 1:RightEye, 2:NoseTip, 3:MouthCenter, 4:LeftEar, 5:RightEar) for a specific 0-based face index.

Syntax

let result = FaceDetector.GetFaceKeypoints(faceIndex);

Parameters
ParameterDescriptionDefault
faceIndexIntegerZero-based index of the detected face.—
Return Value

PointF() — Array of 6 PointF coordinates, or an empty array if the index is out of range.

Example Code
let kps = FaceDetector.GetFaceKeypoints(0);
6. FaceDetector.GetFaceLocations() Returns: RectangleF()
▶
Description

Returns bounding rectangles for all detected faces.

Syntax

let result = FaceDetector.GetFaceLocations();

Return Value

RectangleF() — Array of bounding rectangles (RectangleF) for all detected faces.

Example Code
let locations = FaceDetector.GetFaceLocations();
7. FaceDetector.GetFaceMaskImage(img, useRotatedEllipse, scaleExpand) Returns: Bitmap
▶
Description

Generates a strict binary mask bitmap (White = Detected Faces, Black = Background) from the most recent detection results.

Syntax

let result = FaceDetector.GetFaceMaskImage(img, useRotatedEllipse, scaleExpand);

Parameters
ParameterDescriptionDefault
imgBitmapSource image used to match dimensions and resolution.—
useRotatedEllipseBoolean, OptionalTrue to draw rotated ellipses aligned with eye tilt; False for rectangles.True
scaleExpandDouble, OptionalExpansion scale factor for face ROI coverage.1.08
Return Value

Bitmap — Binary mask bitmap (24bppRgb), or Nothing if generation fails.

Example Code
let maskBmp = FaceDetector.GetFaceMaskImage(bitmap, true, 1.08);
8. FaceDetector.GetFaceRollAngle(faceIndex) Returns: Single
▶
Description

Returns the head tilt (roll) angle in degrees for a specific 0-based face index.

Syntax

let result = FaceDetector.GetFaceRollAngle(faceIndex);

Parameters
ParameterDescriptionDefault
faceIndexIntegerZero-based index of the detected face.—
Return Value

Single — Head tilt angle in degrees, or 0.0 if the index is out of range.

Example Code
let tilt = FaceDetector.GetFaceRollAngle(0);
9. FaceDetector.GetLastError() Returns: String
▶
Description

Returns the most recent error message produced by the helper.

Syntax

let result = FaceDetector.GetLastError();

Return Value

String — The last error message, or an empty string when no error is recorded.

Example Code
let errorMessage = FaceDetector.GetLastError();
10. FaceDetector.GetRenderedImage(img, showBoundingBox, showFaceId, showConfidence, showKeypoints, useRotatedEllipse, colorName) Returns: Bitmap
▶
Description

Returns a copy of the image rendered with independent options for face ROI, ID, confidence, and 6 keypoints.

Syntax

let result = FaceDetector.GetRenderedImage(img, showBoundingBox, showFaceId, showConfidence, showKeypoints, useRotatedEllipse, colorName);

Parameters
ParameterDescriptionDefault
imgBitmapSource image to render.—
showBoundingBoxBoolean, OptionalWhether to draw the bounding ROI shape.True
showFaceIdBoolean, OptionalWhether to display the face ID number (#1, #2...).True
showConfidenceBoolean, OptionalWhether to display confidence values.True
showKeypointsBoolean, OptionalWhether to draw the 6 facial keypoints.True
useRotatedEllipseBoolean, OptionalTrue to draw rotated ellipses; False for rectangles.True
colorNameString, OptionalKnown .NET color name for ROI boxes."Red"
Return Value

Bitmap — Rendered bitmap, or Nothing if rendering fails.

Example Code
let rendered = FaceDetector.GetRenderedImage(bitmap, true, true, true, true, true, "Red");
11. FaceDetector.HasFaces() Returns: Boolean
▶
Description

Checks whether at least one face was detected in the most recent analysis.

Syntax

let result = FaceDetector.HasFaces();

Return Value

Boolean — True if one or more faces were detected; otherwise False.

Example Code
let found = FaceDetector.HasFaces();
12. FaceDetector.Initialize() Returns: Boolean
▶
Description

Initializes the BlazeFace detector with its default model and settings.

Syntax

let result = FaceDetector.Initialize();

Return Value

Boolean — True when the detector is initialized or already available; otherwise False.

Example Code
let ready = FaceDetector.Initialize();
4. ImgProc (ScriptImgProcHelper) 271 Functions
▶
Color & Channel Actions 69 functions
▶
1. ImgProc.ARGBToARGBInteger(_AlphaValue, _RedValue, _GreenValue, _BlueValue) Returns: Integer
▶
Description

Converts ARGB values to integer.

Syntax

let result = ImgProc.ARGBToARGBInteger(_AlphaValue, _RedValue, _GreenValue, _BlueValue);

Parameters
ParameterDescriptionDefault
_AlphaValueIntegerAlpha channel value (0-255).—
_RedValueIntegerRed channel value (0-255).—
_GreenValueIntegerGreen channel value (0-255).—
_BlueValueIntegerBlue channel value (0-255).—
Return Value

Integer — ARGB color as integer, or 0 if conversion fails.

Example Code
let color = ImgProc.ARGBToARGBInteger(255, 255, 0, 0);
2. ImgProc.ARGBToColor(AlphaInByte, RedInByte, GreenInByte, BlueInByte) Returns: Color
▶
Description

Converts ARGB bytes to Color object.

Syntax

let result = ImgProc.ARGBToColor(AlphaInByte, RedInByte, GreenInByte, BlueInByte);

Parameters
ParameterDescriptionDefault
AlphaInByteIntegerAlpha channel value (0-255).—
RedInByteIntegerRed channel value (0-255).—
GreenInByteIntegerGreen channel value (0-255).—
BlueInByteIntegerBlue channel value (0-255).—
Return Value

Color — Color object, or default color if conversion fails.

Example Code
let clr = ImgProc.ARGBToColor(255, 255, 0, 0);
3. ImgProc.Change_Color(SourceImage, ColorOfInterest_RGBInt, ChangeToR, ChangeToG, ChangeToB, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Changes specified color to new color throughout image.

Syntax

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

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to modify.
Type: Bitmap; required; passed by reference.
—
ColorOfInterest_RGBIntIntegerRGB color to replace.—
ChangeToRByteNew red channel value.—
ChangeToGByteNew green channel value.—
ChangeToBByteNew blue channel value.—
IsShowProgressBoolean, OptionalWhether to show progress.True
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Modified image, or Nothing if operation fails.

Example Code
let modified = ImgProc.Change_Color(bitmap, RGB(255,0,0), 0, 255, 0);
4. ImgProc.Change_Color_ByRGB(SourceImage, ColorOfInterestR, ColorOfInterestG, ColorOfInterestB, ChangeToR, ChangeToG, ChangeToB, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Changes specified RGB color to new RGB color.

Syntax

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

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to modify.
Type: Bitmap; required; passed by reference.
—
ColorOfInterestRByteRed channel of color to replace.—
ColorOfInterestGByteGreen channel of color to replace.—
ColorOfInterestBByteBlue channel of color to replace.—
ChangeToRByteNew red channel value.—
ChangeToGByteNew green channel value.—
ChangeToBByteNew blue channel value.—
IsShowProgressBoolean, OptionalWhether to show progress.True
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Modified image, or Nothing if operation fails.

Example Code
let modified = ImgProc.Change_Color_ByRGB(bitmap, 255, 0, 0, 0, 255, 0);
5. ImgProc.Check_RGBInTextBox(Text_R, Text_G, Text_B) Returns: Void
▶
Description

Validates RGB values in text boxes.

Syntax

ImgProc.Check_RGBInTextBox(Text_R, Text_G, Text_B);

Parameters
ParameterDescriptionDefault
Text_RTextBoxTextBox containing red value.—
Text_GTextBoxTextBox containing green value.—
Text_BTextBoxTextBox containing blue value.—
Return Value

Void — None.

Example Code
ImgProc.Check_RGBInTextBox(txtRed, txtGreen, txtBlue);
6. ImgProc.CIELab(original, lShift, aShift, bShift, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

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

Syntax

let result = ImgProc.CIELab(original, lShift, aShift, bShift, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
originalBitmapSource image to convert.—
lShiftIntegerLightness shift (-127 to 127).—
aShiftIntegera channel shift green-to-red (-127 to 127).—
bShiftIntegerb channel shift blue-to-yellow (-127 to 127).—
MaskImageImage, OptionalOptional mask to constrain conversion.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — CIELab-converted image, or Nothing if conversion fails.

Example Code
let cielab = ImgProc.CIELab(bitmap, 0, 10, -10);
7. ImgProc.ColorDeconvolution(SourceImage, StainType, ShowColor, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

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

Syntax

let result = ImgProc.ColorDeconvolution(SourceImage, StainType, ShowColor, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to process.—
StainTypeIntegerInteger 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)
—
ShowColorBooleanWhether to apply pseudo-coloring to the extracted stain result.—
IsShowProgressBoolean, OptionalWhether to show processing progress.True
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Deconvoluted image, or Nothing if operation fails.

Example Code
let deconvoluted = ImgProc.ColorDeconvolution(bitmap, 0, true);
8. ImgProc.ColorHexToColorInteger(ColorHex) Returns: Integer
▶
Description

Converts hexadecimal color string to integer.

Syntax

let result = ImgProc.ColorHexToColorInteger(ColorHex);

Parameters
ParameterDescriptionDefault
ColorHexStringHexadecimal color string (e.g., "#FF0000").
Type: String; required; passed by reference.
—
Return Value

Integer — Integer color value, or 0 if conversion fails.

Example Code
let colorInt = ImgProc.ColorHexToColorInteger("#FF0000");
9. ImgProc.ColorHexToRGB(HexColorStr, R, G, B) Returns: Void
▶
Description

Converts hexadecimal color string to RGB components.

Syntax

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

Parameters
ParameterDescriptionDefault
HexColorStrStringHexadecimal color string (e.g., "#FF0000").—
RByteOutput red component.
Type: Byte; required; passed by reference.
—
GByteOutput green component.
Type: Byte; required; passed by reference.
—
BByteOutput blue component.
Type: Byte; required; passed by reference.
—
Return Value

Void

Example Code
ImgProc.ColorHexToRGB("#FF0000", r, g, b);
10. ImgProc.ColorIntegerToARGB(PixelValue) Returns: Void
▶
Description

Displays ARGB values of a color integer to console output.

Syntax

ImgProc.ColorIntegerToARGB(PixelValue);

Parameters
ParameterDescriptionDefault
PixelValueIntegerColor value as integer.—
Return Value

Void — Void; prints ARGB components to console.

Example Code
ImgProc.ColorIntegerToARGB(4294967295);
11. ImgProc.ColorIntegerToRGB(PixelValue) Returns: Void
▶
Description

Displays RGB values of a color integer to console output.

Syntax

ImgProc.ColorIntegerToRGB(PixelValue);

Parameters
ParameterDescriptionDefault
PixelValueIntegerColor value as integer.—
Return Value

Void — Void; prints RGB components to console.

Example Code
ImgProc.ColorIntegerToRGB(255);
12. ImgProc.ColorIntegerToRGBGHSI(ColorValue, RedValue, GreenValue, BlueValue, GrayValue, HueValue, SaturationValue, IntensityValue) Returns: Void
▶
Description

Decomposes color to ARGB and HSI components.

Syntax

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

Parameters
ParameterDescriptionDefault
ColorValueIntegerInteger color value to decompose.—
RedValueByteOutput red component.
Type: Byte; required; passed by reference.
—
GreenValueByteOutput green component.
Type: Byte; required; passed by reference.
—
BlueValueByteOutput blue component.
Type: Byte; required; passed by reference.
—
GrayValueByteOutput gray component.
Type: Byte; required; passed by reference.
—
HueValueSingleOutput hue component.
Type: Single; required; passed by reference.
—
SaturationValueSingleOutput saturation component.
Type: Single; required; passed by reference.
—
IntensityValueSingleOutput intensity component.
Type: Single; required; passed by reference.
—
Return Value

Void

Example Code
ImgProc.ColorIntegerToRGBGHSI(color, r, g, b, gray, hue, sat, int);
13. ImgProc.ColorRangeSelection(SourceImage, targetR, targetG, targetB, colorSpace, isFastAlgorithm, tolerance, maintainOrgColor, isShowProgress, maskImage, maskRegionBoundary, isMaskAllRegionSelected) Returns: Bitmap
▶
Description

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

Syntax

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

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to process.—
targetRIntegerTarget color red component (0-255).—
targetGIntegerTarget color green component (0-255).—
targetBIntegerTarget color blue component (0-255).—
colorSpaceString, OptionalColor space model ('RGB', 'HSI', 'Lab', or 'Chroma')."RGB"
isFastAlgorithmBoolean, OptionalWhether to use Fast (Manhattan) distance instead of Standard (Euclidean). Ignored when colorSpace is 'Chroma'.False
toleranceInteger, OptionalColor matching tolerance threshold (0-255).40
maintainOrgColorBoolean, OptionalWhether to preserve original pixel colors for matched areas (False converts matched areas to white).True
isShowProgressBoolean, OptionalWhether to report progress events.False
maskImageBitmap, OptionalOptional mask to constrain operation.Nothing
maskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
isMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Processed Bitmap with color range selection applied, or Nothing if processing fails.

Example Code
let selected = ImgProc.ColorRangeSelection(bitmap, 0, 255, 0, "Chroma", false, 40, true);
14. ImgProc.ColorToColorHEX(SourceColor) Returns: String
▶
Description

Converts RGB Color object to hexadecimal string representation.

Syntax

let result = ImgProc.ColorToColorHEX(SourceColor);

Parameters
ParameterDescriptionDefault
SourceColorColorColor object to convert.—
Return Value

String — Hexadecimal color string (e.g., "#FF0000"), or empty string if conversion fails.

Example Code
let hex = ImgProc.ColorToColorHEX(Color.Red);
15. ImgProc.Convert_Gray24Bit_To_8bppIndexed(srcBitmap) Returns: Bitmap
▶
Description

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

Syntax

let result = ImgProc.Convert_Gray24Bit_To_8bppIndexed(srcBitmap);

Parameters
ParameterDescriptionDefault
srcBitmapBitmapSource 24-bit grayscale bitmap.—
Return Value

Bitmap — 8-bit indexed image, or Nothing if conversion fails.

Example Code
let indexed = ImgProc.Convert_Gray24Bit_To_8bppIndexed(bitmap);
16. ImgProc.Convert_To_rgChromaticity(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Converts RGB to rg chromaticity coordinates.

Syntax

let result = ImgProc.Convert_To_rgChromaticity(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to convert.
Type: Bitmap; required; passed by reference.
—
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — rg chromaticity image, or Nothing if conversion fails.

Example Code
let rgChromaticity = ImgProc.Convert_To_rgChromaticity(bitmap);
17. ImgProc.Convert_To_rgChromaticity_Parallel(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Converts RGB to rg chromaticity with parallel processing.

Syntax

let result = ImgProc.Convert_To_rgChromaticity_Parallel(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to convert.
Type: Bitmap; required; passed by reference.
—
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — rg chromaticity image, or Nothing if conversion fails.

Example Code
let rgChromaticity = ImgProc.Convert_To_rgChromaticity_Parallel(bitmap);
18. ImgProc.Delete_BlueChannel(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Removes blue channel from image.

Syntax

let result = ImgProc.Delete_BlueChannel(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to process.—
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Image with blue channel removed, or Nothing if operation fails.

Example Code
let noBlue = ImgProc.Delete_BlueChannel(bitmap);
19. ImgProc.Delete_GreenChannel(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Removes green channel from image.

Syntax

let result = ImgProc.Delete_GreenChannel(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to process.—
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Image with green channel removed, or Nothing if operation fails.

Example Code
let noGreen = ImgProc.Delete_GreenChannel(bitmap);
20. ImgProc.Delete_RedChannel(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Removes red channel from image.

Syntax

let result = ImgProc.Delete_RedChannel(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to process.—
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Image with red channel removed, or Nothing if operation fails.

Example Code
let noRed = ImgProc.Delete_RedChannel(bitmap);
21. ImgProc.Digitalize(ColorChannelValue, LevelCount) Returns: Byte
▶
Description

Quantizes color channel value to discrete levels.

Syntax

let result = ImgProc.Digitalize(ColorChannelValue, LevelCount);

Parameters
ParameterDescriptionDefault
ColorChannelValueSingleColor value to quantize.—
LevelCountIntegerNumber of discrete levels.—
Return Value

Byte — Quantized color value.

Example Code
let quantized = ImgProc.Digitalize(128.5, 8);
22. ImgProc.GrayFrom_Blue(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Extracts blue channel as grayscale image.

Syntax

let result = ImgProc.GrayFrom_Blue(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource color image.
Type: Bitmap; required; passed by reference.
—
MaskImageBitmap, OptionalOptional mask to constrain extraction.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Blue channel as grayscale, or Nothing if extraction fails.

Example Code
let grayBlue = ImgProc.GrayFrom_Blue(bitmap);
23. ImgProc.GrayFrom_Green(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Extracts green channel as grayscale.

Syntax

let result = ImgProc.GrayFrom_Green(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource color image.
Type: Bitmap; required; passed by reference.
—
MaskImageBitmap, OptionalOptional mask to constrain extraction.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Green channel as grayscale, or Nothing if extraction fails.

Example Code
let grayGreen = ImgProc.GrayFrom_Green(bitmap);
24. ImgProc.GrayFrom_Red(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Extracts red channel as grayscale image.

Syntax

let result = ImgProc.GrayFrom_Red(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource color image.
Type: Bitmap; required; passed by reference.
—
MaskImageBitmap, OptionalOptional mask to constrain extraction.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Red channel as grayscale, or Nothing if extraction fails.

Example Code
let grayRed = ImgProc.GrayFrom_Red(bitmap);
25. ImgProc.GrayScaling(SourceImage, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Converts colored image to grayscale using luminosity method.

Syntax

let result = ImgProc.GrayScaling(SourceImage, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to convert.—
IsShowProgressBoolean, OptionalWhether to display progress.True
MaskImageBitmap, OptionalOptional mask to constrain conversion.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Grayscale image, or Nothing if conversion fails.

Example Code
let gray = ImgProc.GrayScaling(bitmap, true);
26. ImgProc.GrayToColor(SourceImage, MapType, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Applies color map to grayscale image for visualization.

Syntax

let result = ImgProc.GrayToColor(SourceImage, MapType, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource grayscale image.—
MapTypeImgProcessing.ColorMapTypeColor 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)
—
MaskImageBitmap, OptionalOptional mask to constrain mapping.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Colorized image, or Nothing if mapping fails.

Example Code
let colored = ImgProc.GrayToColor(grayBitmap, ImgProcessing.ColorMapType.Jet);
27. ImgProc.HexToRGB(HexColorStr, R, G, B) Returns: Void
▶
Description

Converts hexadecimal color string to RGB byte values.

Syntax

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

Parameters
ParameterDescriptionDefault
HexColorStrStringHex color string (e.g., "#FF0000").—
RByteOutput red component (0-255).—
GByteOutput green component (0-255).—
BByteOutput blue component (0-255).—
Return Value

Void — Void; returns RGB values through ByRef parameters.

Example Code
Dim r, g, b As Byte; ImgProc.HexToRGB("#FF0000", r, g, b);
28. ImgProc.Hide_Outlines(SourceImage, TargetColor_R, TargetColor_G, TargetColor_B, IsMostFrequentColor, RepeatCount, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Removes or hides outlines of specified color from image.

Syntax

let result = ImgProc.Hide_Outlines(SourceImage, TargetColor_R, TargetColor_G, TargetColor_B, IsMostFrequentColor, RepeatCount, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to modify.
Type: Bitmap; required; passed by reference.
—
TargetColor_RByteRed channel of outline color.—
TargetColor_GByteGreen channel of outline color.—
TargetColor_BByteBlue channel of outline color.—
IsMostFrequentColorBoolean, OptionalWhether to use most frequent color for replacement.True
RepeatCountInteger, OptionalNumber of iterations to repeat the outline hiding process (1–50).1
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Modified image with hidden outlines, or Nothing if operation fails.

Example Code
let hidden = ImgProc.Hide_Outlines(bitmap, 0, 0, 0, true, 3);
29. ImgProc.HSITORGB(Hue, Saturation255, Intensity255, Red, Green, Blue) Returns: Void
▶
Description

Converts HSI to RGB color space.

Syntax

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

Parameters
ParameterDescriptionDefault
HueIntegerHue value.—
Saturation255SingleSaturation (0-255).—
Intensity255SingleIntensity (0-255).—
RedIntegerOutput red component.
Type: Integer; required; passed by reference.
—
GreenIntegerOutput green component.
Type: Integer; required; passed by reference.
—
BlueIntegerOutput blue component.
Type: Integer; required; passed by reference.
—
Return Value

Void

Example Code
ImgProc.HSITORGB(180, 128, 200, red, green, blue);
30. ImgProc.HSVtoRGB(h, s, v, r, g, b) Returns: Void
▶
Description

Converts HSV to RGB color space.

Syntax

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

Parameters
ParameterDescriptionDefault
hSingleHue value.—
sSingleSaturation value.—
vSingleValue component.—
rByteOutput red component.
Type: Byte; required; passed by reference.
—
gByteOutput green component.
Type: Byte; required; passed by reference.
—
bByteOutput blue component.
Type: Byte; required; passed by reference.
—
Return Value

Void

Example Code
ImgProc.HSVtoRGB(180, 0.5, 0.75, r, g, b);
31. ImgProc.HueSaturationIntensity(original, hueShift, satShift, intShift, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

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

Syntax

let result = ImgProc.HueSaturationIntensity(original, hueShift, satShift, intShift, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
originalBitmapSource image to adjust.—
hueShiftIntegerHue shift (-180 to 180).—
satShiftIntegerSaturation shift (-100 to 100).—
intShiftIntegerIntensity shift (-100 to 100).—
MaskImageImage, OptionalOptional mask to constrain adjustment.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Hue-saturation-intensity adjusted image, or Nothing if processing fails.

Example Code
let hsi = ImgProc.HueSaturationIntensity(bitmap, 30, 20, -10);
32. ImgProc.IsBinaryImage(SourceImage) Returns: Boolean
▶
Description

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

Syntax

let result = ImgProc.IsBinaryImage(SourceImage);

Parameters
ParameterDescriptionDefault
SourceImageBitmapImage to check.—
Return Value

Boolean — True if image is binary, False otherwise.

Example Code
let isBinary = ImgProc.IsBinaryImage(bitmap);
33. ImgProc.IsBWPixel(red, green, blue) Returns: Boolean
▶
Description

Checks if RGB pixel values represent black or white.

Syntax

let result = ImgProc.IsBWPixel(red, green, blue);

Parameters
ParameterDescriptionDefault
redByteRed component (0-255).—
greenByteGreen component (0-255).—
blueByteBlue component (0-255).—
Return Value

Boolean — True if pixel is black or white, False otherwise.

Example Code
let isBW = ImgProc.IsBWPixel(0, 0, 0);
34. ImgProc.IsGrayImage(SourceImage) Returns: Boolean
▶
Description

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

Syntax

let result = ImgProc.IsGrayImage(SourceImage);

Parameters
ParameterDescriptionDefault
SourceImageBitmapImage to check.—
Return Value

Boolean — True if image is grayscale, False otherwise.

Example Code
let isGray = ImgProc.IsGrayImage(bitmap);
35. ImgProc.Maximum(rR, rG, rB) Returns: Single
▶
Description

Returns maximum value among three color components.

Syntax

let result = ImgProc.Maximum(rR, rG, rB);

Parameters
ParameterDescriptionDefault
rRSingleRed component value.—
rGSingleGreen component value.—
rBSingleBlue component value.—
Return Value

Single — Maximum value among the three components.

Example Code
let max = ImgProc.Maximum(255.0, 128.0, 200.0);
36. ImgProc.MergeChannels(SourceImage, ColorSpace, Image1, Image2, Image3, maskImage, maskRegionBoundary, isMaskAllRegionSelected) Returns: Bitmap
▶
Description

Merges three channel images using specified color space.

Syntax

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

Parameters
ParameterDescriptionDefault
SourceImageImageOriginal source image for background preservation.—
ColorSpaceStringTarget color space ('RGB', 'HSI', or 'LAB').—
Image1BitmapFirst channel image.—
Image2BitmapSecond channel image.—
Image3BitmapThird channel image.—
maskImageBitmap, OptionalOptional mask to constrain operation.Nothing
maskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
isMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Merged image in specified color space, or Nothing if merging fails.

Example Code
let merged = ImgProc.MergeChannels(bitmap, "RGB", ch1, ch2, ch3);
37. ImgProc.Minimum(rR, rG, rB) Returns: Single
▶
Description

Returns minimum value among three color components.

Syntax

let result = ImgProc.Minimum(rR, rG, rB);

Parameters
ParameterDescriptionDefault
rRSingleRed component value.—
rGSingleGreen component value.—
rBSingleBlue component value.—
Return Value

Single — Minimum value among the three components.

Example Code
let min = ImgProc.Minimum(255.0, 128.0, 200.0);
38. ImgProc.MultiStepThresholding(SourceImage, LevelCount_Red, LevelCount_Green, LevelCount_Blue, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

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

Syntax

let result = ImgProc.MultiStepThresholding(SourceImage, LevelCount_Red, LevelCount_Green, LevelCount_Blue, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to threshold.—
LevelCount_RedIntegerNumber of quantization levels for red channel.—
LevelCount_GreenIntegerNumber of quantization levels for green channel.—
LevelCount_BlueIntegerNumber of quantization levels for blue channel.—
MaskImageBitmap, OptionalOptional mask to constrain thresholding.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Thresholded image, or Nothing if processing fails.

Example Code
let thresholded = ImgProc.MultiStepThresholding(bitmap, 3, 3, 3);
39. ImgProc.RemoveTransparency(SourceImage) Returns: Bitmap
▶
Description

Removes alpha channel transparency from image.

Syntax

let result = ImgProc.RemoveTransparency(SourceImage);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to process.—
Return Value

Bitmap — Image without transparency, or Nothing if removal fails.

Example Code
let noAlpha = ImgProc.RemoveTransparency(bitmap);
40. ImgProc.RGBToARGBInteger(red, green, blue) Returns: Integer
▶
Description

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

Syntax

let result = ImgProc.RGBToARGBInteger(red, green, blue);

Parameters
ParameterDescriptionDefault
redIntegerRed component (0-255).—
greenIntegerGreen component (0-255).—
blueIntegerBlue component (0-255).—
Return Value

Integer — ARGB integer value, or 0 if conversion fails.

Example Code
let argb = ImgProc.RGBToARGBInteger(255, 128, 64);
41. ImgProc.RGBToCMYK(r, g, b, IsCompute_Cyan, IsCompute_Magenta, IsCompute_Yellow) Returns: Void
▶
Description

Converts RGB to CMYK color space.

Syntax

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

Parameters
ParameterDescriptionDefault
rByteRed component value.—
gByteGreen component value.—
bByteBlue component value.—
IsCompute_CyanBooleanCompute cyan component.—
IsCompute_MagentaBooleanCompute magenta component.—
IsCompute_YellowBooleanCompute yellow component.—
Return Value

Void

Example Code
ImgProc.RGBToCMYK(255, 128, 64, true, true, true);
42. ImgProc.RGBToColor(RedInByte, GreenInByte, BlueInByte) Returns: Color
▶
Description

Converts RGB byte values to Color object.

Syntax

let result = ImgProc.RGBToColor(RedInByte, GreenInByte, BlueInByte);

Parameters
ParameterDescriptionDefault
RedInByteIntegerRed component (0-255).—
GreenInByteIntegerGreen component (0-255).—
BlueInByteIntegerBlue component (0-255).—
Return Value

Color — Color object, or Color.Black if conversion fails.

Example Code
let color = ImgProc.RGBToColor(255, 100, 50);
43. ImgProc.RGBToColorHex(RedValue, GreenValue, BlueValue) Returns: String
▶
Description

Converts RGB values to hexadecimal color string.

Syntax

let result = ImgProc.RGBToColorHex(RedValue, GreenValue, BlueValue);

Parameters
ParameterDescriptionDefault
RedValueIntegerRed component value.—
GreenValueIntegerGreen component value.—
BlueValueIntegerBlue component value.—
Return Value

String — Hexadecimal color string, or empty string if conversion fails.

Example Code
let hexColor = ImgProc.RGBToColorHex(255, 0, 0);
44. ImgProc.RGBToGChromaticity(_RedValue, _GreenValue, _BlueValue) Returns: Void
▶
Description

Converts RGB to green chromaticity coordinate.

Syntax

ImgProc.RGBToGChromaticity(_RedValue, _GreenValue, _BlueValue);

Parameters
ParameterDescriptionDefault
_RedValueIntegerRed channel value.—
_GreenValueIntegerGreen channel value.—
_BlueValueIntegerBlue channel value.—
Return Value

Void — None.

Example Code
ImgProc.RGBToGChromaticity(255, 128, 0);
45. ImgProc.RGBToGChromaticity_Shared(RedValue, GreenValue, BlueValue, RGChromaticity_Red, RGChromaticity_Green, RGChromaticity_Blue) Returns: Void
▶
Description

Converts RGB to rg chromaticity values (shared version).

Syntax

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

Parameters
ParameterDescriptionDefault
RedValueIntegerRed channel value.—
GreenValueIntegerGreen channel value.—
BlueValueIntegerBlue channel value.—
RGChromaticity_RedByteOutput rg chromaticity red value.
Type: Byte; required; passed by reference.
—
RGChromaticity_GreenByteOutput rg chromaticity green value.
Type: Byte; required; passed by reference.
—
RGChromaticity_BlueByteOutput rg chromaticity blue value.
Type: Byte; required; passed by reference.
—
Return Value

Void — None.

Example Code
ImgProc.RGBToGChromaticity_Shared(255, 128, 0, outR, outG, outB);
46. ImgProc.RGBToGray(r, g, b) Returns: Byte
▶
Description

Converts RGB to grayscale byte value using standard formula.

Syntax

let result = ImgProc.RGBToGray(r, g, b);

Parameters
ParameterDescriptionDefault
rIntegerRed component (0-255).—
gIntegerGreen component (0-255).—
bIntegerBlue component (0-255).—
Return Value

Byte — Grayscale byte value (0-255), or 0 if conversion fails.

Example Code
let grayByte = ImgProc.RGBToGray(255, 100, 50);
47. ImgProc.RGBToGray_ByRealCalc(r, g, b) Returns: Integer
▶
Description

Converts RGB to grayscale using precise luminosity calculation.

Syntax

let result = ImgProc.RGBToGray_ByRealCalc(r, g, b);

Parameters
ParameterDescriptionDefault
rIntegerRed component (0-255).—
gIntegerGreen component (0-255).—
bIntegerBlue component (0-255).—
Return Value

Integer — Grayscale value (0-255), or 0 if conversion fails.

Example Code
let grayValue = ImgProc.RGBToGray_ByRealCalc(255, 100, 50);
48. ImgProc.RGBToHSI(r, g, b) Returns: Void
▶
Description

Converts RGB to HSI color space.

Syntax

ImgProc.RGBToHSI(r, g, b);

Parameters
ParameterDescriptionDefault
rByteRed component value.—
gByteGreen component value.—
bByteBlue component value.—
Return Value

Void

Example Code
ImgProc.RGBToHSI(255, 128, 64);
49. ImgProc.RGBToHSI_Parallel(r, g, b, Hue, Saturation, Intensity) Returns: Void
▶
Description

Converts RGB to HSI using parallel method.

Syntax

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

Parameters
ParameterDescriptionDefault
rIntegerRed component value.—
gIntegerGreen component value.—
bIntegerBlue component value.—
HueSingleOutput hue value.
Type: Single; required; passed by reference.
—
SaturationSingleOutput saturation value.
Type: Single; required; passed by reference.
—
IntensitySingleOutput intensity value.
Type: Single; required; passed by reference.
—
Return Value

Void

Example Code
ImgProc.RGBToHSI_Parallel(255, 128, 64, hue, sat, int);
50. ImgProc.RGBToLab(r, g, b) Returns: Void
▶
Description

Converts RGB to CIELab color space.

Syntax

ImgProc.RGBToLab(r, g, b);

Parameters
ParameterDescriptionDefault
rByteRed component value.—
gByteGreen component value.—
bByteBlue component value.—
Return Value

Void

Example Code
ImgProc.RGBToLab(255, 128, 64);
51. ImgProc.RGBToLab_OriginalValue(r, g, b, LabL, Laba, Labb) Returns: Void
▶
Description

Converts RGB to CIELab with original value output.

Syntax

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

Parameters
ParameterDescriptionDefault
rByteRed component value.—
gByteGreen component value.—
bByteBlue component value.—
LabLDoubleOutput L component.
Type: Double; required; passed by reference.
—
LabaDoubleOutput a component.
Type: Double; required; passed by reference.
—
LabbDoubleOutput b component.
Type: Double; required; passed by reference.
—
Return Value

Void

Example Code
ImgProc.RGBToLab_OriginalValue(255, 128, 64, labL, labA, labB);
52. ImgProc.RGBToLab_Parallel(r, g, b, Out_L, Out_a, Out_b) Returns: Void
▶
Description

Converts RGB to CIELab using parallel method.

Syntax

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

Parameters
ParameterDescriptionDefault
rByteRed component value.—
gByteGreen component value.—
bByteBlue component value.—
Out_LByteOutput L component.
Type: Byte; required; passed by reference.
—
Out_aByteOutput a component.
Type: Byte; required; passed by reference.
—
Out_bByteOutput b component.
Type: Byte; required; passed by reference.
—
Return Value

Void

Example Code
ImgProc.RGBToLab_Parallel(255, 128, 64, outL, outA, outB);
53. ImgProc.Split_a(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

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

Syntax

let result = ImgProc.Split_a(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to decompose.
Type: Bitmap; required; passed by reference.
—
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — a channel image, or Nothing if decomposition fails.

Example Code
let aChannel = ImgProc.Split_a(bitmap);
54. ImgProc.Split_b(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

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

Syntax

let result = ImgProc.Split_b(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to decompose.
Type: Bitmap; required; passed by reference.
—
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — b channel image, or Nothing if decomposition fails.

Example Code
let bChannel = ImgProc.Split_b(bitmap);
55. ImgProc.Split_Blue(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Extracts blue channel from color image as grayscale.

Syntax

let result = ImgProc.Split_Blue(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource color image.
Type: Bitmap; required; passed by reference.
—
MaskImageBitmap, OptionalOptional mask to constrain extraction.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Blue channel as grayscale image, or Nothing if extraction fails.

Example Code
let blueChannel = ImgProc.Split_Blue(bitmap);
56. ImgProc.Split_Cyan(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Splits C (cyan) channel in CMYK decomposition.

Syntax

let result = ImgProc.Split_Cyan(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to decompose.
Type: Bitmap; required; passed by reference.
—
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — C channel image, or Nothing if decomposition fails.

Example Code
let cChannel = ImgProc.Split_Cyan(bitmap);
57. ImgProc.Split_Green(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Extracts green channel from color image as grayscale.

Syntax

let result = ImgProc.Split_Green(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource color image.
Type: Bitmap; required; passed by reference.
—
MaskImageBitmap, OptionalOptional mask to constrain extraction.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Green channel as grayscale image, or Nothing if extraction fails.

Example Code
let greenChannel = ImgProc.Split_Green(bitmap);
58. ImgProc.Split_Hue(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Extracts hue channel from HSI color space.

Syntax

let result = ImgProc.Split_Hue(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource color image.
Type: Bitmap; required; passed by reference.
—
MaskImageBitmap, OptionalOptional mask to constrain extraction.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Hue channel as image, or Nothing if extraction fails.

Example Code
let hueChannel = ImgProc.Split_Hue(bitmap);
59. ImgProc.Split_Intensity(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Extracts intensity channel from HSI color space.

Syntax

let result = ImgProc.Split_Intensity(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource color image.
Type: Bitmap; required; passed by reference.
—
MaskImageBitmap, OptionalOptional mask to constrain extraction.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Intensity channel as image, or Nothing if extraction fails.

Example Code
let intensity = ImgProc.Split_Intensity(bitmap);
60. ImgProc.Split_KBlack(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Splits K (black) channel in CMYK decomposition.

Syntax

let result = ImgProc.Split_KBlack(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to decompose.
Type: Bitmap; required; passed by reference.
—
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — K channel image, or Nothing if decomposition fails.

Example Code
let kChannel = ImgProc.Split_KBlack(bitmap);
61. ImgProc.Split_L(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Splits L (lightness) channel in Lab color space.

Syntax

let result = ImgProc.Split_L(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to decompose.
Type: Bitmap; required; passed by reference.
—
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — L channel image, or Nothing if decomposition fails.

Example Code
let lChannel = ImgProc.Split_L(bitmap);
62. ImgProc.Split_Magenta(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Splits M (magenta) channel in CMYK decomposition.

Syntax

let result = ImgProc.Split_Magenta(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to decompose.
Type: Bitmap; required; passed by reference.
—
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — M channel image, or Nothing if decomposition fails.

Example Code
let mChannel = ImgProc.Split_Magenta(bitmap);
63. ImgProc.Split_Red(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Extracts red channel from color image as grayscale.

Syntax

let result = ImgProc.Split_Red(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource color image.
Type: Bitmap; required; passed by reference.
—
MaskImageBitmap, OptionalOptional mask to constrain extraction.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Red channel as grayscale image, or Nothing if extraction fails.

Example Code
let redChannel = ImgProc.Split_Red(bitmap);
64. ImgProc.Split_rgChromaticityBlue(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Splits rg chromaticity blue channel.

Syntax

let result = ImgProc.Split_rgChromaticityBlue(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to decompose.
Type: Bitmap; required; passed by reference.
—
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — rg chromaticity blue channel image, or Nothing if splitting fails.

Example Code
let rgBlue = ImgProc.Split_rgChromaticityBlue(bitmap);
65. ImgProc.Split_rgChromaticityGreen(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Splits rg chromaticity green channel.

Syntax

let result = ImgProc.Split_rgChromaticityGreen(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to decompose.
Type: Bitmap; required; passed by reference.
—
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — rg chromaticity green channel image, or Nothing if splitting fails.

Example Code
let rgGreen = ImgProc.Split_rgChromaticityGreen(bitmap);
66. ImgProc.Split_rgChromaticityRed(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Splits rg chromaticity red channel.

Syntax

let result = ImgProc.Split_rgChromaticityRed(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to decompose.
Type: Bitmap; required; passed by reference.
—
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — rg chromaticity red channel image, or Nothing if splitting fails.

Example Code
let rgRed = ImgProc.Split_rgChromaticityRed(bitmap);
67. ImgProc.Split_Saturation(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Extracts saturation channel from HSI color space.

Syntax

let result = ImgProc.Split_Saturation(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource color image.
Type: Bitmap; required; passed by reference.
—
MaskImageBitmap, OptionalOptional mask to constrain extraction.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Saturation channel as image, or Nothing if extraction fails.

Example Code
let saturation = ImgProc.Split_Saturation(bitmap);
68. ImgProc.Split_Yellow(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Splits Y (yellow) channel in CMYK decomposition.

Syntax

let result = ImgProc.Split_Yellow(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to decompose.
Type: Bitmap; required; passed by reference.
—
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Y channel image, or Nothing if decomposition fails.

Example Code
let yChannel = ImgProc.Split_Yellow(bitmap);
69. ImgProc.SplitToning(SourceImage, ShadowHue, HighlightHue, ToneStrength, TonalBalance, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Applies dual-tone color grading to shadows and highlights independently using a high-speed 256-entry luminance LUT.

Syntax

let result = ImgProc.SplitToning(SourceImage, ShadowHue, HighlightHue, ToneStrength, TonalBalance, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to process.—
ShadowHueInteger, OptionalColor hue angle in degrees for shadows (0-360).210
HighlightHueInteger, OptionalColor hue angle in degrees for highlights (0-360).35
ToneStrengthSingle, OptionalOverall color toning intensity (0.0-1.0).0.4F
TonalBalanceInteger, OptionalBalance shift between shadow and highlight tints (-100 to 100).0
IsShowProgressBoolean, OptionalWhether to show processing progress.True
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Processed Bitmap with Split Toning applied, or Nothing if processing fails.

Example Code
let tonedBmp = ImgProc.SplitToning(bitmap, 210, 35, 0.4F, 0);
Data Extraction & Analysis Actions 75 functions
▶
1. ImgProc.AreImagesIdentical(img1, img2) Returns: Boolean
▶
Description

Checks if two images are identical.

Syntax

let result = ImgProc.AreImagesIdentical(img1, img2);

Parameters
ParameterDescriptionDefault
img1BitmapFirst image to compare.—
img2BitmapSecond image to compare.—
Return Value

Boolean — True if images are identical, False otherwise.

Example Code
let identical = ImgProc.AreImagesIdentical(bitmap1, bitmap2);
2. ImgProc.Calculate_AverageColorValue(SourceImage, TotalPixelsCount, AnalysisInterval, ColorChannel, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Single
▶
Description

Calculates average color value of specified channel.

Syntax

let result = ImgProc.Calculate_AverageColorValue(SourceImage, TotalPixelsCount, AnalysisInterval, ColorChannel, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to analyze.—
TotalPixelsCountLongOutput total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisIntervalIntegerSampling interval for analysis.—
ColorChannelStringColor 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
—
MaskImageBitmap, OptionalOptional mask to constrain analysis.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Single — Average color value of the specified channel, or 0 if calculation fails.

Example Code
let avgRed = ImgProc.Calculate_AverageColorValue(bitmap, totPix, 1, "R");
3. ImgProc.Calculate_AverageColorValue_a(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Single
▶
Description

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

Syntax

let result = ImgProc.Calculate_AverageColorValue_a(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to analyze.—
TotalPixelsCountLongOutput total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisIntervalIntegerSampling interval for analysis.—
MaskImageBitmap, OptionalOptional mask to constrain analysis.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Single — Average a (green-red) value, or 0 if calculation fails.

Example Code
let avgA = ImgProc.Calculate_AverageColorValue_a(bitmap, totPix, 1);
4. ImgProc.Calculate_AverageColorValue_b(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Single
▶
Description

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

Syntax

let result = ImgProc.Calculate_AverageColorValue_b(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to analyze.—
TotalPixelsCountLongOutput total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisIntervalIntegerSampling interval for analysis.—
MaskImageBitmap, OptionalOptional mask to constrain analysis.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Single — Average b (blue-yellow) value, or 0 if calculation fails.

Example Code
let avgB = ImgProc.Calculate_AverageColorValue_b(bitmap, totPix, 1);
5. ImgProc.Calculate_AverageColorValue_Blue(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Single
▶
Description

Calculates average blue channel value.

Syntax

let result = ImgProc.Calculate_AverageColorValue_Blue(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to analyze.—
TotalPixelsCountLongOutput total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisIntervalIntegerSampling interval for analysis.—
MaskImageBitmap, OptionalOptional mask to constrain analysis.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Single — Average blue channel value, or 0 if calculation fails.

Example Code
let avgBlue = ImgProc.Calculate_AverageColorValue_Blue(bitmap, totPix, 1);
6. ImgProc.Calculate_AverageColorValue_Cyan(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Single
▶
Description

Calculates average cyan channel value.

Syntax

let result = ImgProc.Calculate_AverageColorValue_Cyan(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to analyze.—
TotalPixelsCountLongOutput total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisIntervalIntegerSampling interval for analysis.—
MaskImageBitmap, OptionalOptional mask to constrain analysis.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Single — Average cyan value, or 0 if calculation fails.

Example Code
let avgCyan = ImgProc.Calculate_AverageColorValue_Cyan(bitmap, totPix, 1);
7. ImgProc.Calculate_AverageColorValue_Gray(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Single
▶
Description

Calculates average grayscale value.

Syntax

let result = ImgProc.Calculate_AverageColorValue_Gray(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to analyze.—
TotalPixelsCountLongOutput total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisIntervalIntegerSampling interval for analysis.—
MaskImageBitmap, OptionalOptional mask to constrain analysis.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Single — Average grayscale value, or 0 if calculation fails.

Example Code
let avgGray = ImgProc.Calculate_AverageColorValue_Gray(bitmap, totPix, 1);
8. ImgProc.Calculate_AverageColorValue_Green(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Single
▶
Description

Calculates average green channel value.

Syntax

let result = ImgProc.Calculate_AverageColorValue_Green(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to analyze.—
TotalPixelsCountLongOutput total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisIntervalIntegerSampling interval for analysis.—
MaskImageBitmap, OptionalOptional mask to constrain analysis.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Single — Average green channel value, or 0 if calculation fails.

Example Code
let avgGreen = ImgProc.Calculate_AverageColorValue_Green(bitmap, totPix, 1);
9. ImgProc.Calculate_AverageColorValue_Hue(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Single
▶
Description

Calculates average hue value.

Syntax

let result = ImgProc.Calculate_AverageColorValue_Hue(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to analyze.—
TotalPixelsCountLongOutput total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisIntervalIntegerSampling interval for analysis.—
MaskImageBitmap, OptionalOptional mask to constrain analysis.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Single — Average hue value, or 0 if calculation fails.

Example Code
let avgHue = ImgProc.Calculate_AverageColorValue_Hue(bitmap, totPix, 1);
10. ImgProc.Calculate_AverageColorValue_Intensity(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Single
▶
Description

Calculates average intensity value.

Syntax

let result = ImgProc.Calculate_AverageColorValue_Intensity(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to analyze.—
TotalPixelsCountLongOutput total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisIntervalIntegerSampling interval for analysis.—
MaskImageBitmap, OptionalOptional mask to constrain analysis.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Single — Average intensity value, or 0 if calculation fails.

Example Code
let avgInt = ImgProc.Calculate_AverageColorValue_Intensity(bitmap, totPix, 1);
11. ImgProc.Calculate_AverageColorValue_KBlack(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Single
▶
Description

Calculates average black (K) channel value in CMYK.

Syntax

let result = ImgProc.Calculate_AverageColorValue_KBlack(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to analyze.—
TotalPixelsCountLongOutput total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisIntervalIntegerSampling interval for analysis.—
MaskImageBitmap, OptionalOptional mask to constrain analysis.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Single — Average black channel value, or 0 if calculation fails.

Example Code
let avgK = ImgProc.Calculate_AverageColorValue_KBlack(bitmap, totPix, 1);
12. ImgProc.Calculate_AverageColorValue_L(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Single
▶
Description

Calculates average L (lightness) value in CIELab.

Syntax

let result = ImgProc.Calculate_AverageColorValue_L(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to analyze.—
TotalPixelsCountLongOutput total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisIntervalIntegerSampling interval for analysis.—
MaskImageBitmap, OptionalOptional mask to constrain analysis.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Single — Average L (lightness) value, or 0 if calculation fails.

Example Code
let avgL = ImgProc.Calculate_AverageColorValue_L(bitmap, totPix, 1);
13. ImgProc.Calculate_AverageColorValue_Magenta(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Single
▶
Description

Calculates average magenta channel value.

Syntax

let result = ImgProc.Calculate_AverageColorValue_Magenta(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to analyze.—
TotalPixelsCountLongOutput total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisIntervalIntegerSampling interval for analysis.—
MaskImageBitmap, OptionalOptional mask to constrain analysis.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Single — Average magenta value, or 0 if calculation fails.

Example Code
let avgMag = ImgProc.Calculate_AverageColorValue_Magenta(bitmap, totPix, 1);
14. 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) Returns: Void
▶
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);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to analyze.—
ShapeModeIntegerShape mode for region selection.
Supported values:
1: Rectangle region
2: Circle region (inscribed in the X1-X2 range)
—
X1IntegerFirst X-coordinate.—
Y1IntegerFirst Y-coordinate.—
X2IntegerSecond X-coordinate.—
Y2IntegerSecond Y-coordinate.—
ReturnRedByteOutput red channel average.
Type: Byte; required; passed by reference.
—
ReturnGreenByteOutput green channel average.
Type: Byte; required; passed by reference.
—
ReturnBlueByteOutput blue channel average.
Type: Byte; required; passed by reference.
—
ReturnGrayByteOutput gray channel average.
Type: Byte; required; passed by reference.
—
ReturnHueSingleOutput hue average.
Type: Single; required; passed by reference.
—
ReturnSatSingleOutput saturation average.
Type: Single; required; passed by reference.
—
ReturnIntensitySingleOutput intensity average.
Type: Single; required; passed by reference.
—
ReturnCyanSingleOutput cyan average.
Type: Single; required; passed by reference.
—
ReturnMagentaSingleOutput magenta average.
Type: Single; required; passed by reference.
—
ReturnYellowSingleOutput yellow average.
Type: Single; required; passed by reference.
—
ReturnKSingle—
ReturnLab_LSingle—
ReturnLab_aSingle—
ReturnLab_bSingle—
ReturnRG_RedSingle—
ReturnRG_GreenSingle—
ReturnRG_BlueSingle—
Return Value

Void

Example Code
ImgProc.Calculate_AverageColorValue_MultipleChannels(bitmap, 0, 0, 0, 100, 100, r, g, b, gray, hue, sat, int, cyan, mag, yel);
15. ImgProc.Calculate_AverageColorValue_Red(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Single
▶
Description

Calculates average red channel value.

Syntax

let result = ImgProc.Calculate_AverageColorValue_Red(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to analyze.—
TotalPixelsCountLongOutput total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisIntervalIntegerSampling interval for analysis.—
MaskImageBitmap, OptionalOptional mask to constrain analysis.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Single — Average red channel value, or 0 if calculation fails.

Example Code
let avgRed = ImgProc.Calculate_AverageColorValue_Red(bitmap, totPix, 1);
16. ImgProc.Calculate_AverageColorValue_rgChromaticityBlue(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Single
▶
Description

Calculates average blue chromaticity value.

Syntax

let result = ImgProc.Calculate_AverageColorValue_rgChromaticityBlue(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to analyze.—
TotalPixelsCountLongOutput total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisIntervalIntegerSampling interval for analysis.—
MaskImageBitmap, OptionalOptional mask to constrain analysis.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Single — Average blue chromaticity value, or 0 if calculation fails.

Example Code
let avgRgBlue = ImgProc.Calculate_AverageColorValue_rgChromaticityBlue(bitmap, totPix, 1);
17. ImgProc.Calculate_AverageColorValue_rgChromaticityGreen(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Single
▶
Description

Calculates average green chromaticity value.

Syntax

let result = ImgProc.Calculate_AverageColorValue_rgChromaticityGreen(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to analyze.—
TotalPixelsCountLongOutput total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisIntervalIntegerSampling interval for analysis.—
MaskImageBitmap, OptionalOptional mask to constrain analysis.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Single — Average green chromaticity value, or 0 if calculation fails.

Example Code
let avgRgGreen = ImgProc.Calculate_AverageColorValue_rgChromaticityGreen(bitmap, totPix, 1);
18. ImgProc.Calculate_AverageColorValue_rgChromaticityRed(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Single
▶
Description

Calculates average red chromaticity value.

Syntax

let result = ImgProc.Calculate_AverageColorValue_rgChromaticityRed(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to analyze.—
TotalPixelsCountLongOutput total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisIntervalIntegerSampling interval for analysis.—
MaskImageBitmap, OptionalOptional mask to constrain analysis.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Single — Average red chromaticity value, or 0 if calculation fails.

Example Code
let avgRgRed = ImgProc.Calculate_AverageColorValue_rgChromaticityRed(bitmap, totPix, 1);
19. ImgProc.Calculate_AverageColorValue_Saturation(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Single
▶
Description

Calculates average saturation value.

Syntax

let result = ImgProc.Calculate_AverageColorValue_Saturation(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to analyze.—
TotalPixelsCountLongOutput total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisIntervalIntegerSampling interval for analysis.—
MaskImageBitmap, OptionalOptional mask to constrain analysis.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Single — Average saturation value, or 0 if calculation fails.

Example Code
let avgSat = ImgProc.Calculate_AverageColorValue_Saturation(bitmap, totPix, 1);
20. ImgProc.Calculate_AverageColorValue_Yellow(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Single
▶
Description

Calculates average yellow channel value.

Syntax

let result = ImgProc.Calculate_AverageColorValue_Yellow(SourceImage, TotalPixelsCount, AnalysisInterval, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to analyze.—
TotalPixelsCountLongOutput total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisIntervalIntegerSampling interval for analysis.—
MaskImageBitmap, OptionalOptional mask to constrain analysis.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Single — Average yellow value, or 0 if calculation fails.

Example Code
let avgYellow = ImgProc.Calculate_AverageColorValue_Yellow(bitmap, totPix, 1);
21. ImgProc.Calculate_AvgValueByPredefinedColorFormula(SourceImage, TotalPixelsCount, AnalysisInterval, FormulaMethod, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Single
▶
Description

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

Syntax

let result = ImgProc.Calculate_AvgValueByPredefinedColorFormula(SourceImage, TotalPixelsCount, AnalysisInterval, FormulaMethod, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to analyze.—
TotalPixelsCountLongOutput total pixels analyzed.
Type: Long; required; passed by reference.
—
AnalysisIntervalIntegerSampling interval for analysis.—
FormulaMethodIntegerColor 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
—
MaskImageBitmap, OptionalOptional mask to constrain analysis.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Single — Average value computed by formula, or 0 if calculation fails.

Example Code
let avgFormula = ImgProc.Calculate_AvgValueByPredefinedColorFormula(bitmap, totPix, 1, 0);
22. ImgProc.Calculate_LocalGrayAvgValue(IntegralGrayImageMap(,), LocalBoxSize, CenterX, CenterY) Returns: Byte
▶
Description

Calculates local grayscale average from integral map.

Syntax

let result = ImgProc.Calculate_LocalGrayAvgValue(IntegralGrayImageMap(,), LocalBoxSize, CenterX, CenterY);

Parameters
ParameterDescriptionDefault
IntegralGrayImageMap(,)Long—
LocalBoxSizeIntegerSize of local box for averaging.—
CenterXIntegerCenter X-coordinate.—
CenterYIntegerCenter Y-coordinate.—
Return Value

Byte — Local average grayscale value, or 0 if calculation fails.

Example Code
let localAvg = ImgProc.Calculate_LocalGrayAvgValue(integralMap, 15, 50, 50);
23. ImgProc.Calculate_TotalPixels(SourceImage, SelectShape, X1, Y1, X2, Y2, ColorBW) Returns: Long
▶
Description

Calculates total pixel count in selected region.

Syntax

let result = ImgProc.Calculate_TotalPixels(SourceImage, SelectShape, X1, Y1, X2, Y2, ColorBW);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to analyze.—
SelectShapeIntegerShape mode for region selection.
Supported values:
1: Rectangle region
Any other value: Circle region
—
X1IntegerFirst X-coordinate.—
Y1IntegerFirst Y-coordinate.—
X2IntegerSecond X-coordinate.—
Y2IntegerSecond Y-coordinate.—
ColorBWIntegerColor 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 — Total pixel count, or 0 if calculation fails.

Example Code
let totPix = ImgProc.Calculate_TotalPixels(bitmap, 0, 0, 0, 100, 100, 0);
24. ImgProc.Check_ImageSize(SourceImage, MinWidth, MinHeight, MaxWidth, MaxHeight) Returns: String
▶
Description

Validates image dimensions against constraints.

Syntax

let result = ImgProc.Check_ImageSize(SourceImage, MinWidth, MinHeight, MaxWidth, MaxHeight);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to validate.
Type: Bitmap; required; passed by reference.
—
MinWidthInteger, OptionalMinimum allowed width.1
MinHeightInteger, OptionalMinimum allowed height.1
MaxWidthInteger, OptionalMaximum allowed width.10000
MaxHeightInteger, OptionalMaximum allowed height.10000
Return Value

String — Validation result message, or empty string if validation fails.

Example Code
let msg = ImgProc.Check_ImageSize(bitmap, 100, 100, 5000, 5000);
25. ImgProc.CompareBitmapImages(b1, b2) Returns: Boolean
▶
Description

Compares two bitmaps for pixel-by-pixel equality.

Syntax

let result = ImgProc.CompareBitmapImages(b1, b2);

Parameters
ParameterDescriptionDefault
b1BitmapFirst bitmap to compare.—
b2BitmapSecond bitmap to compare.—
Return Value

Boolean — True if bitmaps are identical, False otherwise.

Example Code
let isSame = ImgProc.CompareBitmapImages(bmp1, bmp2);
26. ImgProc.Compute_DifferentialImage(SourceGrayImage1, SourceGrayImage2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Computes difference between two images.

Syntax

let result = ImgProc.Compute_DifferentialImage(SourceGrayImage1, SourceGrayImage2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceGrayImage1BitmapFirst grayscale image.
Type: Bitmap; required; passed by reference.
—
SourceGrayImage2BitmapSecond grayscale image.
Type: Bitmap; required; passed by reference.
—
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Differential image, or Nothing if operation fails.

Example Code
let diff = ImgProc.Compute_DifferentialImage(grayBitmap1, grayBitmap2);
27. ImgProc.Convert_GrayByteArray_To_RGBImage(SrcByteArray(,)) Returns: Bitmap
▶
Description

Converts grayscale byte array to RGB image.

Syntax

let result = ImgProc.Convert_GrayByteArray_To_RGBImage(SrcByteArray(,));

Parameters
ParameterDescriptionDefault
SrcByteArray(,)Byte—
Return Value

Bitmap — RGB image converted from byte array, or Nothing if conversion fails.

Example Code
let image = ImgProc.Convert_GrayByteArray_To_RGBImage(grayArray);
28. ImgProc.Convert_GrayByteArray_To_RGBImage_Int(SrcByteArray(,)) Returns: Bitmap
▶
Description

Converts grayscale integer array to RGB image.

Syntax

let result = ImgProc.Convert_GrayByteArray_To_RGBImage_Int(SrcByteArray(,));

Parameters
ParameterDescriptionDefault
SrcByteArray(,)Integer—
Return Value

Bitmap — RGB image converted from integer array, or Nothing if conversion fails.

Example Code
let image = ImgProc.Convert_GrayByteArray_To_RGBImage_Int(intArray);
29. ImgProc.Convert_GrayImage_To_GrayByteArray(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Byte(,)
▶
Description

Extracts grayscale image pixels into byte array.

Syntax

let result = ImgProc.Convert_GrayImage_To_GrayByteArray(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to extract.—
MaskImageBitmap, OptionalOptional mask to constrain extraction.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Byte(,) — 2D byte array (height x width), or Nothing if extraction fails.

Example Code
let grayArray = ImgProc.Convert_GrayImage_To_GrayByteArray(bitmap);
30. ImgProc.Convert_RGBByteArray_To_RGBImage(SrcByteArray(,,)) Returns: Bitmap
▶
Description

Converts RGB byte array to RGB image.

Syntax

let result = ImgProc.Convert_RGBByteArray_To_RGBImage(SrcByteArray(,,));

Parameters
ParameterDescriptionDefault
SrcByteArray(,,)Byte—
Return Value

Bitmap — RGB image converted from byte array, or Nothing if conversion fails.

Example Code
let image = ImgProc.Convert_RGBByteArray_To_RGBImage(rgbArray);
31. ImgProc.Convert_RGBImage_To_GrayByteArray(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Byte(,)
▶
Description

Converts RGB image pixels to grayscale byte array.

Syntax

let result = ImgProc.Convert_RGBImage_To_GrayByteArray(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to convert.—
MaskImageBitmap, OptionalOptional mask to constrain conversion.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Byte(,) — 2D byte array (height x width), or Nothing if conversion fails.

Example Code
let grayArray = ImgProc.Convert_RGBImage_To_GrayByteArray(bitmap);
32. ImgProc.Convert_RGBImage_To_GrayIntegerArray(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Integer(,)
▶
Description

Converts RGB image pixels to grayscale integer array.

Syntax

let result = ImgProc.Convert_RGBImage_To_GrayIntegerArray(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to convert.—
MaskImageBitmap, OptionalOptional mask to constrain conversion.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Integer(,) — 2D integer array (height x width), or Nothing if conversion fails.

Example Code
let grayIntArray = ImgProc.Convert_RGBImage_To_GrayIntegerArray(bitmap);
33. ImgProc.Convert_RGBImage_To_RGBByteArray(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Byte(,,)
▶
Description

Extracts RGB image pixels into 3D byte array.

Syntax

let result = ImgProc.Convert_RGBImage_To_RGBByteArray(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to extract.—
MaskImageBitmap, OptionalOptional mask to constrain extraction.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Byte(,,) — 3D byte array (height x width x channels), or Nothing if extraction fails.

Example Code
let rgbArray = ImgProc.Convert_RGBImage_To_RGBByteArray(bitmap);
34. ImgProc.Count_ColorPixelOfInterest(SourceImage, ColorOfInterest_RGBInt, TotalPixelCount, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Integer
▶
Description

Counts pixels of specific color.

Syntax

let result = ImgProc.Count_ColorPixelOfInterest(SourceImage, ColorOfInterest_RGBInt, TotalPixelCount, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to scan.—
ColorOfInterest_RGBIntIntegerTarget color as RGB integer.—
TotalPixelCountIntegerOutput total pixel count.
Type: Integer; required; passed by reference.
—
MaskImageBitmap, OptionalOptional mask to constrain counting.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Integer — Number of pixels matching the target color, or 0 if counting fails.

Example Code
let count = ImgProc.Count_ColorPixelOfInterest(bitmap, Color.Red.ToArgb(), totPix);
35. ImgProc.Count_ColorPixelOfInterest_FromGrayArray(ImageGrayArray(,), ColorOfInterestByte) Returns: Integer
▶
Description

Counts pixels of specified color in grayscale array.

Syntax

let result = ImgProc.Count_ColorPixelOfInterest_FromGrayArray(ImageGrayArray(,), ColorOfInterestByte);

Parameters
ParameterDescriptionDefault
ImageGrayArray(,)Byte—
ColorOfInterestByteByteGray color value to count.—
Return Value

Integer — Number of pixels matching color, or 0 if counting fails.

Example Code
let count = ImgProc.Count_ColorPixelOfInterest_FromGrayArray(grayArray, 128);
36. ImgProc.Count_ColorPixelOfInterest_FromGrayArray_Region(ImageGrayArray(,), ColorOfInterestByte, X1, Y1, X2, Y2) Returns: Integer
▶
Description

Counts pixels of specified color in region.

Syntax

let result = ImgProc.Count_ColorPixelOfInterest_FromGrayArray_Region(ImageGrayArray(,), ColorOfInterestByte, X1, Y1, X2, Y2);

Parameters
ParameterDescriptionDefault
ImageGrayArray(,)Byte—
ColorOfInterestByteIntegerGray color value to count.—
X1IntegerStart X coordinate.—
Y1IntegerStart Y coordinate.—
X2IntegerEnd X coordinate.—
Y2IntegerEnd Y coordinate.—
Return Value

Integer — Number of pixels matching color, or 0 if counting fails.

Example Code
let count = ImgProc.Count_ColorPixelOfInterest_FromGrayArray_Region(grayArray, 128, 0, 0, 100, 100);
37. ImgProc.Count_NumberOfGrayPixel_OfInterest(SourceGrayImage, GrayColorOfInterest, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Integer
▶
Description

Counts grayscale pixels of specific value.

Syntax

let result = ImgProc.Count_NumberOfGrayPixel_OfInterest(SourceGrayImage, GrayColorOfInterest, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceGrayImageBitmapSource grayscale image.—
GrayColorOfInterestIntegerTarget gray value to count.—
MaskImageBitmap, OptionalOptional mask to constrain counting.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Integer — Number of grayscale pixels matching the target value, or 0 if counting fails.

Example Code
let count = ImgProc.Count_NumberOfGrayPixel_OfInterest(grayBitmap, 128);
38. ImgProc.CropExportRegions(SourceImage, MaskImage, use4WayConnectivity, outputModeType, marginPixels, transparentBackground, backgroundColorRed, backgroundColorGreen, backgroundColorBlue, destinationFolder, filePrefix, imageFormatType) Returns: Integer
▶
Description

Exports cropped regions based on a binary mask image directly from Bitmap objects.

Syntax

let result = ImgProc.CropExportRegions(SourceImage, MaskImage, use4WayConnectivity, outputModeType, marginPixels, transparentBackground, backgroundColorRed, backgroundColorGreen, backgroundColorBlue, destinationFolder, filePrefix, imageFormatType);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to crop from.—
MaskImageBitmapBinary mask defining regions.—
use4WayConnectivityBoolean, OptionalWhether to use 4-way connectivity.False
outputModeTypeInteger, OptionalInteger 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
marginPixelsInteger, OptionalMargin to add around regions.0
transparentBackgroundBoolean, OptionalWhether to use transparent background.True
backgroundColorRedInteger, OptionalBackground red component (0-255).0
backgroundColorGreenInteger, OptionalBackground green component (0-255).0
backgroundColorBlueInteger, OptionalBackground blue component (0-255).0
destinationFolderString, OptionalFolder to save exported regions."C:\\ExportedRegions"
filePrefixString, OptionalPrefix for exported file names."Region\_"
imageFormatTypeInteger, OptionalInteger representing the export image format.
Supported imageFormatType values:
0: PNG
1: JPEG
2: BMP
0
Return Value

Integer — Number of successfully exported regions.

Example Code
let exported = ImgProc.CropExportRegions(bitmap, maskBitmap, false, 1, 0, true);
39. ImgProc.Distance(X1, Y1, X2, Y2) Returns: Double
▶
Description

Calculates Euclidean distance between two points.

Syntax

let result = ImgProc.Distance(X1, Y1, X2, Y2);

Parameters
ParameterDescriptionDefault
X1DoubleX-coordinate of first point.—
Y1DoubleY-coordinate of first point.—
X2DoubleX-coordinate of second point.—
Y2DoubleY-coordinate of second point.—
Return Value

Double — Euclidean distance between the two points.

Example Code
let dist = ImgProc.Distance(0, 0, 3, 4);
40. ImgProc.Draw_Histogram(ProfileData, TotPixelCount, Pic_Target, ProfileColor) Returns: Bitmap
▶
Description

Draws histogram within picture control.

Syntax

let result = ImgProc.Draw_Histogram(ProfileData, TotPixelCount, Pic_Target, ProfileColor);

Parameters
ParameterDescriptionDefault
ProfileDataSingle()Array of histogram bin data.—
TotPixelCountIntegerTotal pixel count for normalization.—
Pic_TargetPictureBoxTarget picture control to draw in.
Type: PictureBox; required; passed by reference.
—
ProfileColorColorColor for histogram bars.—
Return Value

Bitmap — Bitmap containing the histogram visualization, or Nothing if drawing fails.

Example Code
let hist = ImgProc.Draw_Histogram(data, 1000000, picTarget, Color.Blue);
41. ImgProc.Draw_LineProfile(ProfileData, Pic_Target, ProfileColor, IsCenterLined) Returns: Bitmap
▶
Description

Draws line profile within picture control.

Syntax

let result = ImgProc.Draw_LineProfile(ProfileData, Pic_Target, ProfileColor, IsCenterLined);

Parameters
ParameterDescriptionDefault
ProfileDataSingle()Array of profile data values.—
Pic_TargetPictureBoxTarget picture control to draw in.
Type: PictureBox; required; passed by reference.
—
ProfileColorColorColor for profile line.—
IsCenterLinedBoolean, OptionalWhether to draw center line.False
Return Value

Bitmap — Bitmap containing the profile visualization, or Nothing if drawing fails.

Example Code
let profile = ImgProc.Draw_LineProfile(data, picTarget, Color.Red);
42. ImgProc.Extract_PixelLocations(SourceGrayImage, GrayColorOfInterest, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Point()
▶
Description

Extracts pixel coordinates of specified gray color.

Syntax

let result = ImgProc.Extract_PixelLocations(SourceGrayImage, GrayColorOfInterest, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceGrayImageBitmapSource grayscale image.—
GrayColorOfInterestIntegerGray color value to find.—
MaskImageBitmap, OptionalOptional mask to constrain extraction.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Point() — Array of Point coordinates matching color, or Nothing if extraction fails.

Example Code
let points = ImgProc.Extract_PixelLocations(grayBitmap, 128);
43. ImgProc.Extract_PixelLocations_FromByte(SrcByteArray, GrayColorOfInterest, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Point()
▶
Description

Extracts pixel coordinates from byte array.

Syntax

let result = ImgProc.Extract_PixelLocations_FromByte(SrcByteArray, GrayColorOfInterest, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SrcByteArrayByte(,)Source byte array [height, width].—
GrayColorOfInterestIntegerGray color value to find.—
MaskImageBitmap, OptionalOptional mask to constrain extraction.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Point() — Array of Point coordinates matching color, or Nothing if extraction fails.

Example Code
let points = ImgProc.Extract_PixelLocations_FromByte(byteData, 128);
44. ImgProc.Extract_SkeletonPoints(SkeletonArray(,), foreground) Returns: Point()
▶
Description

Extracts all skeleton points from array.

Syntax

let result = ImgProc.Extract_SkeletonPoints(SkeletonArray(,), foreground);

Parameters
ParameterDescriptionDefault
SkeletonArray(,)Byte—
foregroundByteForeground byte value.—
Return Value

Point() — Array of skeleton points, or Nothing if extraction fails.

Example Code
let points = ImgProc.Extract_SkeletonPoints(skelArray, 255);
45. ImgProc.Get_Avgerage_Color_3x3Box_ExceptOneColor(TargetX, TargetY, TargetColor_R, TargetColor_G, TargetColor_B, ColorChannelNum) Returns: Byte
▶
Description

Gets average color from 3x3 box excluding target color.

Syntax

let result = ImgProc.Get_Avgerage_Color_3x3Box_ExceptOneColor(TargetX, TargetY, TargetColor_R, TargetColor_G, TargetColor_B, ColorChannelNum);

Parameters
ParameterDescriptionDefault
TargetXIntegerX coordinate of center pixel.—
TargetYIntegerY coordinate of center pixel.—
TargetColor_RByteRed channel of color to exclude.—
TargetColor_GByteGreen channel of color to exclude.—
TargetColor_BByteBlue channel of color to exclude.—
ColorChannelNumIntegerInteger representing the color channel.
Supported ColorChannelNum values:
0: Red
1: Green
2: Blue
—
Return Value

Byte — Average color value for the channel, or 0 if operation fails.

Example Code
let avgRed = ImgProc.Get_Avgerage_Color_3x3Box_ExceptOneColor(10, 10, 0, 0, 0, 0);
46. ImgProc.Get_ColorRGB2DMap(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Object
▶
Description

Gets 2D color RGB map from image.

Syntax

let result = ImgProc.Get_ColorRGB2DMap(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to extract map from.—
MaskImageBitmap, OptionalOptional mask to constrain extraction.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Object — 2D object array containing color RGB map, or Nothing if extraction fails.

Example Code
let rgbMap = ImgProc.Get_ColorRGB2DMap(bitmap);
47. ImgProc.Get_GrayValues(SourceImage, x1, y1, x2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Byte()
▶
Description

Extracts grayscale values from image line.

Syntax

let result = ImgProc.Get_GrayValues(SourceImage, x1, y1, x2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to extract from.—
x1IntegerStart X coordinate.—
y1IntegerStart Y coordinate.—
x2IntegerEnd X coordinate.—
MaskImageBitmap, OptionalOptional mask to constrain extraction.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Byte() — Array of grayscale values, or Nothing if extraction fails.

Example Code
let grayValues = ImgProc.Get_GrayValues(bitmap, 0, 0, 100);
48. ImgProc.Get_Histogram(SourceImage, TotalPixelCount, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Single(,)
▶
Description

Calculates histogram of image pixel intensities.

Syntax

let result = ImgProc.Get_Histogram(SourceImage, TotalPixelCount, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to analyze.—
TotalPixelCountIntegerOutput total pixel count.
Type: Integer; required; passed by reference.
—
MaskImageBitmap, OptionalOptional mask to constrain histogram.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Single(,) — 2D array of histogram data, or Nothing if calculation fails.

Example Code
let hist = ImgProc.Get_Histogram(bitmap, totalPix);
49. ImgProc.Get_LineProfile(SourceImage, StartAt, EndAt, LineThickness, IsNormalizeBy255) Returns: Single(,)
▶
Description

Gets pixel intensity profile along a line.

Syntax

let result = ImgProc.Get_LineProfile(SourceImage, StartAt, EndAt, LineThickness, IsNormalizeBy255);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to extract profile from.—
StartAtPointStarting point of profile line.—
EndAtPointEnding point of profile line.—
LineThicknessIntegerThickness of the profile line.—
IsNormalizeBy255Boolean, OptionalWhether to normalize values by 255.False
Return Value

Single(,) — 2D array of profile data, or Nothing if extraction fails.

Example Code
let profile = ImgProc.Get_LineProfile(bitmap, New Point(0, 0), New Point(100, 0), 5);
50. ImgProc.Get_MaxValue(Value1, Value2, Value3, Value4, Value5) Returns: Single
▶
Description

Returns maximum value among five values.

Syntax

let result = ImgProc.Get_MaxValue(Value1, Value2, Value3, Value4, Value5);

Parameters
ParameterDescriptionDefault
Value1SingleFirst value.—
Value2SingleSecond value.—
Value3SingleThird value.—
Value4SingleFourth value.—
Value5SingleFifth value.—
Return Value

Single — Maximum among the five values.

Example Code
let maxVal = ImgProc.Get_MaxValue(1.0, 2.5, 0.5, 3.0, 1.5);
51. ImgProc.Get_MinValue(Value1, Value2, Value3, Value4, Value5) Returns: Single
▶
Description

Returns minimum value among five values.

Syntax

let result = ImgProc.Get_MinValue(Value1, Value2, Value3, Value4, Value5);

Parameters
ParameterDescriptionDefault
Value1SingleFirst value.—
Value2SingleSecond value.—
Value3SingleThird value.—
Value4SingleFourth value.—
Value5SingleFifth value.—
Return Value

Single — Minimum among the five values.

Example Code
let minVal = ImgProc.Get_MinValue(1.0, 2.5, 0.5, 3.0, 1.5);
52. ImgProc.Get_MotionDetectHits(SourceImage1, SourceImage2, StepSize, Tolerance) Returns: Single
▶
Description

Detects motion between two images.

Syntax

let result = ImgProc.Get_MotionDetectHits(SourceImage1, SourceImage2, StepSize, Tolerance);

Parameters
ParameterDescriptionDefault
SourceImage1BitmapFirst source image.—
SourceImage2BitmapSecond source image to compare.—
StepSizeSingleStep size for motion sampling.—
ToleranceSingleMotion detection tolerance.—
Return Value

Single — Measure of motion detected between images.

Example Code
let motion = ImgProc.Get_MotionDetectHits(frame1, frame2, 1.0, 10.0);
53. ImgProc.Get_PixelColor(SourceBitmap, TargetX, TargetY) Returns: Integer
▶
Description

Gets pixel color from bitmap at specified coordinates.

Syntax

let result = ImgProc.Get_PixelColor(SourceBitmap, TargetX, TargetY);

Parameters
ParameterDescriptionDefault
SourceBitmapBitmapSource bitmap to sample.—
TargetXIntegerX-coordinate within bitmap.—
TargetYIntegerY-coordinate within bitmap.—
Return Value

Integer — Integer color value at specified bitmap location, or 0 if retrieval fails.

Example Code
let pixelColor = ImgProc.Get_PixelColor(bitmap, 50, 75);
54. ImgProc.Get_PixelColor_From1PixelInScreen(TargetX, TargetY) Returns: Integer
▶
Description

Gets pixel color from screen at specified coordinates.

Syntax

let result = ImgProc.Get_PixelColor_From1PixelInScreen(TargetX, TargetY);

Parameters
ParameterDescriptionDefault
TargetXIntegerX-coordinate on screen.—
TargetYIntegerY-coordinate on screen.—
Return Value

Integer — Integer color value at specified screen location, or 0 if retrieval fails.

Example Code
let pixelColor = ImgProc.Get_PixelColor_From1PixelInScreen(100, 100);
55. ImgProc.Get_PixelColor_FromScreen(TargetX, TargetY) Returns: Integer
▶
Description

Gets pixel color from screen.

Syntax

let result = ImgProc.Get_PixelColor_FromScreen(TargetX, TargetY);

Parameters
ParameterDescriptionDefault
TargetXIntegerX-coordinate on screen.—
TargetYIntegerY-coordinate on screen.—
Return Value

Integer — Integer color value at specified screen location, or 0 if retrieval fails.

Example Code
let pixelColor = ImgProc.Get_PixelColor_FromScreen(200, 150);
56. 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) Returns: Void
▶
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);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to sample.—
X1IntegerX-coordinate of pixel.—
Y1IntegerY-coordinate of pixel.—
ReturnRedByteOutput red component.
Type: Byte; required; passed by reference.
—
ReturnGreenByteOutput green component.
Type: Byte; required; passed by reference.
—
ReturnBlueByteOutput blue component.
Type: Byte; required; passed by reference.
—
ReturnGrayByteOutput gray value.
Type: Byte; required; passed by reference.
—
ReturnHueSingleOutput hue.
Type: Single; required; passed by reference.
—
ReturnSatSingleOutput saturation.
Type: Single; required; passed by reference.
—
ReturnIntensitySingleOutput intensity.
Type: Single; required; passed by reference.
—
ReturnCyanSingleOutput cyan.
Type: Single; required; passed by reference.
—
ReturnMagentaSingleOutput magenta.
Type: Single; required; passed by reference.
—
ReturnYellowSingleOutput yellow.
Type: Single; required; passed by reference.
—
ReturnKSingleOutput K (black) in CMYK.
Type: Single; required; passed by reference.
—
ReturnLab_LSingleOutput Lab L.
Type: Single; required; passed by reference.
—
ReturnLab_aSingleOutput Lab a.
Type: Single; required; passed by reference.
—
ReturnLab_bSingleOutput Lab b.
Type: Single; required; passed by reference.
—
ReturnRG_RedSingleOutput rg chromaticity red.
Type: Single; required; passed by reference.
—
ReturnRG_GreenSingleOutput rg chromaticity green.
Type: Single; required; passed by reference.
—
ReturnRG_BlueSingleOutput rg chromaticity blue.
Type: Single; required; passed by reference.
—
Return Value

Void

Example Code
ImgProc.Get_PixelColorValues(bitmap, 50, 50, r, g, b, gray, hue, sat, int, cyan, mag, yel, k, labL, labA, labB, rgR, rgG, rgB);
57. ImgProc.Get_PixelLocationArray(SourceGrayImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Point()
▶
Description

Gets all white pixel locations in grayscale image.

Syntax

let result = ImgProc.Get_PixelLocationArray(SourceGrayImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceGrayImageBitmapSource grayscale image to analyze.—
MaskImageBitmap, OptionalOptional mask to constrain search.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Point() — Array of Point coordinates for white pixels, or Nothing if search fails.

Example Code
let whitePoints = ImgProc.Get_PixelLocationArray(bitmap);
58. ImgProc.Get_PixelLocationArray_Bk(SourceGrayImage, DestPixelGray, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Point()
▶
Description

Gets pixel locations matching specified grayscale value.

Syntax

let result = ImgProc.Get_PixelLocationArray_Bk(SourceGrayImage, DestPixelGray, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceGrayImageBitmapSource grayscale image.—
DestPixelGrayByteTarget grayscale value to find (0-255).—
MaskImageBitmap, OptionalOptional mask to constrain search.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Point() — Array of Point coordinates, or Nothing if search fails.

Example Code
let points = ImgProc.Get_PixelLocationArray_Bk(bitmap, 128);
59. ImgProc.Get_TrueSkeletonLength(SkeletonArray(,), foreground, umPerPixels, SplineVertexCount) Returns: Single
▶
Description

Calculates true skeleton curve length with spline.

Syntax

let result = ImgProc.Get_TrueSkeletonLength(SkeletonArray(,), foreground, umPerPixels, SplineVertexCount);

Parameters
ParameterDescriptionDefault
SkeletonArray(,)Byte—
foregroundByteForeground byte value.—
umPerPixelsSingleMicrometer per pixel ratio.—
SplineVertexCountIntegerNumber of spline vertices.—
Return Value

Single — True skeleton length, or 0 if calculation fails.

Example Code
let length = ImgProc.Get_TrueSkeletonLength(skelArray, 255, 1.0, 100);
60. ImgProc.GrayScaling_PutTo_2DByte(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Byte(,)
▶
Description

Converts image to grayscale and stores in 2D byte array.

Syntax

let result = ImgProc.GrayScaling_PutTo_2DByte(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to convert.—
MaskImageBitmap, OptionalOptional mask to constrain conversion.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Byte(,) — 2D byte array (height x width), or Nothing if conversion fails.

Example Code
let grayArray = ImgProc.GrayScaling_PutTo_2DByte(bitmap);
61. ImgProc.GrayScaling_PutTo_2DInt(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Integer(,)
▶
Description

Converts image to grayscale and stores in 2D integer array.

Syntax

let result = ImgProc.GrayScaling_PutTo_2DInt(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to convert.—
MaskImageBitmap, OptionalOptional mask to constrain conversion.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Integer(,) — 2D integer array (height x width), or Nothing if conversion fails.

Example Code
let grayIntArray = ImgProc.GrayScaling_PutTo_2DInt(bitmap);
62. ImgProc.GrayScaling_ReturnImg_From_2DInt(SourceImage, Gray2DInt, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Converts image to grayscale and returns result from 2D integer array.

Syntax

let result = ImgProc.GrayScaling_ReturnImg_From_2DInt(SourceImage, Gray2DInt, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to process.—
Gray2DIntInteger(,)2D integer array (height x width) to use.—
MaskImageBitmap, OptionalOptional mask to constrain processing.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Processed image, or Nothing if conversion fails.

Example Code
let result = ImgProc.GrayScaling_ReturnImg_From_2DInt(bitmap, intArray);
63. ImgProc.IsSameImage(IsTheFirstImage, SourceImage) Returns: Boolean
▶
Description

Checks if image is same as stored reference.

Syntax

let result = ImgProc.IsSameImage(IsTheFirstImage, SourceImage);

Parameters
ParameterDescriptionDefault
IsTheFirstImageBooleanWhether to check against first or second reference.—
SourceImageBitmapSource image to check.—
Return Value

Boolean — True if image matches reference, False otherwise.

Example Code
let isSame = ImgProc.IsSameImage(true, bitmap);
64. ImgProc.IsSameImage_QuickCheck(IsTheFirstImage, SourceImage, x1, y1, x2) Returns: Boolean
▶
Description

Quick check if image is same as stored reference.

Syntax

let result = ImgProc.IsSameImage_QuickCheck(IsTheFirstImage, SourceImage, x1, y1, x2);

Parameters
ParameterDescriptionDefault
IsTheFirstImageBooleanWhether to check against first or second reference.—
SourceImageBitmapSource image to check.—
x1IntegerStart X coordinate.—
y1IntegerStart Y coordinate.—
x2IntegerEnd X coordinate.—
Return Value

Boolean — True if image matches reference, False otherwise.

Example Code
let isSame = ImgProc.IsSameImage_QuickCheck(true, bitmap, 0, 0, 100);
65. ImgProc.Overlay_GrayIntArray_On_Image(SourceImage, Gray2DInt, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Overlays grayscale integer array values as colors on image.

Syntax

let result = ImgProc.Overlay_GrayIntArray_On_Image(SourceImage, Gray2DInt, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to overlay on.—
Gray2DIntInteger(,)2D integer array (height x width) values.—
MaskImageBitmapMask image.—
MaskRegionBoundaryRectangleBoundary rectangle for masked region.—
IsMaskAllRegionSelectedBooleanWhether entire region is selected.—
Return Value

Bitmap — Image with overlay applied, or Nothing if overlay fails.

Example Code
let overlaid = ImgProc.Overlay_GrayIntArray_On_Image(bitmap, intArray, mask, rect, true);
66. ImgProc.Quantify_ColorPixel(SourceImage, Return_ColorTable(,), TotalPixelCount, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Integer
▶
Description

Counts and classifies all color pixels.

Syntax

let result = ImgProc.Quantify_ColorPixel(SourceImage, Return_ColorTable(,), TotalPixelCount, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to analyze.—
Return_ColorTable(,)Integer—
TotalPixelCountIntegerOutput total pixel count.
Type: Integer; required; passed by reference.
—
MaskImageBitmap, OptionalOptional mask to constrain analysis.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Integer — Number of color classifications found, or 0 if quantification fails.

Example Code
let colorCount = ImgProc.Quantify_ColorPixel(bitmap, colorTbl, totPix);
67. ImgProc.RegionExtract_BasicAnalysis(Src_IDMap(,), Src_ColorTable(,)) Returns: Double(,)
▶
Description

Extracts basic region analysis statistics from label and color maps.

Syntax

let result = ImgProc.RegionExtract_BasicAnalysis(Src_IDMap(,), Src_ColorTable(,));

Parameters
ParameterDescriptionDefault
Src_IDMap(,)Integer—
Src_ColorTable(,)Byte—
Return Value

Double(,) — 2D array of analysis statistics, or Nothing if analysis fails.

Example Code
let stats = ImgProc.RegionExtract_BasicAnalysis(labelMap, colorTable);
68. ImgProc.RegionExtract_Convert_LabelIDMap_To_Image(LabelIDMap, ObjectRed, ObjectGreen, ObjectBlue) Returns: Bitmap
▶
Description

Converts label ID map to colored image representation.

Syntax

let result = ImgProc.RegionExtract_Convert_LabelIDMap_To_Image(LabelIDMap, ObjectRed, ObjectGreen, ObjectBlue);

Parameters
ParameterDescriptionDefault
LabelIDMapInteger(,)Region label map.—
ObjectRedByte, OptionalRed channel value for objects (0-255).255
ObjectGreenByte, OptionalGreen channel value for objects (0-255).255
ObjectBlueByte, OptionalBlue channel value for objects (0-255).255
Return Value

Bitmap — Image with regions colored, or Nothing if conversion fails.

Example Code
let colored = ImgProc.RegionExtract_Convert_LabelIDMap_To_Image(labelMap, 255, 0, 0);
69. ImgProc.RegionExtract_Create_GreenObjectOutlineImage(SourceLabelIDMap(,), SourceIDINfoIndex, x1, x2, y1, y2, DilateBoxSize) Returns: Bitmap
▶
Description

Creates green outlined image from label map with optional dilation.

Syntax

let result = ImgProc.RegionExtract_Create_GreenObjectOutlineImage(SourceLabelIDMap(,), SourceIDINfoIndex, x1, x2, y1, y2, DilateBoxSize);

Parameters
ParameterDescriptionDefault
SourceLabelIDMap(,)Integer—
SourceIDINfoIndexIntegerRegion ID index to extract.—
x1IntegerLeft boundary coordinate.—
x2IntegerRight boundary coordinate.—
y1IntegerTop boundary coordinate.—
y2IntegerBottom boundary coordinate.—
DilateBoxSizeIntegerSize of dilation box kernel.—
Return Value

Bitmap — Green outlined image, or Nothing if creation fails.

Example Code
let outline = ImgProc.RegionExtract_Create_GreenObjectOutlineImage(labelMap, 1, 0, 100, 0, 100, 3);
70. ImgProc.RegionExtract_Create_OutlinedOriginalImage(SourceImage, LabelIDMap, ObjectRed, ObjectGreen, ObjectBlue) Returns: Bitmap
▶
Description

Creates image with region outlines overlaid on original image.

Syntax

let result = ImgProc.RegionExtract_Create_OutlinedOriginalImage(SourceImage, LabelIDMap, ObjectRed, ObjectGreen, ObjectBlue);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to overlay on.—
LabelIDMapInteger(,)Region label map.—
ObjectRedByte, OptionalRed channel value for outlines (0-255).255
ObjectGreenByte, OptionalGreen channel value for outlines (0-255).255
ObjectBlueByte, OptionalBlue channel value for outlines (0-255).255
Return Value

Bitmap — Image with outlines overlaid, or Nothing if creation fails.

Example Code
let outlined = ImgProc.RegionExtract_Create_OutlinedOriginalImage(bitmap, labelMap);
71. ImgProc.RegionExtract_Create_WhiteObjectOutlineImage(SourceLabelIDMap(,), SourceIDINfoIndex, x1, x2, y1, y2, DilateBoxSize) Returns: Bitmap
▶
Description

Creates white outlined image from label map with optional dilation.

Syntax

let result = ImgProc.RegionExtract_Create_WhiteObjectOutlineImage(SourceLabelIDMap(,), SourceIDINfoIndex, x1, x2, y1, y2, DilateBoxSize);

Parameters
ParameterDescriptionDefault
SourceLabelIDMap(,)Integer—
SourceIDINfoIndexIntegerRegion ID index to extract.—
x1IntegerLeft boundary coordinate.—
x2IntegerRight boundary coordinate.—
y1IntegerTop boundary coordinate.—
y2IntegerBottom boundary coordinate.—
DilateBoxSizeIntegerSize of dilation box kernel.—
Return Value

Bitmap — White outlined image, or Nothing if creation fails.

Example Code
let outline = ImgProc.RegionExtract_Create_WhiteObjectOutlineImage(labelMap, 1, 0, 100, 0, 100, 3);
72. ImgProc.RegionExtract_Crop_LabelIDMap_To_2DByte(LabelIDMap, IDInfoIndex, X1, X2, Y1, Y2) Returns: Byte(,)
▶
Description

Extracts and converts specified regions from label map to byte array.

Syntax

let result = ImgProc.RegionExtract_Crop_LabelIDMap_To_2DByte(LabelIDMap, IDInfoIndex, X1, X2, Y1, Y2);

Parameters
ParameterDescriptionDefault
LabelIDMapInteger(,)Region label map.—
IDInfoIndexIntegerRegion ID index to extract.—
X1IntegerLeft boundary coordinate.—
X2IntegerRight boundary coordinate.—
Y1IntegerTop boundary coordinate.—
Y2IntegerBottom boundary coordinate.—
Return Value

Byte(,) — 2D byte array of extracted region, or Nothing if extraction fails.

Example Code
let regionBytes = ImgProc.RegionExtract_Crop_LabelIDMap_To_2DByte(labelMap, 1, 0, 100, 0, 100);
73. ImgProc.RegionExtract_Crop_WhiteObjectImage(SourceLabelIDMap(,), SourceIDINfoIndex, x1, x2, y1, y2) Returns: Bitmap
▶
Description

Crops white object region from label ID map.

Syntax

let result = ImgProc.RegionExtract_Crop_WhiteObjectImage(SourceLabelIDMap(,), SourceIDINfoIndex, x1, x2, y1, y2);

Parameters
ParameterDescriptionDefault
SourceLabelIDMap(,)Integer—
SourceIDINfoIndexIntegerRegion ID index to extract.—
x1IntegerLeft boundary coordinate.—
x2IntegerRight boundary coordinate.—
y1IntegerTop boundary coordinate.—
y2IntegerBottom boundary coordinate.—
Return Value

Bitmap — White cropped region image, or Nothing if cropping fails.

Example Code
let cropped = ImgProc.RegionExtract_Crop_WhiteObjectImage(labelMap, 1, 0, 100, 0, 100);
74. ImgProc.RegionExtract_Update_LabelIDMap_ByIncluding(LabelIDMap, IDArray) Returns: Integer(,)
▶
Description

Updates label ID map to include only specified region IDs.

Syntax

let result = ImgProc.RegionExtract_Update_LabelIDMap_ByIncluding(LabelIDMap, IDArray);

Parameters
ParameterDescriptionDefault
LabelIDMapInteger(,)Region label map to update.—
IDArrayDictionary(Of Integer, Boolean)Dictionary of region IDs to include.—
Return Value

Integer(,) — Updated label ID map, or Nothing if update fails.

Example Code
let filtered = ImgProc.RegionExtract_Update_LabelIDMap_ByIncluding(labelMap, idDict);
75. ImgProc.RegionExtract_Update_LabelIDMap_To_Image(SourceImage, LabelIDMap, RegionColorTable, IsOverlap, BkColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Converts label ID map values to corresponding image colors.

Syntax

let result = ImgProc.RegionExtract_Update_LabelIDMap_To_Image(SourceImage, LabelIDMap, RegionColorTable, IsOverlap, BkColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to use for color reference.—
LabelIDMapInteger(,)Region label map.—
RegionColorTableByte(,)Region color table.—
IsOverlapBoolean, OptionalWhether to overlap with source image.True
BkColorInteger, OptionalBackground color to use.0
MaskImageBitmap, OptionalOptional mask to constrain conversion.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Image with labels converted to colors, or Nothing if conversion fails.

Example Code
let coloredRegions = ImgProc.RegionExtract_Update_LabelIDMap_To_Image(bitmap, labelMap, colorTable);
Image Transforms & Filters 80 functions
▶
1. ImgProc.AdaptiveBinarization(SourceImage, LocalBoxSizeValue, IsObjectWhite, ThresholdLevel, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Converts to binary using local adaptive threshold.

Syntax

let result = ImgProc.AdaptiveBinarization(SourceImage, LocalBoxSizeValue, IsObjectWhite, ThresholdLevel, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to binarize.—
LocalBoxSizeValueIntegerSize of local adaptive box.—
IsObjectWhiteBooleanWhether object is white (true) or black (false).—
ThresholdLevelIntegerThreshold level for binarization.—
IsShowProgressBoolean, OptionalWhether to show progress.True
MaskImageBitmap, OptionalOptional mask to constrain binarization.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Binarized image, or Nothing if binarization fails.

Example Code
let binary = ImgProc.AdaptiveBinarization(bitmap, 15, true, 10);
2. ImgProc.AdaptiveContrast(SourceImage, Strength, TilesX, TilesY, ClipLimit, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Applies adaptive contrast enhancement with histogram equalization.

Syntax

let result = ImgProc.AdaptiveContrast(SourceImage, Strength, TilesX, TilesY, ClipLimit, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to enhance.—
StrengthSingle, OptionalEnhancement strength (0.0-1.0).0.6F
TilesXInteger, OptionalNumber of horizontal tiles.8
TilesYInteger, OptionalNumber of vertical tiles.8
ClipLimitSingle, OptionalHistogram clip limit.1.5F
IsShowProgressBoolean, OptionalWhether to show progress.True
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalTrue
Return Value

Bitmap — Contrast-enhanced image, or Nothing if enhancement fails.

Example Code
let enhanced = ImgProc.AdaptiveContrast(bitmap, 0.6, 8, 8, 1.5);
3. ImgProc.AddMargin(SourceImage, LeftMargin, RightMargin, TopMargin, BottomMargin) Returns: Bitmap
▶
Description

Adds margins to image edges with background color.

Syntax

let result = ImgProc.AddMargin(SourceImage, LeftMargin, RightMargin, TopMargin, BottomMargin);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to add margins to.—
LeftMarginIntegerLeft margin size in pixels.—
RightMarginIntegerRight margin size in pixels.—
TopMarginIntegerTop margin size in pixels.—
BottomMarginIntegerBottom margin size in pixels.—
Return Value

Bitmap — Image with added margins, or Nothing if operation fails.

Example Code
let margined = ImgProc.AddMargin(bitmap, 10, 10, 10, 10);
4. ImgProc.AutoContrast(SourceImage, ClipPercent) Returns: Bitmap
▶
Description

Auto adjusts contrast automatically.

Syntax

let result = ImgProc.AutoContrast(SourceImage, ClipPercent);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to adjust.—
ClipPercentSingle, OptionalClip percentage for contrast range.0.5F
Return Value

Bitmap — Contrast-adjusted image, or Nothing if adjustment fails.

Example Code
let contrasted = ImgProc.AutoContrast(bitmap, 0.5);
5. ImgProc.AutoEqualize(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Auto equalizes histogram.

Syntax

let result = ImgProc.AutoEqualize(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to equalize.—
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Histogram-equalized image, or Nothing if equalization fails.

Example Code
let equalized = ImgProc.AutoEqualize(bitmap);
6. ImgProc.AutoGamma(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Auto adjusts gamma curve.

Syntax

let result = ImgProc.AutoGamma(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to adjust.—
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Gamma-adjusted image, or Nothing if adjustment fails.

Example Code
let gammaed = ImgProc.AutoGamma(bitmap);
7. ImgProc.AutoTone(SourceImage, ClipPercent, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Auto adjusts tonal range.

Syntax

let result = ImgProc.AutoTone(SourceImage, ClipPercent, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to adjust.—
ClipPercentSingle, OptionalClip percentage for tonal range.0.5F
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Tone-adjusted image, or Nothing if adjustment fails.

Example Code
let toned = ImgProc.AutoTone(bitmap, 0.5);
8. ImgProc.AutoWhiteBalance(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Auto adjusts white balance.

Syntax

let result = ImgProc.AutoWhiteBalance(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to adjust.—
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — White-balanced image, or Nothing if adjustment fails.

Example Code
let balanced = ImgProc.AutoWhiteBalance(bitmap);
9. ImgProc.BoxAveraging(SourceImage, BoxSizeHalf, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Applies box averaging (simple blur) filter.

Syntax

let result = ImgProc.BoxAveraging(SourceImage, BoxSizeHalf, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to blur.—
BoxSizeHalfIntegerHalf-size of averaging box kernel.—
MaskImageBitmap, OptionalOptional mask to constrain blur.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Blurred image, or Nothing if processing fails.

Example Code
let blurred = ImgProc.BoxAveraging(bitmap, 2);
10. ImgProc.BrightContrast(SourceImage, BrightLevel, ContrastLevel, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Adjusts brightness and contrast of image.

Syntax

let result = ImgProc.BrightContrast(SourceImage, BrightLevel, ContrastLevel, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to adjust.—
BrightLevelIntegerBrightness adjustment level.—
ContrastLevelIntegerContrast adjustment level.—
IsShowProgressBoolean, OptionalWhether to show progress.True
MaskImageBitmap, OptionalOptional mask to constrain adjustment.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Adjusted image, or Nothing if adjustment fails.

Example Code
let brightened = ImgProc.BrightContrast(bitmap, 20, 10);
11. ImgProc.BW_Dithering_FS(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Applies Floyd-Steinberg dithering for black and white conversion.

Syntax

let result = ImgProc.BW_Dithering_FS(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to dither.—
MaskImageBitmap, OptionalOptional mask to constrain dithering.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Dithered black and white image, or Nothing if processing fails.

Example Code
let dithered = ImgProc.BW_Dithering_FS(bitmap);
12. ImgProc.BW_Dithering_OrderedDither(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Applies ordered dithering for black and white conversion.

Syntax

let result = ImgProc.BW_Dithering_OrderedDither(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to dither.—
MaskImageBitmap, OptionalOptional mask to constrain dithering.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Dithered black and white image, or Nothing if processing fails.

Example Code
let dithered = ImgProc.BW_Dithering_OrderedDither(bitmap);
13. ImgProc.CannyEdgeDetecton(SourceImage, LocalBoxSize, SkipGrayScaling, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Detects edges using Canny edge detection algorithm.

Syntax

let result = ImgProc.CannyEdgeDetecton(SourceImage, LocalBoxSize, SkipGrayScaling, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image for edge detection.—
LocalBoxSizeIntegerLocal box size for Canny processing.—
SkipGrayScalingBoolean, OptionalWhether to skip grayscale conversion.False
MaskImageBitmap, OptionalOptional mask to constrain detection.Nothing
MaskRegionBoundaryRectangle, OptionalNothing
IsMaskAllRegionSelectedBoolean, OptionalTrue
Return Value

Bitmap — Edge-detected image, or Nothing if detection fails.

Example Code
let edges = ImgProc.CannyEdgeDetecton(bitmap, 3);
14. ImgProc.ChangeNonBlackToWhite(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Converts all non-black pixels to white, creating binary image.

Syntax

let result = ImgProc.ChangeNonBlackToWhite(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to process.—
MaskImageBitmap, OptionalOptional mask to constrain conversion.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Binary image with white non-black pixels, or Nothing if processing fails.

Example Code
let binary = ImgProc.ChangeNonBlackToWhite(bitmap);
15. ImgProc.CompositeWithMask(originalImage, processedImage, maskImage, processedRegion) Returns: Bitmap
▶
Description

Composites processed image with mask on original.

Syntax

let result = ImgProc.CompositeWithMask(originalImage, processedImage, maskImage, processedRegion);

Parameters
ParameterDescriptionDefault
originalImageBitmapOriginal source image.—
processedImageBitmapProcessed result image.—
maskImageBitmapMask image for blending.—
processedRegionRectangleRegion rectangle for processing.—
Return Value

Bitmap — Composited image, or Nothing if compositing fails.

Example Code
let composite = ImgProc.CompositeWithMask(origBitmap, procBitmap, maskBitmap, rect);
16. ImgProc.Convert_To_24bitBitmap(SourceImage) Returns: Bitmap
▶
Description

Converts image to 24-bit RGB bitmap.

Syntax

let result = ImgProc.Convert_To_24bitBitmap(SourceImage);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to convert.
Type: Bitmap; required; passed by reference.
—
Return Value

Bitmap — 24-bit RGB bitmap, or Nothing if conversion fails.

Example Code
let rgb24 = ImgProc.Convert_To_24bitBitmap(bitmap);
17. ImgProc.Convert_To_24bitImage(SourceImage) Returns: Bitmap
▶
Description

Converts to 24-bit RGB image.

Syntax

let result = ImgProc.Convert_To_24bitImage(SourceImage);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to convert.
Type: Bitmap; required; passed by reference.
—
Return Value

Bitmap — 24-bit RGB image, or Nothing if conversion fails.

Example Code
let rgb24 = ImgProc.Convert_To_24bitImage(bitmap);
18. ImgProc.CorrectUnevenIllumination(SourceImage, GridRows, GridCols, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Corrects uneven illumination using grid-based division.

Syntax

let result = ImgProc.CorrectUnevenIllumination(SourceImage, GridRows, GridCols, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to correct.—
GridRowsInteger, OptionalNumber of grid rows.16
GridColsInteger, OptionalNumber of grid columns.16
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Illumination-corrected image, or Nothing if correction fails.

Example Code
let corrected = ImgProc.CorrectUnevenIllumination(bitmap, 16, 16);
19. ImgProc.Create_BlankImage(SourceImage, BackColor) Returns: Bitmap
▶
Description

Creates blank image with specified background color.

Syntax

let result = ImgProc.Create_BlankImage(SourceImage, BackColor);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image defining dimensions.—
BackColorColorBackground color to fill.—
Return Value

Bitmap — Blank image with specified color, or Nothing if creation fails.

Example Code
let blank = ImgProc.Create_BlankImage(bitmap, Color.White);
20. ImgProc.Create_MaskEllipse(CanvasWidth, CanvasHeighT, MaskRect) Returns: Bitmap
▶
Description

Creates mask for single ellipse region.

Syntax

let result = ImgProc.Create_MaskEllipse(CanvasWidth, CanvasHeighT, MaskRect);

Parameters
ParameterDescriptionDefault
CanvasWidthIntegerCanvas width.—
CanvasHeighTIntegerCanvas height.—
MaskRectRectangleEllipse region for mask.—
Return Value

Bitmap — Mask bitmap, or Nothing if creation fails.

Example Code
let mask = ImgProc.Create_MaskEllipse(800, 600, ellipseRect);
21. ImgProc.Create_MaskEllipses(CanvasWidth, CanvasHeighT, MaskRects()) Returns: Bitmap
▶
Description

Creates mask for multiple ellipse regions.

Syntax

let result = ImgProc.Create_MaskEllipses(CanvasWidth, CanvasHeighT, MaskRects());

Parameters
ParameterDescriptionDefault
CanvasWidthIntegerCanvas width.—
CanvasHeighTIntegerCanvas height.—
MaskRects()Rectangle—
Return Value

Bitmap — Mask bitmap, or Nothing if creation fails.

Example Code
let mask = ImgProc.Create_MaskEllipses(800, 600, ellipses());
22. ImgProc.Create_MaskRectangle(CanvasWidth, CanvasHeighT, MaskRect) Returns: Bitmap
▶
Description

Creates mask for single rectangle region.

Syntax

let result = ImgProc.Create_MaskRectangle(CanvasWidth, CanvasHeighT, MaskRect);

Parameters
ParameterDescriptionDefault
CanvasWidthIntegerCanvas width.—
CanvasHeighTIntegerCanvas height.—
MaskRectRectangleRectangle region for mask.—
Return Value

Bitmap — Mask bitmap, or Nothing if creation fails.

Example Code
let mask = ImgProc.Create_MaskRectangle(800, 600, rect);
23. ImgProc.Create_MaskRectangles(CanvasWidth, CanvasHeighT, MaskRects()) Returns: Bitmap
▶
Description

Creates mask for multiple rectangle regions.

Syntax

let result = ImgProc.Create_MaskRectangles(CanvasWidth, CanvasHeighT, MaskRects());

Parameters
ParameterDescriptionDefault
CanvasWidthIntegerCanvas width.—
CanvasHeighTIntegerCanvas height.—
MaskRects()Rectangle—
Return Value

Bitmap — Mask bitmap, or Nothing if creation fails.

Example Code
let mask = ImgProc.Create_MaskRectangles(800, 600, rects());
24. ImgProc.Crop(SourceImage, nWidth, nHeight, TargetX, TargetY) Returns: Bitmap
▶
Description

Crops image to specified dimensions at target position.

Syntax

let result = ImgProc.Crop(SourceImage, nWidth, nHeight, TargetX, TargetY);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to crop.—
nWidthIntegerWidth of crop area in pixels.—
nHeightIntegerHeight of crop area in pixels.—
TargetXIntegerX coordinate of top-left corner.—
TargetYIntegerY coordinate of top-left corner.—
Return Value

Bitmap — Cropped image, or Nothing if cropping fails.

Example Code
let cropped = ImgProc.Crop(bitmap, 320, 240, 0, 0);
25. ImgProc.DeepCopy(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Creates deep copy of image region.

Syntax

let result = ImgProc.DeepCopy(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to copy.—
MaskImageBitmap, OptionalOptional mask to constrain copy.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Copied image, or Nothing if copy fails.

Example Code
let copy = ImgProc.DeepCopy(bitmap);
26. ImgProc.Dehaze(SourceImage, PatchRadius, DehazeStrength, SaturationBoost, BrightnessBoost, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Removes atmospheric haze, fog, and chamber glare to restore crisp contrast and vivid colors using a high-speed O(1) Dark Channel Prior algorithm.

Syntax

let result = ImgProc.Dehaze(SourceImage, PatchRadius, DehazeStrength, SaturationBoost, BrightnessBoost, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to process.—
PatchRadiusInteger, OptionalLocal patch radius in pixels for haze estimation (1-150).25
DehazeStrengthSingle, OptionalHaze removal intensity (0.0-1.0).0.7F
SaturationBoostSingle, OptionalColor saturation boost after haze removal (-1.0 to 1.0).0.15F
BrightnessBoostInteger, OptionalAdditional brightness compensation (-100 to 100).10
IsShowProgressBoolean, OptionalWhether to show processing progress.True
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Processed Bitmap with Dehaze applied, or Nothing if processing fails.

Example Code
let clearBmp = ImgProc.Dehaze(bitmap, 25, 0.7F, 0.15F, 10);
27. ImgProc.DilateOutlines(SourceGrayImage, BackgroundGray, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Expands specified outline color on grayscale image edges.

Syntax

let result = ImgProc.DilateOutlines(SourceGrayImage, BackgroundGray, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceGrayImageBitmapSource grayscale image.—
BackgroundGrayByteBackground grayscale value.—
MaskImageBitmap, OptionalOptional mask to constrain processing.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Image with dilated outlines, or Nothing if processing fails.

Example Code
let dilated = ImgProc.DilateOutlines(bitmap, 0);
28. ImgProc.Draw_Rectangles(Pic_Target, SourceRectangles(), LineColor) Returns: Bitmap
▶
Description

Draws rectangles on image with specified color.

Syntax

let result = ImgProc.Draw_Rectangles(Pic_Target, SourceRectangles(), LineColor);

Parameters
ParameterDescriptionDefault
Pic_TargetBitmapTarget image to draw on.—
SourceRectangles()Rectangle—
LineColorColorColor of rectangle outlines.—
Return Value

Bitmap — Image with drawn rectangles, or Nothing if drawing fails.

Example Code
let drawn = ImgProc.Draw_Rectangles(bitmap, rects, Color.Red);
29. ImgProc.EdgeDetect_by_ExplicitComp(SourceImage, IsOverlay, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Detects edges using explicit comparison method.

Syntax

let result = ImgProc.EdgeDetect_by_ExplicitComp(SourceImage, IsOverlay, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image for edge detection.—
IsOverlayBooleanWhether to overlay edges on original image.—
MaskImageBitmap, OptionalOptional mask to constrain detection.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Edge-detected image, or Nothing if processing fails.

Example Code
let edges = ImgProc.EdgeDetect_by_ExplicitComp(bitmap, true);
30. ImgProc.EdgeDetect_by_Homogenity(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Detects edges using homogeneity measure.

Syntax

let result = ImgProc.EdgeDetect_by_Homogenity(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image for edge detection.—
MaskImageBitmap, OptionalOptional mask to constrain detection.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Edge-detected image, or Nothing if detection fails.

Example Code
let edges = ImgProc.EdgeDetect_by_Homogenity(bitmap);
31. ImgProc.EdgeDetect_by_LeftHand(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Detects edges using left-hand rule method.

Syntax

let result = ImgProc.EdgeDetect_by_LeftHand(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image for edge detection.—
MaskImageBitmap, OptionalOptional mask to constrain detection.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Edge-detected image, or Nothing if detection fails.

Example Code
let edges = ImgProc.EdgeDetect_by_LeftHand(bitmap);
32. ImgProc.EdgeDetect_by_Sobel(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Detects edges using Sobel operator.

Syntax

let result = ImgProc.EdgeDetect_by_Sobel(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image for edge detection.—
MaskImageBitmap, OptionalOptional mask to constrain detection.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Edge-detected image, or Nothing if detection fails.

Example Code
let edges = ImgProc.EdgeDetect_by_Sobel(bitmap);
33. ImgProc.EdgeDetect_by_UpperLeftHand(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Detects edges using upper-left hand kernel.

Syntax

let result = ImgProc.EdgeDetect_by_UpperLeftHand(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image for edge detection.—
MaskImageBitmap, OptionalOptional mask to constrain detection.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Edge-detected image, or Nothing if detection fails.

Example Code
let edges = ImgProc.EdgeDetect_by_UpperLeftHand(bitmap);
34. ImgProc.Emboss(SourceImage, Angle, Distance, Strength, Bias, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Applies emboss filter to create 3D relief effect.

Syntax

let result = ImgProc.Emboss(SourceImage, Angle, Distance, Strength, Bias, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to emboss.—
AngleSingle, OptionalDirection of light source in degrees (0-360).135.0F
DistanceInteger, OptionalDistance of emboss effect.1
StrengthSingle, OptionalStrength of emboss effect.1.0F
BiasInteger, OptionalBias value for emboss calculation.128
MaskImageBitmap, OptionalOptional mask to constrain effect.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Embossed image, or Nothing if processing fails.

Example Code
let embossed = ImgProc.Emboss(bitmap, 135.0, 1, 1.0, 128);
35. ImgProc.ErodeOutlines(SourceGrayImage, BackgroundGray, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Removes specified outline color from grayscale image edges.

Syntax

let result = ImgProc.ErodeOutlines(SourceGrayImage, BackgroundGray, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceGrayImageBitmapSource grayscale image.—
BackgroundGrayByteBackground grayscale value.—
MaskImageBitmap, OptionalOptional mask to constrain processing.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Image with eroded outlines, or Nothing if processing fails.

Example Code
let eroded = ImgProc.ErodeOutlines(bitmap, 0);
36. ImgProc.Flip_Horizontal(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Flips image horizontally (mirror left-right), either entirely or within a specified mask region.

Syntax

let result = ImgProc.Flip_Horizontal(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to flip.—
MaskImageBitmap, OptionalMask image defining the active region (blue channel = 0 for active pixels).Nothing
MaskRegionBoundaryRectangle, OptionalBounding rectangle of the selected mask region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalTrue to flip the entire image; False to flip only within the masked region.True
Return Value

Bitmap — Horizontally flipped image, or Nothing if flipping fails.

Example Code
let flipped = ImgProc.Flip_Horizontal(bitmap);
37. ImgProc.Flip_Vertical(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Flips image vertically (mirror top-bottom), either entirely or within a specified mask region.

Syntax

let result = ImgProc.Flip_Vertical(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to flip.—
MaskImageBitmap, OptionalMask image defining the active region (blue channel = 0 for active pixels).Nothing
MaskRegionBoundaryRectangle, OptionalBounding rectangle of the selected mask region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalTrue to flip the entire image; False to flip only within the masked region.True
Return Value

Bitmap — Vertically flipped image, or Nothing if flipping fails.

Example Code
let flipped = ImgProc.Flip_Vertical(bitmap);
38. ImgProc.GammaAdjustment(SourceImage, gammaValue, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Applies gamma adjustment to modify the overall brightness and contrast of the image.

Syntax

let result = ImgProc.GammaAdjustment(SourceImage, gammaValue, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image for gamma adjustment.—
gammaValueDoubleGamma value for adjustment.—
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Gamma-adjusted image, or Nothing if adjustment fails.

Example Code
let adjusted = ImgProc.GammaAdjustment(bitmap, 1.5);
39. ImgProc.GaussianFilter(SourceImage, FilterSize, WeightFactor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Applies Gaussian blur filter with configurable size.

Syntax

let result = ImgProc.GaussianFilter(SourceImage, FilterSize, WeightFactor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to blur.—
FilterSizeIntegerSize of Gaussian kernel.—
WeightFactorInteger, OptionalWeight factor for Gaussian (0 for default).0
MaskImageBitmap, OptionalOptional mask to constrain blur.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Blurred image, or Nothing if processing fails.

Example Code
let blurred = ImgProc.GaussianFilter(bitmap, 3, 0);
40. ImgProc.Generate_Canvas(nWidth, nHeight, BackColor) Returns: Bitmap
▶
Description

Creates blank canvas with specified dimensions and background color.

Syntax

let result = ImgProc.Generate_Canvas(nWidth, nHeight, BackColor);

Parameters
ParameterDescriptionDefault
nWidthIntegerCanvas width in pixels.—
nHeightIntegerCanvas height in pixels.—
BackColorColorBackground color for canvas.—
Return Value

Bitmap — Blank canvas image, or Nothing if creation fails.

Example Code
let canvas = ImgProc.Generate_Canvas(640, 480, Color.White);
41. ImgProc.HDRLocalToneMapping(SourceImage, BlurRadius, DetailStrength, ToneCompression, BrightnessBoost, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Enhances local contrast and compresses dynamic range (shadow/highlight recovery) using a high-speed O(1) Stack Blur algorithm.

Syntax

let result = ImgProc.HDRLocalToneMapping(SourceImage, BlurRadius, DetailStrength, ToneCompression, BrightnessBoost, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to process.—
BlurRadiusInteger, OptionalLocal neighborhood radius in pixels (1-150).40
DetailStrengthSingle, OptionalClarity and fine-detail amplification strength (0.0-3.0).1.2F
ToneCompressionSingle, OptionalShadow/highlight dynamic range compression strength (0.0-1.0).0.5F
BrightnessBoostInteger, OptionalAdditional brightness boost applied to the final pixels (-100 to 100).0
IsShowProgressBoolean, OptionalWhether to show processing progress.True
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Processed Bitmap with HDR Local Tone Mapping applied, or Nothing if processing fails.

Example Code
let hdrBmp = ImgProc.HDRLocalToneMapping(bitmap, 40, 1.2F, 0.5F, 0);
42. ImgProc.HighlightBloomHalation(SourceImage, SpreadRadius, Threshold, BloomStrength, HalationTint, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Applies selective optical highlight bloom and analog cinema film halation to bright light sources using a high-speed O(1) Stack Blur engine.

Syntax

let result = ImgProc.HighlightBloomHalation(SourceImage, SpreadRadius, Threshold, BloomStrength, HalationTint, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to process.—
SpreadRadiusInteger, OptionalDiffusion radius in pixels (1-150).25
ThresholdInteger, OptionalLuminance threshold for isolating bright highlights (0-250).180
BloomStrengthSingle, OptionalIntensity of the highlight bloom glow (0.0-2.0).0.8F
HalationTintSingle, OptionalRed-orange cinema film halation tint ratio (0.0-1.0).0.0F
IsShowProgressBoolean, OptionalWhether to show processing progress.True
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Processed Bitmap with Highlight Bloom & Halation applied, or Nothing if processing fails.

Example Code
let bloomBmp = ImgProc.HighlightBloomHalation(bitmap, 25, 180, 0.8F, 0.35F);
43. ImgProc.HighPassSharpening(SourceImage, Radius, Strength, Threshold, BlendMode, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Sharpens multi-scale structural edges and surface textures using a high-speed O(1) High-Pass frequency extraction algorithm.

Syntax

let result = ImgProc.HighPassSharpening(SourceImage, Radius, Strength, Threshold, BlendMode, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to process.—
RadiusInteger, OptionalFrequency radius in pixels (1-100).10
StrengthSingle, OptionalHigh-frequency detail amplification strength (0.0-2.0).1.0F
ThresholdInteger, OptionalNoise suppression threshold in pixel levels (0-50).3
BlendModeInteger, OptionalInteger representing the blending algorithm.
Supported values:
0: Overlay (Balanced)
1: SoftLight (Subtle)
2: HardLight (Intense)
0
IsShowProgressBoolean, OptionalWhether to show processing progress.True
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Processed Bitmap with High-Pass Sharpening applied, or Nothing if processing fails.

Example Code
let sharpBmp = ImgProc.HighPassSharpening(bitmap, 10, 1.0F, 3, 0);
44. ImgProc.HoughTransform_For_Circle(SourceImage, Radius, AngleCount, IsAbsoluteNormalization, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Detects circles in image using Hough transform.

Syntax

let result = ImgProc.HoughTransform_For_Circle(SourceImage, Radius, AngleCount, IsAbsoluteNormalization, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image for circle detection.
Type: Bitmap; required; passed by reference.
—
RadiusSingleCircle radius to detect.—
AngleCountIntegerNumber of angles to check.—
IsAbsoluteNormalizationBooleanWhether to use absolute normalization.—
MaskImageBitmap, OptionalOptional mask to constrain detection.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Image with detected circles, or Nothing if detection fails.

Example Code
let circles = ImgProc.HoughTransform_For_Circle(bitmap, 50.0, 360, true);
45. ImgProc.HoughTransform_For_Line(SourceImage, UserMaxCount, IsAbsoluteNormalization, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Detects lines in image using Hough transform.

Syntax

let result = ImgProc.HoughTransform_For_Line(SourceImage, UserMaxCount, IsAbsoluteNormalization, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image for line detection.
Type: Bitmap; required; passed by reference.
—
UserMaxCountIntegerMaximum line count to detect.—
IsAbsoluteNormalizationBooleanWhether to use absolute normalization.—
MaskImageBitmap, OptionalOptional mask to constrain detection.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Image with detected lines, or Nothing if detection fails.

Example Code
let lines = ImgProc.HoughTransform_For_Line(bitmap, 10, true);
46. ImgProc.Image_FromFile(FileName) Returns: Bitmap
▶
Description

Loads image from file path.

Syntax

let result = ImgProc.Image_FromFile(FileName);

Parameters
ParameterDescriptionDefault
FileNameStringPath to image file.—
Return Value

Bitmap — Loaded image as Bitmap, or Nothing if loading fails.

Example Code
let bitmap = ImgProc.Image_FromFile("C:\\Images\\photo.jpg");
47. ImgProc.ImageStamp(SourceImage, StampImage, destRectX, destRectY, destRectWidth, destRectHeight, angle, opacityPercent, enableTransparentColor, transparentColorArgb, enableFeather, featherRadius, enableGradualAlpha, tolerance) Returns: Bitmap
▶
Description

Stamps overlay image on source with transformation.

Syntax

let result = ImgProc.ImageStamp(SourceImage, StampImage, destRectX, destRectY, destRectWidth, destRectHeight, angle, opacityPercent, enableTransparentColor, transparentColorArgb, enableFeather, featherRadius, enableGradualAlpha, tolerance);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to stamp on.—
StampImageBitmapStamp image to overlay.—
destRectXSingleDestination rectangle X.—
destRectYSingleDestination rectangle Y.—
destRectWidthSingleDestination rectangle width.—
destRectHeightSingleDestination rectangle height.—
angleSingle, OptionalRotation angle in degrees.0.0F
opacityPercentInteger, OptionalOpacity percentage (0-100).100
enableTransparentColorBoolean, OptionalWhether to enable transparent color.False
transparentColorArgbInteger, OptionalARGB color value for transparency.-1
enableFeatherBoolean, OptionalWhether to enable edge feathering.False
featherRadiusInteger, OptionalFeather radius in pixels.10
enableGradualAlphaBoolean, OptionalWhether to enable gradual alpha.False
toleranceInteger, OptionalColor tolerance threshold.30
Return Value

Bitmap — Stamped image, or Nothing if stamping fails.

Example Code
let stamped = ImgProc.ImageStamp(bitmap, stampBitmap, 10, 10, 100, 100, 0, 100);
48. ImgProc.Invert(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Inverts image colors (photographic negative).

Syntax

let result = ImgProc.Invert(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to invert.—
MaskImageBitmap, OptionalOptional mask to constrain inversion.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Inverted image, or Nothing if inversion fails.

Example Code
let inverted = ImgProc.Invert(bitmap);
49. ImgProc.ManualBinarization(SourceImage, ThresholdValue, SkipGrayScaling, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Converts image to binary using manual threshold value.

Syntax

let result = ImgProc.ManualBinarization(SourceImage, ThresholdValue, SkipGrayScaling, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to binarize.—
ThresholdValueIntegerThreshold value for binarization (0-255).—
SkipGrayScalingBoolean, OptionalWhether to skip grayscale conversion.False
IsShowProgressBoolean, OptionalWhether to display progress.True
MaskImageBitmap, OptionalOptional mask to constrain binarization.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Binary image, or Nothing if binarization fails.

Example Code
let binary = ImgProc.ManualBinarization(bitmap, 128);
50. ImgProc.MiniatureEffect(SourceImage, BlurRadius, FocusPosition, FocusSize, SaturationBoost, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Simulates a tilt-shift miniature lens effect with smooth depth-of-field blurring and saturation enhancement.

Syntax

let result = ImgProc.MiniatureEffect(SourceImage, BlurRadius, FocusPosition, FocusSize, SaturationBoost, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to process.—
BlurRadiusInteger, OptionalOut-of-focus blur radius in pixels (1-150).25
FocusPositionSingle, OptionalVertical center position of the sharp focus zone (0.0-1.0).0.5F
FocusSizeSingle, OptionalRelative height of the sharp focus band (0.05-0.80).0.25F
SaturationBoostSingle, OptionalColor vibrancy boost (-1.0 to 1.0).0.25F
IsShowProgressBoolean, OptionalWhether to show processing progress.True
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Processed Bitmap with Miniature Effect applied, or Nothing if processing fails.

Example Code
let miniBmp = ImgProc.MiniatureEffect(bitmap, 25, 0.5F, 0.25F, 0.25F);
51. ImgProc.MosaicFilter(SourceImage, isPixelMode, value, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Applies mosaic or pixelation effect to blur regions.

Syntax

let result = ImgProc.MosaicFilter(SourceImage, isPixelMode, value, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to process.—
isPixelModeBooleanWhether to use pixel mode.—
valueIntegerMosaic block size or pixel value.—
MaskImageBitmap, OptionalOptional mask to constrain effect.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Mosaiced image, or Nothing if processing fails.

Example Code
let mosaiced = ImgProc.MosaicFilter(bitmap, true, 10);
52. ImgProc.MultibandColor(original, rSat, rInt, ySat, yInt, gSat, gInt, cSat, cyanInt, bSat, bInt, mSat, mInt, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Applies multiband color processing adjusting saturation and intensity by color band.

Syntax

let result = ImgProc.MultibandColor(original, rSat, rInt, ySat, yInt, gSat, gInt, cSat, cyanInt, bSat, bInt, mSat, mInt, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
originalBitmapSource image to process.—
rSatIntegerRed saturation adjustment (-100 to 100).—
rIntIntegerRed intensity adjustment (-100 to 100).—
ySatIntegerYellow saturation adjustment (-100 to 100).—
yIntIntegerYellow intensity adjustment (-100 to 100).—
gSatIntegerGreen saturation adjustment (-100 to 100).—
gIntIntegerGreen intensity adjustment (-100 to 100).—
cSatIntegerCyan saturation adjustment (-100 to 100).—
cyanIntIntegerCyan intensity adjustment (-100 to 100).—
bSatIntegerBlue saturation adjustment (-100 to 100).—
bIntIntegerBlue intensity adjustment (-100 to 100).—
mSatIntegerMagenta saturation adjustment (-100 to 100).—
mIntIntegerMagenta intensity adjustment (-100 to 100).—
MaskImageImage, OptionalOptional mask to constrain processing.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Color-adjusted image, or Nothing if processing fails.

Example Code
let mbcolor = ImgProc.MultibandColor(bitmap, 10, 5, -5, 10, 0, 0, 5, 0, -10, 5, 0, 0);
53. ImgProc.OrtonEffect(SourceImage, BlurRadius, GlowStrength, ExposureBoost, BrightnessBoost, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Applies a dreamy, painterly luminescence (Orton Effect) by combining overexposed sharp and blurred layers via Multiply blending.

Syntax

let result = ImgProc.OrtonEffect(SourceImage, BlurRadius, GlowStrength, ExposureBoost, BrightnessBoost, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to process.—
BlurRadiusInteger, OptionalBlur radius for the glow diffusion in pixels (1-150).25
GlowStrengthSingle, OptionalOverall blending opacity of the Orton effect (0.0-1.0).0.6F
ExposureBoostSingle, OptionalHighlight overexposure boost in the Screen pass (0.0-1.0).0.7F
BrightnessBoostInteger, OptionalAdditional brightness boost applied to the final pixels (-100 to 100).0
IsShowProgressBoolean, OptionalWhether to show processing progress.True
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Processed Bitmap with Orton Effect applied, or Nothing if processing fails.

Example Code
let ortonBmp = ImgProc.OrtonEffect(bitmap, 25, 0.6F, 0.7F, 0);
54. ImgProc.Outline(SourceImage, InvertBinarization, ApplyBinarization, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Applies edge detection (outline) filter to extract object boundaries while always preserving the original pixel colors on the extracted outlines.

Syntax

let result = ImgProc.Outline(SourceImage, InvertBinarization, ApplyBinarization, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image for edge detection.—
InvertBinarizationBoolean, OptionalWhether to invert the binarization or background result (e.g., dark objects on a light background).False
ApplyBinarizationBoolean, OptionalWhether 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
IsShowProgressBoolean, OptionalWhether to display progress.False
MaskImageBitmap, OptionalOptional mask to constrain edge detection.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Edge-detected image with original pixel colors preserved on the outlines, or Nothing if processing fails.

Example Code
let edges = ImgProc.Outline(bitmap, false, false, false);
55. ImgProc.Overlay_Mask3DByte_To_Image(SourceImage, SourceMaskImage3DByte, TransparentColor, Opacity, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Overlays 3D byte mask to image with transparency.

Syntax

let result = ImgProc.Overlay_Mask3DByte_To_Image(SourceImage, SourceMaskImage3DByte, TransparentColor, Opacity, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to overlay.
Type: Bitmap; required; passed by reference.
—
SourceMaskImage3DByteByte(,,)3D byte array mask [height, width, channels].
Type: Byte(,,); required; passed by reference.
—
TransparentColorIntegerColor to treat as transparent.—
OpacitySingleOpacity level (0.0-1.0).—
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Overlaid image, or Nothing if overlay fails.

Example Code
let overlaid = ImgProc.Overlay_Mask3DByte_To_Image(bitmap, maskArray, RGB(255,255,255), 0.5);
56. ImgProc.Overlay_MaskImage2DArray_To_Image3DArray(SourceImage2DArray(,,), MaskImage2DArray, MaskRed, MaskGreen, MaskBlue, x1, y1, TransparentColor) Returns: Void
▶
Description

Overlays 2D mask array on 3D image array.

Syntax

ImgProc.Overlay_MaskImage2DArray_To_Image3DArray(SourceImage2DArray(,,), MaskImage2DArray, MaskRed, MaskGreen, MaskBlue, x1, y1, TransparentColor);

Parameters
ParameterDescriptionDefault
SourceImage2DArray(,,)Byte—
MaskImage2DArrayByte(,)2D byte array mask [height, width].
Type: Byte(,); required; passed by reference.
—
MaskRedByteRed channel value for mask.—
MaskGreenByteGreen channel value for mask.—
MaskBlueByteBlue channel value for mask.—
x1IntegerStart X coordinate.—
y1IntegerStart Y coordinate.—
TransparentColorByteTransparent color value.—
Return Value

Void — None.

Example Code
ImgProc.Overlay_MaskImage2DArray_To_Image3DArray(imageArray, maskArray, 255, 0, 0, 0, 0, 255);
57. ImgProc.Overlay_MaskImage_To_Image(SourceImage, SourceMaskImage, TransparentColor, Opacity) Returns: Bitmap
▶
Description

Overlays mask bitmap to image with transparency.

Syntax

let result = ImgProc.Overlay_MaskImage_To_Image(SourceImage, SourceMaskImage, TransparentColor, Opacity);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to overlay.
Type: Bitmap; required; passed by reference.
—
SourceMaskImageBitmapMask image to overlay.
Type: Bitmap; required; passed by reference.
—
TransparentColorIntegerColor to treat as transparent.—
OpacitySingleOpacity level (0.0-1.0).—
Return Value

Bitmap — Overlaid image, or Nothing if overlay fails.

Example Code
let overlaid = ImgProc.Overlay_MaskImage_To_Image(bitmap, maskBitmap, RGB(255,255,255), 0.5);
58. ImgProc.OverlayImage(SourceImage, overlayImg, transR, transG, transB, opacity, isFeather, featherRadius, tolerance, isGradual, MaskImage, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Overlays another image with transparency and feathering.

Syntax

let result = ImgProc.OverlayImage(SourceImage, overlayImg, transR, transG, transB, opacity, isFeather, featherRadius, tolerance, isGradual, MaskImage, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image for overlay.—
overlayImgBitmapImage to overlay on source.—
transRInteger, OptionalTransparent red component (0-255).255
transGInteger, OptionalTransparent green component (0-255).255
transBInteger, OptionalTransparent blue component (0-255).255
opacitySingle, OptionalOpacity factor (0.0-1.0).1.0F
isFeatherBoolean, OptionalWhether to apply edge feathering.False
featherRadiusInteger, OptionalFeather radius in pixels.10
toleranceInteger, OptionalColor tolerance threshold (0-255).0
isGradualBoolean, OptionalWhether to apply gradual blending.False
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Overlaid image, or Nothing if operation fails.

Example Code
let overlaid = ImgProc.OverlayImage(bitmap, overlayBitmap, 255, 255, 255, 1.0, false, 10);
59. ImgProc.OverlayMask_Parallel(sourceImage, maskImage, overlayColor, alpha) Returns: Bitmap
▶
Description

Overlays mask with color and alpha transparency.

Syntax

let result = ImgProc.OverlayMask_Parallel(sourceImage, maskImage, overlayColor, alpha);

Parameters
ParameterDescriptionDefault
sourceImageBitmapSource image to overlay.—
maskImageBitmapMask image.—
overlayColorColorColor for overlay.—
alphaIntegerAlpha transparency value.—
Return Value

Bitmap — Overlaid image, or Nothing if overlay fails.

Example Code
let overlaid = ImgProc.OverlayMask_Parallel(bitmap, maskBitmap, Color.Red, 128);
60. ImgProc.PasteAndFitToRectangle(BaseImage, OverlayImage, TargetRect) Returns: Bitmap
▶
Description

Pastes and fits overlay image into target rectangle.

Syntax

let result = ImgProc.PasteAndFitToRectangle(BaseImage, OverlayImage, TargetRect);

Parameters
ParameterDescriptionDefault
BaseImageBitmapBase image to paste on.—
OverlayImageBitmapOverlay image to paste.—
TargetRectRectangleTarget rectangle for pasting.—
Return Value

Bitmap — Pasted and fitted image, or Nothing if operation fails.

Example Code
let pasted = ImgProc.PasteAndFitToRectangle(baseImage, overlayImage, New Rectangle(10, 10, 100, 100));
61. ImgProc.Remap(SourceImage, mapX, mapY, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Remaps image using coordinate maps.

Syntax

let result = ImgProc.Remap(SourceImage, mapX, mapY, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to remap.—
mapXSingle(,)X coordinate map.—
mapYSingle(,)Y coordinate map.—
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Remapped image, or Nothing if remapping fails.

Example Code
let remapped = ImgProc.Remap(bitmap, xMap, yMap);
62. ImgProc.RemoveBackground(SourceImage, MatteImage, MaskRegionBoundary, IsMaskAllRegionSelected, BgColor, NewBackgroundImage) Returns: Bitmap
▶
Description

Removes background using matte with optional replacement.

Syntax

let result = ImgProc.RemoveBackground(SourceImage, MatteImage, MaskRegionBoundary, IsMaskAllRegionSelected, BgColor, NewBackgroundImage);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to process.—
MatteImageBitmapMatte/alpha mask image.—
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
BgColorColor, OptionalBackground color replacement.Nothing
NewBackgroundImageBitmap, OptionalNew background image to composite.Nothing
Return Value

Bitmap — Image with background removed, or Nothing if operation fails.

Example Code
let noBackground = ImgProc.RemoveBackground(bitmap, matteBitmap);
63. ImgProc.Resize(SourceImage, nWidth, nHeight, InterpolationMode) Returns: Bitmap
▶
Description

Resizes image to specified width and height.

Syntax

let result = ImgProc.Resize(SourceImage, nWidth, nHeight, InterpolationMode);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to resize.—
nWidthIntegerTarget width in pixels.—
nHeightIntegerTarget height in pixels.—
InterpolationModeDrawing2D.InterpolationMode, OptionalEnum 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 — Resized image, or Nothing if resizing fails.

Example Code
let resized = ImgProc.Resize(bitmap, 640, 480);
64. ImgProc.Resize_Canvas(SourceImage, nWidth, nHeight, StretchDirection, BackColor) Returns: Bitmap
▶
Description

Resizes canvas and places the image within new dimensions.

Syntax

let result = ImgProc.Resize_Canvas(SourceImage, nWidth, nHeight, StretchDirection, BackColor);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to resize.—
nWidthIntegerNew canvas width.—
nHeightIntegerNew canvas height.—
StretchDirectionStringImage 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
—
BackColorColorBackground fill color.—
Return Value

Bitmap — Resized canvas image, or Nothing if resizing fails.

Example Code
let resized = ImgProc.Resize_Canvas(bitmap, 640, 480, "Center", Color.White);
65. ImgProc.ResizeByZoomFactor(SourceImage, ZoomFactor, InterpolationMode) Returns: Bitmap
▶
Description

Resizes image by specified zoom factor (e.g., 0.5 for 50%, 2.0 for 200%).

Syntax

let result = ImgProc.ResizeByZoomFactor(SourceImage, ZoomFactor, InterpolationMode);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to resize.—
ZoomFactorSingleZoom factor multiplier.—
InterpolationModeDrawing2D.InterpolationMode, OptionalEnum 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 — Resized image, or Nothing if resizing fails.

Example Code
let resized = ImgProc.ResizeByZoomFactor(bitmap, 0.5);
66. ImgProc.RollingBoxBackgroundSubtraction(SourceImage, Radius, IsAutomatic, IsObjectWhite, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Removes background using rolling box filter.

Syntax

let result = ImgProc.RollingBoxBackgroundSubtraction(SourceImage, Radius, IsAutomatic, IsObjectWhite, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to process.—
RadiusIntegerRolling box radius.—
IsAutomaticBoolean, OptionalWhether to use automatic mode.False
IsObjectWhiteBoolean, OptionalWhether object is white or black.True
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Background-subtracted image, or Nothing if operation fails.

Example Code
let subtracted = ImgProc.RollingBoxBackgroundSubtraction(bitmap, 50);
67. ImgProc.Rotate(SourceImage, CenterX, CenterY, AngleDegree, BackgroundColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Rotates image around specified center point by angle in degrees, either entirely or within a specified mask region.

Syntax

let result = ImgProc.Rotate(SourceImage, CenterX, CenterY, AngleDegree, BackgroundColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to rotate.—
CenterXIntegerX coordinate of rotation center.—
CenterYIntegerY coordinate of rotation center.—
AngleDegreeSingleRotation angle in degrees.—
BackgroundColorColorFill color for empty areas after rotation.—
MaskImageBitmap, OptionalMask image defining the active region (blue channel = 0 for active pixels).Nothing
MaskRegionBoundaryRectangle, OptionalBounding rectangle of the selected mask region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalTrue to rotate the entire image; False to rotate only within the masked region.True
Return Value

Bitmap — Rotated image, or Nothing if rotation fails.

Example Code
let rotated = ImgProc.Rotate(bitmap, 320, 240, 45.0, Color.White);
68. ImgProc.RotateAtCenter(SourceImage, AngleDegree) Returns: Bitmap
▶
Description

Rotates image around its center by specified angle in degrees.

Syntax

let result = ImgProc.RotateAtCenter(SourceImage, AngleDegree);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to rotate.—
AngleDegreeSingleRotation angle in degrees.—
Return Value

Bitmap — Rotated image, or Nothing if rotation fails.

Example Code
let rotated = ImgProc.RotateAtCenter(bitmap, 45.0);
69. ImgProc.RotateFlip(SourceImage, RotateFlipOption) Returns: Bitmap
▶
Description

Applies rotation and flip transformation to image.

Syntax

let result = ImgProc.RotateFlip(SourceImage, RotateFlipOption);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to transform.—
RotateFlipOptionRotateFlipTypeType 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 — Transformed image, or Nothing if transformation fails.

Example Code
let transformed = ImgProc.RotateFlip(bitmap, RotateFlipType.Rotate90FlipNone);
70. ImgProc.ShadowsHighlights(SourceImage, ShadowAmount, HighlightAmount, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Adjusts shadows and highlights separately.

Syntax

let result = ImgProc.ShadowsHighlights(SourceImage, ShadowAmount, HighlightAmount, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to adjust.—
ShadowAmountSingle, OptionalShadow adjustment amount.50.0F
HighlightAmountSingle, OptionalHighlight adjustment amount.0.0F
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Adjusted image, or Nothing if adjustment fails.

Example Code
let adjusted = ImgProc.ShadowsHighlights(bitmap, 50.0, 0.0);
71. ImgProc.Sharpen_3x3(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Sharpens image using basic 3x3 kernel.

Syntax

let result = ImgProc.Sharpen_3x3(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to sharpen.—
MaskImageBitmap, OptionalOptional mask to constrain sharpening.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Sharpened image, or Nothing if processing fails.

Example Code
let sharpened = ImgProc.Sharpen_3x3(bitmap);
72. ImgProc.Sharpen_3x3_Improved(SourceImage, Strength, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Sharpens image using improved 3x3 kernel with adjustable strength.

Syntax

let result = ImgProc.Sharpen_3x3_Improved(SourceImage, Strength, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to sharpen.—
StrengthSingle, OptionalSharpening strength factor.1.0F
MaskImageBitmap, OptionalOptional mask to constrain sharpening.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Sharpened image, or Nothing if processing fails.

Example Code
let sharpened = ImgProc.Sharpen_3x3_Improved(bitmap, 1.5);
73. ImgProc.Sharpen_5x5_HighQuality_Fixed(SourceImage, Strength, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Sharpens image using high-quality 5x5 kernel.

Syntax

let result = ImgProc.Sharpen_5x5_HighQuality_Fixed(SourceImage, Strength, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to sharpen.—
StrengthSingle, OptionalSharpening strength factor.1.0F
MaskImageBitmap, OptionalOptional mask to constrain sharpening.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — High-quality sharpened image, or Nothing if processing fails.

Example Code
let sharpened = ImgProc.Sharpen_5x5_HighQuality_Fixed(bitmap, 1.2);
74. ImgProc.Sharpen_UnsharpMask(SourceImage, FilterSize, AmountPercent, Threshold, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Sharpens image using unsharp mask technique.

Syntax

let result = ImgProc.Sharpen_UnsharpMask(SourceImage, FilterSize, AmountPercent, Threshold, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to sharpen.—
FilterSizeInteger, OptionalFilter kernel size.11
AmountPercentInteger, OptionalSharpening amount percentage.100
ThresholdInteger, OptionalEdge detection threshold.0
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Sharpened image, or Nothing if sharpening fails.

Example Code
let sharpened = ImgProc.Sharpen_UnsharpMask(bitmap, 11, 100, 0);
75. ImgProc.SmartDenoise(SourceImage, Radius, Threshold, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Applies smart noise reduction preserving edges.

Syntax

let result = ImgProc.SmartDenoise(SourceImage, Radius, Threshold, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to denoise.—
RadiusInteger, OptionalFilter radius.5
ThresholdInteger, OptionalEdge preservation threshold.30
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Denoised image, or Nothing if denoising fails.

Example Code
let denoised = ImgProc.SmartDenoise(bitmap, 5, 30);
76. ImgProc.SmartSketch(SourceImage, StrokeWidth, PencilDarkness, ColorBlend, PaperBrightness, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Converts the image into a fine pencil sketch or colored-pencil technical line art using a high-speed O(1) Color Dodge algorithm.

Syntax

let result = ImgProc.SmartSketch(SourceImage, StrokeWidth, PencilDarkness, ColorBlend, PaperBrightness, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to process.—
StrokeWidthInteger, OptionalStroke width (blur radius) in pixels (1-100).15
PencilDarknessSingle, OptionalGraphite line darkness and shading intensity (0.01-1.0).0.5F
ColorBlendSingle, OptionalOriginal color blending ratio (0.0 for pure grayscale sketch, up to 1.0 for colored-pencil look).0.0F
PaperBrightnessInteger, OptionalBackground paper brightness adjustment (-100 to 100).0
IsShowProgressBoolean, OptionalWhether to show processing progress.True
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Processed Bitmap with Smart Sketch applied, or Nothing if processing fails.

Example Code
let sketchBmp = ImgProc.SmartSketch(bitmap, 15, 0.5F, 0.0F, 0);
77. ImgProc.SoftGlow(SourceImage, BlurRadius, GlowStrength, BrightnessBoost, BlendMode, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Applies a dreamy, radiant luminescence effect using a high-speed O(1) Stack Blur and Screen/SoftLight blending.

Syntax

let result = ImgProc.SoftGlow(SourceImage, BlurRadius, GlowStrength, BrightnessBoost, BlendMode, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to process.—
BlurRadiusInteger, OptionalBlur radius for the glow diffusion in pixels (1-150).20
GlowStrengthSingle, OptionalBlending strength (opacity) of the glow layer (0.0-1.0).0.45F
BrightnessBoostInteger, OptionalAdditional brightness boost applied to the final blended pixels (-100 to 100).5
BlendModeInteger, OptionalInteger representing the blending algorithm used to combine the glow layer with the base image.
Supported values:
0: Screen (Bright & Airy)
1: SoftLight (Gentle Contrast)
0
IsShowProgressBoolean, OptionalWhether to show processing progress.True
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Processed Bitmap with Soft Glow applied, or Nothing if processing fails.

Example Code
let glowing = ImgProc.SoftGlow(bitmap, 20, 0.45F, 5, 0);
78. ImgProc.StackBlur(SourceImage, BoxSizeHalf, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Applies high-speed stack blur filter.

Syntax

let result = ImgProc.StackBlur(SourceImage, BoxSizeHalf, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to blur.—
BoxSizeHalfIntegerBlur radius (half-size).—
MaskImageBitmap, OptionalOptional mask to constrain blur.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Blurred image, or Nothing if processing fails.

Example Code
let blurred = ImgProc.StackBlur(bitmap, 5);
79. ImgProc.StandardFilter(SourceImage, FilterMask(,), WeightFactor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Applies custom convolution filter mask to image.

Syntax

let result = ImgProc.StandardFilter(SourceImage, FilterMask(,), WeightFactor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to filter.—
FilterMask(,)Single—
WeightFactorInteger, OptionalWeight factor for filter (0 for default).0
MaskImageBitmap, OptionalOptional mask to constrain filtering.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Filtered image, or Nothing if processing fails.

Example Code
let filtered = ImgProc.StandardFilter(bitmap, {{0,1,0},{1,-4,1},{0,1,0}});
80. ImgProc.TextAnnotation(SourceImage, x, y, textString, fontName, fontSize, fontStyleInt, innerColorArgb, outerColorArgb, opacityPercent, outlineThickness, angle, isAntiAlias) Returns: Bitmap
▶
Description

Annotates image with text and outline style.

Syntax

let result = ImgProc.TextAnnotation(SourceImage, x, y, textString, fontName, fontSize, fontStyleInt, innerColorArgb, outerColorArgb, opacityPercent, outlineThickness, angle, isAntiAlias);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to annotate.—
xSingleText X position.—
ySingleText Y position.—
textStringStringText content to draw.—
fontNameString, OptionalFont name."Microsoft Sans Serif"
fontSizeSingle, OptionalFont size in points.70.0F
fontStyleIntInteger, OptionalInteger representing the font style.
Supported fontStyleInt values:
0: Regular
1: Bold
2: Italic
3: Bold Italic
4: Underline
8: Strikeout
0
innerColorArgbInteger, OptionalInner text color ARGB.-1
outerColorArgbInteger, OptionalOutline color ARGB.-16777216
opacityPercentInteger, OptionalOpacity percentage (0-100).100
outlineThicknessSingle, OptionalOutline thickness in pixels.10.0F
angleSingle, OptionalText rotation angle in degrees.0.0F
isAntiAliasBoolean, OptionalWhether to use anti-aliasing.True
Return Value

Bitmap — Annotated image, or Nothing if annotation fails.

Example Code
let annotated = ImgProc.TextAnnotation(bitmap, 10, 10, "Hello", "Arial", 70, 0, -1, -16777216);
Processing & Morphological Actions 21 functions
▶
1. ImgProc.BinaryOperation_AND(SourceGrayImage1, SourceGrayImage2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Performs binary AND operation on two grayscale images.

Syntax

let result = ImgProc.BinaryOperation_AND(SourceGrayImage1, SourceGrayImage2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceGrayImage1BitmapFirst grayscale image.
Type: Bitmap; required; passed by reference.
—
SourceGrayImage2BitmapSecond grayscale image.
Type: Bitmap; required; passed by reference.
—
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Result of AND operation, or Nothing if operation fails.

Example Code
let andResult = ImgProc.BinaryOperation_AND(grayBitmap1, grayBitmap2);
2. ImgProc.BinaryOperation_OR(SourceGrayImage1, SourceGrayImage2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Performs binary OR operation on two grayscale images.

Syntax

let result = ImgProc.BinaryOperation_OR(SourceGrayImage1, SourceGrayImage2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceGrayImage1BitmapFirst grayscale image.
Type: Bitmap; required; passed by reference.
—
SourceGrayImage2BitmapSecond grayscale image.
Type: Bitmap; required; passed by reference.
—
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Result of OR operation, or Nothing if operation fails.

Example Code
let orResult = ImgProc.BinaryOperation_OR(grayBitmap1, grayBitmap2);
3. ImgProc.BinaryOperation_XOR(SourceGrayImage1, SourceGrayImage2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Performs binary XOR operation on two grayscale images.

Syntax

let result = ImgProc.BinaryOperation_XOR(SourceGrayImage1, SourceGrayImage2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceGrayImage1BitmapFirst grayscale image.
Type: Bitmap; required; passed by reference.
—
SourceGrayImage2BitmapSecond grayscale image.
Type: Bitmap; required; passed by reference.
—
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Result of XOR operation, or Nothing if operation fails.

Example Code
let xorResult = ImgProc.BinaryOperation_XOR(grayBitmap1, grayBitmap2);
4. ImgProc.BWLeveling_Using_FloodFillWithTolerance(SourceGrayImage, IsConductBlurring, IsFindThresholdValue, DefaultThresholdValue, Return_OptimalThresholdValue) Returns: Bitmap
▶
Description

Applies black-white leveling with optional auto thresholding.

Syntax

let result = ImgProc.BWLeveling_Using_FloodFillWithTolerance(SourceGrayImage, IsConductBlurring, IsFindThresholdValue, DefaultThresholdValue, Return_OptimalThresholdValue);

Parameters
ParameterDescriptionDefault
SourceGrayImageBitmapSource grayscale image.—
IsConductBlurringBooleanWhether to conduct blurring.—
IsFindThresholdValueBooleanWhether to auto-find threshold.—
DefaultThresholdValueIntegerDefault threshold value if not auto-finding.—
Return_OptimalThresholdValueIntegerOutput optimal threshold value.
Type: Integer; required; passed by reference.
—
Return Value

Bitmap — Leveled black-white image, or Nothing if leveling fails.

Example Code
let bwImage = ImgProc.BWLeveling_Using_FloodFillWithTolerance(grayBitmap, true, true, 128, optThreshold);
5. ImgProc.BWLeveling_Using_FloodFillWithTolerance_Core(SourceGrayImage, ExcludeGrayRange_Min, ExcludeGrayRange_Max) Returns: Bitmap
▶
Description

Applies black-white leveling excluding specified gray range.

Syntax

let result = ImgProc.BWLeveling_Using_FloodFillWithTolerance_Core(SourceGrayImage, ExcludeGrayRange_Min, ExcludeGrayRange_Max);

Parameters
ParameterDescriptionDefault
SourceGrayImageBitmapSource grayscale image.—
ExcludeGrayRange_MinIntegerMinimum gray value to exclude.—
ExcludeGrayRange_MaxIntegerMaximum gray value to exclude.—
Return Value

Bitmap — Leveled black-white image, or Nothing if leveling fails.

Example Code
let bwImage = ImgProc.BWLeveling_Using_FloodFillWithTolerance_Core(grayBitmap, 100, 150);
6. ImgProc.Check_If_CloseShape(Src_BitMap(,), FalseTolerance) Returns: Boolean
▶
Description

Checks if shape is closed (no gaps).

Syntax

let result = ImgProc.Check_If_CloseShape(Src_BitMap(,), FalseTolerance);

Parameters
ParameterDescriptionDefault
Src_BitMap(,)Boolean—
FalseToleranceInteger, OptionalTolerance for false detection.2
Return Value

Boolean — True if shape is closed, False otherwise.

Example Code
let isClosed = ImgProc.Check_If_CloseShape(boolMap, 2);
7. ImgProc.Dilate(SourceImage, BoxSizeHalf, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Applies dilation morphological operation to expand bright regions.

Syntax

let result = ImgProc.Dilate(SourceImage, BoxSizeHalf, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to dilate.—
BoxSizeHalfIntegerHalf-size of dilation kernel.—
MaskImageBitmap, OptionalOptional mask to constrain dilation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Dilated image, or Nothing if processing fails.

Example Code
let dilated = ImgProc.Dilate(bitmap, 1);
8. ImgProc.Erode(SourceImage, BoxSizeHalf, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Applies erosion morphological operation to reduce bright regions.

Syntax

let result = ImgProc.Erode(SourceImage, BoxSizeHalf, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to erode.—
BoxSizeHalfIntegerHalf-size of erosion kernel.—
MaskImageBitmap, OptionalOptional mask to constrain erosion.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Eroded image, or Nothing if processing fails.

Example Code
let eroded = ImgProc.Erode(bitmap, 1);
9. ImgProc.Find_OptimalThreshold_For_BWLeveling_Using_FloodFillWithTolerance(SourceGrayImage, Return_BWGrayImage) Returns: Integer
▶
Description

Finds optimal threshold for black-white leveling using flood fill.

Syntax

let result = ImgProc.Find_OptimalThreshold_For_BWLeveling_Using_FloodFillWithTolerance(SourceGrayImage, Return_BWGrayImage);

Parameters
ParameterDescriptionDefault
SourceGrayImageBitmapSource grayscale image.—
Return_BWGrayImageBitmapOutput binary image.
Type: Bitmap; required; passed by reference.
—
Return Value

Integer — Optimal threshold value, or 0 if finding fails.

Example Code
let threshold = ImgProc.Find_OptimalThreshold_For_BWLeveling_Using_FloodFillWithTolerance(grayBitmap, bwImage);
10. ImgProc.RegionColoring(SourceImage, Is8Connected, ApplyBinarization, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Applies region coloring (blob coloring) to the image using a high-speed parallel algorithm.

Syntax

let result = ImgProc.RegionColoring(SourceImage, Is8Connected, ApplyBinarization, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to color regions.—
Is8ConnectedBooleanWhether to use 8-connectivity.—
ApplyBinarizationBoolean, OptionalWhether to apply binarization.False
IsShowProgressBoolean, OptionalWhether to show processing progress.True
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Image with colored regions, or Nothing if operation fails.

Example Code
let colored = ImgProc.RegionColoring(bitmap, true, false);
11. ImgProc.RegionExtract_ColorFloodFill4(SourceImage, LabelIDMap, RegionColorTable, BoundaryColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Extracts color-based connected regions using 4-connectivity flood fill.

Syntax

let result = ImgProc.RegionExtract_ColorFloodFill4(SourceImage, LabelIDMap, RegionColorTable, BoundaryColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image for region extraction.—
LabelIDMapInteger(,)Output 2D array of region labels.—
RegionColorTableByte(,)Output table of region colors.—
BoundaryColorInteger, OptionalBoundary color integer.16776960
MaskImageBitmap, OptionalOptional mask to constrain extraction.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Image with color-labeled regions, or Nothing if extraction fails.

Example Code
let colorRegions = ImgProc.RegionExtract_ColorFloodFill4(bitmap, labels, colors);
12. ImgProc.RegionExtract_ColorFloodFill8(SourceImage, LabelIDMap, RegionColorTable, BoundaryColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Extracts color-based connected regions using 8-connectivity flood fill.

Syntax

let result = ImgProc.RegionExtract_ColorFloodFill8(SourceImage, LabelIDMap, RegionColorTable, BoundaryColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image for region extraction.—
LabelIDMapInteger(,)Output 2D array of region labels.—
RegionColorTableByte(,)Output table of region colors.—
BoundaryColorInteger, OptionalBoundary color integer.16776960
MaskImageBitmap, OptionalOptional mask to constrain extraction.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Image with color-labeled regions, or Nothing if extraction fails.

Example Code
let colorRegions = ImgProc.RegionExtract_ColorFloodFill8(bitmap, labels, colors);
13. ImgProc.RegionExtract_FloodFill4(SourceImage, LabelIDMap, RegionColorTable, BkColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Extracts connected regions using 4-connectivity flood fill with label mapping.

Syntax

let result = ImgProc.RegionExtract_FloodFill4(SourceImage, LabelIDMap, RegionColorTable, BkColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image for region extraction.—
LabelIDMapInteger(,)Output 2D array of region labels.—
RegionColorTableByte(,)Output table of region colors.—
BkColorInteger, OptionalBackground color to identify.0
MaskImageBitmap, OptionalOptional mask to constrain extraction.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Image with labeled regions, or Nothing if extraction fails.

Example Code
let regionMap = ImgProc.RegionExtract_FloodFill4(bitmap, labels, colors);
14. ImgProc.RegionExtract_FloodFill8(SourceImage, LabelIDMap, RegionColorTable, BkColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Extracts connected regions using 8-connectivity flood fill with label mapping.

Syntax

let result = ImgProc.RegionExtract_FloodFill8(SourceImage, LabelIDMap, RegionColorTable, BkColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image for region extraction.—
LabelIDMapInteger(,)Output 2D array of region labels.—
RegionColorTableByte(,)Output table of region colors.—
BkColorInteger, OptionalBackground color to identify.0
MaskImageBitmap, OptionalOptional mask to constrain extraction.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Image with labeled regions, or Nothing if extraction fails.

Example Code
let regionMap = ImgProc.RegionExtract_FloodFill8(bitmap, labels, colors);
15. ImgProc.RegionExtract_RasterScanning(SourceImage, LabelIDMap, RegionColorTable, BkColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Extracts regions using raster scanning algorithm with optional mask support.

Syntax

let result = ImgProc.RegionExtract_RasterScanning(SourceImage, LabelIDMap, RegionColorTable, BkColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image for region extraction.—
LabelIDMapInteger(,)Output 2D array of region labels.—
RegionColorTableByte(,)Output table of region colors.—
BkColorInteger, OptionalBackground color to identify.0
MaskImageBitmap, OptionalOptional mask to constrain extraction.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Image with labeled regions, or Nothing if extraction fails.

Example Code
let regions = ImgProc.RegionExtract_RasterScanning(bitmap, labels, colors);
16. ImgProc.RegionExtract_RasterScanning_NoMaskImage(SourceImage, LabelIDMap, RegionColorTable, BkColor) Returns: Bitmap
▶
Description

Extracts regions using raster scanning algorithm without mask image.

Syntax

let result = ImgProc.RegionExtract_RasterScanning_NoMaskImage(SourceImage, LabelIDMap, RegionColorTable, BkColor);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image for region extraction.—
LabelIDMapInteger(,)Output 2D array of region labels.—
RegionColorTableByte(,)Output table of region colors.—
BkColorInteger, OptionalBackground color to identify.0
Return Value

Bitmap — Image with labeled regions, or Nothing if extraction fails.

Example Code
let regions = ImgProc.RegionExtract_RasterScanning_NoMaskImage(bitmap, labels, colors);
17. ImgProc.RemoveDots(SourceImage, DotMode, Is8Connected, MaxDotSize, ApplyBinarization, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Removes small isolated dots or noise from the image using parallel processing.

Syntax

let result = ImgProc.RemoveDots(SourceImage, DotMode, Is8Connected, MaxDotSize, ApplyBinarization, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to process.—
DotModeIntegerDot 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)
—
Is8ConnectedBooleanWhether to use 8-connectivity.—
MaxDotSizeIntegerMaximum size of dots to remove.—
ApplyBinarizationBoolean, OptionalWhether to apply binarization.True
IsShowProgressBoolean, OptionalWhether to show processing progress.True
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Processed image with dots removed, or Nothing if operation fails.

Example Code
let cleaned = ImgProc.RemoveDots(bitmap, 0, true, 10, true);
18. ImgProc.Skeletonize(SourceImage, IsExtended, IsInverted, MinBranchLength, TailLength, ApplyBinarization, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Reduces binary objects to 1-pixel wide skeletons using parallel processing.

Syntax

let result = ImgProc.Skeletonize(SourceImage, IsExtended, IsInverted, MinBranchLength, TailLength, ApplyBinarization, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to skeletonize.—
IsExtendedBooleanWhether to use extended skeletonization.—
IsInvertedBooleanWhether to invert the image before processing.—
MinBranchLengthIntegerMinimum branch length in pixels.—
TailLengthIntegerTail length for pruning.—
ApplyBinarizationBoolean, OptionalWhether to apply binarization.True
IsShowProgressBoolean, OptionalWhether to show processing progress.True
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Skeletonized image, or Nothing if operation fails.

Example Code
let skeleton = ImgProc.Skeletonize(bitmap, true, false, 10, 5, true);
19. ImgProc.SplitObjects_ConvexityDefects(SourceImage, MinDefectDepth, MaxCutLength, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Splits connected objects using convexity defects.

Syntax

let result = ImgProc.SplitObjects_ConvexityDefects(SourceImage, MinDefectDepth, MaxCutLength, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image with connected objects.—
MinDefectDepthSingle, OptionalMinimum defect depth threshold.5.0F
MaxCutLengthSingle, OptionalMaximum cut length for splitting.50.0F
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Image with split objects, or Nothing if splitting fails.

Example Code
let split = ImgProc.SplitObjects_ConvexityDefects(bitmap, 5.0, 50.0);
20. ImgProc.SuperPixelSegmentation(SourceImage, numSuperpixels, compactness, fillWithWhite, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Segments an image into superpixels using parallel SLIC algorithm.

Syntax

let result = ImgProc.SuperPixelSegmentation(SourceImage, numSuperpixels, compactness, fillWithWhite, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to segment.—
numSuperpixelsInteger, OptionalTarget number of superpixels.400
compactnessSingle, OptionalSpatial weight for compactness.70.0F
fillWithWhiteBoolean, OptionalWhether to fill background with white.False
MaskImageBitmap, OptionalOptional mask to constrain segmentation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Segmented image with superpixel boundaries, or Nothing if processing fails.

Example Code
let segmented = ImgProc.SuperPixelSegmentation(bitmap, 400, 70.0, false);
21. ImgProc.WatershedSegmentation(SourceImage, MinDistanceThreshold, SmoothRadius, BoundaryThickness, BoundR, BoundG, BoundB, ReturnOnlyBoundaries, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Segments image using watershed algorithm.

Syntax

let result = ImgProc.WatershedSegmentation(SourceImage, MinDistanceThreshold, SmoothRadius, BoundaryThickness, BoundR, BoundG, BoundB, ReturnOnlyBoundaries, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to segment.—
MinDistanceThresholdInteger, OptionalMinimum distance threshold.10
SmoothRadiusInteger, OptionalSmoothing radius.4
BoundaryThicknessInteger, OptionalBoundary line thickness.1
BoundRByte, OptionalRed channel for boundary color.0
BoundGByte, OptionalGreen channel for boundary color.0
BoundBByte, OptionalBlue channel for boundary color.0
ReturnOnlyBoundariesBoolean, OptionalWhether to return only boundary lines.True
MaskImageBitmap, OptionalOptional mask to constrain segmentation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Segmented image, or Nothing if segmentation fails.

Example Code
let segmented = ImgProc.WatershedSegmentation(bitmap, 10, 4, 1);
System & Workspace Actions 26 functions
▶
1. ImgProc.CaptureDesktopScreen(PrintCursor) Returns: Bitmap
▶
Description

Captures entire desktop screen to bitmap.

Syntax

let result = ImgProc.CaptureDesktopScreen(PrintCursor);

Parameters
ParameterDescriptionDefault
PrintCursorBoolean, OptionalWhether to render cursor on captured screen.True
Return Value

Bitmap — Captured desktop screen image, or Nothing if capture fails.

Example Code
let screenshot = ImgProc.CaptureDesktopScreen();
2. ImgProc.CaptureDesktopScreenByRegion(PrintCursor, IsAllRegion, X1, Y1, X2, Y2) Returns: Bitmap
▶
Description

Captures specified region of desktop screen.

Syntax

let result = ImgProc.CaptureDesktopScreenByRegion(PrintCursor, IsAllRegion, X1, Y1, X2, Y2);

Parameters
ParameterDescriptionDefault
PrintCursorBooleanWhether to render cursor on captured region.—
IsAllRegionBooleanWhether to capture entire screen region.—
X1IntegerLeft coordinate of region.—
Y1IntegerTop coordinate of region.—
X2IntegerRight coordinate of region.—
Y2IntegerBottom coordinate of region.—
Return Value

Bitmap — Captured region image, or Nothing if capture fails.

Example Code
let regionCapture = ImgProc.CaptureDesktopScreenByRegion(false, false, 0, 0, 800, 600);
3. ImgProc.CaptureObject(pHwnd) Returns: Bitmap
▶
Description

Captures window or UI object to bitmap.

Syntax

let result = ImgProc.CaptureObject(pHwnd);

Parameters
ParameterDescriptionDefault
pHwndIntPtrHandle to window or UI object.—
Return Value

Bitmap — Captured control image, or Nothing if capture fails.

Example Code
let windowCapture = ImgProc.CaptureObject(formHandle);
4. ImgProc.ChromaKey(TargetCanvas, OverlayImage, ChromaR, ChromaG, ChromaB, Opacity, IsFeather, FeatherRadius, ChromaTolerance, ChromaSoftness, extractTransparent, MaskImage, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Applies chroma key (green screen) effect to composite images.

Syntax

let result = ImgProc.ChromaKey(TargetCanvas, OverlayImage, ChromaR, ChromaG, ChromaB, Opacity, IsFeather, FeatherRadius, ChromaTolerance, ChromaSoftness, extractTransparent, MaskImage, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
TargetCanvasBitmapTarget canvas background image.—
OverlayImageBitmapForeground image to composite.—
ChromaRByteRed component of chroma key color (0-255).—
ChromaGByteGreen component of chroma key color (0-255).—
ChromaBByteBlue component of chroma key color (0-255).—
OpacitySingleOpacity factor (0.0-1.0).—
IsFeatherBooleanWhether to feather edges.—
FeatherRadiusIntegerFeathering radius in pixels.—
ChromaToleranceSingle, OptionalColor matching tolerance range (0.0-100.0).35.0F
ChromaSoftnessSingle, OptionalEdge gradient softness range (0.0-100.0).20.0F
extractTransparentBoolean, OptionalWhether to extract transparency.False
MaskImageBitmap, OptionalOptional mask to constrain effect.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Composited image with chroma key applied, or Nothing if compositing fails.

Example Code
let composite = ImgProc.ChromaKey(canvas, overlay, 0, 255, 0, 1.0F, true, 5, 35.0F, 20.0F);
5. ImgProc.CloneImage(SourceImage) Returns: Bitmap
▶
Description

Creates a deep copy of the image.

Syntax

let result = ImgProc.CloneImage(SourceImage);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to clone.—
Return Value

Bitmap — Independent clone of image, or Nothing if cloning fails.

Example Code
let clone = ImgProc.CloneImage(bitmap);
6. ImgProc.CopyToClipboardWithTransparency(img) Returns: Void
▶
Description

Copies image to clipboard with transparency.

Syntax

ImgProc.CopyToClipboardWithTransparency(img);

Parameters
ParameterDescriptionDefault
imgBitmapImage to copy.—
Return Value

Void — None.

Example Code
ImgProc.CopyToClipboardWithTransparency(bitmap);
7. ImgProc.Draw_ColorLevelBox(ColorMode, Pic_Target, LevelCount) Returns: Void
▶
Description

Draws color level distribution box in picture control.

Syntax

ImgProc.Draw_ColorLevelBox(ColorMode, Pic_Target, LevelCount);

Parameters
ParameterDescriptionDefault
ColorModeIntegerColor mode for the distribution.
Supported values:
1: Red
2: Green
3: Blue
—
Pic_TargetPictureBoxTarget picture control to draw in.
Type: PictureBox; required; passed by reference.
—
LevelCountIntegerNumber of discrete levels to display.—
Return Value

Void

Example Code
ImgProc.Draw_ColorLevelBox(0, picTarget, 8);
8. ImgProc.Draw_Line(Pic_Target, X1, Y1, X2, Y2, LineColor) Returns: Bitmap
▶
Description

Draws line on picture control.

Syntax

let result = ImgProc.Draw_Line(Pic_Target, X1, Y1, X2, Y2, LineColor);

Parameters
ParameterDescriptionDefault
Pic_TargetPictureBoxTarget picture control.
Type: PictureBox; required; passed by reference.
—
X1IntegerStarting X-coordinate.—
Y1IntegerStarting Y-coordinate.—
X2IntegerEnding X-coordinate.—
Y2IntegerEnding Y-coordinate.—
LineColorColorColor of the line.—
Return Value

Bitmap — Bitmap with drawn line, or Nothing if drawing fails.

Example Code
let lineBmp = ImgProc.Draw_Line(picTarget, 0, 0, 100, 100, Color.Red);
9. ImgProc.Draw_Text_Outlined(Pic_Target, x, y, TextString, TextFont, InnerColor, OuterColor) Returns: Bitmap
▶
Description

Draws text with outline in picture control.

Syntax

let result = ImgProc.Draw_Text_Outlined(Pic_Target, x, y, TextString, TextFont, InnerColor, OuterColor);

Parameters
ParameterDescriptionDefault
Pic_TargetPictureBoxTarget picture control.
Type: PictureBox; required; passed by reference.
—
xIntegerX-coordinate for text.—
yIntegerY-coordinate for text.—
TextStringStringText string to draw.—
TextFontFontFont for text.—
InnerColorColorInner text color.—
OuterColorColorOutline color.—
Return Value

Bitmap — Bitmap containing drawn text, or Nothing if drawing fails.

Example Code
let textBmp = ImgProc.Draw_Text_Outlined(picTarget, 10, 10, "Hello", font, Color.White, Color.Black);
10. ImgProc.Draw_Text_Outlined_Bitmap(Pic_Target, x, y, TextString, TextFont, InnerColor, OuterColor) Returns: Bitmap
▶
Description

Draws outlined text on bitmap.

Syntax

let result = ImgProc.Draw_Text_Outlined_Bitmap(Pic_Target, x, y, TextString, TextFont, InnerColor, OuterColor);

Parameters
ParameterDescriptionDefault
Pic_TargetBitmapTarget bitmap to draw text on.—
xIntegerX-coordinate for text.—
yIntegerY-coordinate for text.—
TextStringStringText string to draw.—
TextFontFontFont for text.—
InnerColorColorInner text color.—
OuterColorColorOutline color.—
Return Value

Bitmap — Bitmap with drawn text, or Nothing if drawing fails.

Example Code
let textBmp = ImgProc.Draw_Text_Outlined_Bitmap(bitmap, 10, 10, "Hello", font, Color.White, Color.Black);
11. ImgProc.Draw_Text_Outlined_Graphics(SourceGraphics, x, y, TextString, TextFont, InnerColor, OuterColor) Returns: Void
▶
Description

Draws outlined text on graphics object.

Syntax

ImgProc.Draw_Text_Outlined_Graphics(SourceGraphics, x, y, TextString, TextFont, InnerColor, OuterColor);

Parameters
ParameterDescriptionDefault
SourceGraphicsGraphicsTarget graphics object to draw on.—
xIntegerX-coordinate for text.—
yIntegerY-coordinate for text.—
TextStringStringText string to draw.—
TextFontFontFont for text.—
InnerColorColorInner text color.—
OuterColorColorOutline color.—
Return Value

Void

Example Code
ImgProc.Draw_Text_Outlined_Graphics(g, 10, 10, "Hello", font, Color.White, Color.Black);
12. ImgProc.Draw_Text_Outlined_Image(SourceImage, x, y, TextString, TextFont, InnerColor, OuterColor) Returns: Bitmap
▶
Description

Draws outlined text on image.

Syntax

let result = ImgProc.Draw_Text_Outlined_Image(SourceImage, x, y, TextString, TextFont, InnerColor, OuterColor);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to draw text on.—
xIntegerX-coordinate for text.—
yIntegerY-coordinate for text.—
TextStringStringText string to draw.—
TextFontFontFont for text.—
InnerColorColorInner text color.—
OuterColorColorOutline color.—
Return Value

Bitmap — Image with drawn text, or Nothing if drawing fails.

Example Code
let textImg = ImgProc.Draw_Text_Outlined_Image(bitmap, 10, 10, "Hello", font, Color.White, Color.Black);
13. ImgProc.DrawSelectionBorder(SourceImage, cR, cG, cB, BorderThickness, Opacity) Returns: Bitmap
▶
Description

Draws selection border with RGB values on image.

Syntax

let result = ImgProc.DrawSelectionBorder(SourceImage, cR, cG, cB, BorderThickness, Opacity);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to draw on.—
cRByteRed component (0-255).—
cGByteGreen component (0-255).—
cBByteBlue component (0-255).—
BorderThicknessIntegerThickness of border line in pixels.—
OpacityByteAlpha transparency (0-255).—
Return Value

Bitmap — Image with selection border drawn, or Nothing if drawing fails.

Example Code
let bordered = ImgProc.DrawSelectionBorder(bitmap, 255, 0, 0, 2, 255);
14. ImgProc.FillRegion(SourceImage, FillColorRed, FillColorGreen, FillColorBlue, IsFillInside, Opacity, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Fills image regions with RGB color value and opacity.

Syntax

let result = ImgProc.FillRegion(SourceImage, FillColorRed, FillColorGreen, FillColorBlue, IsFillInside, Opacity, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to fill.—
FillColorRedByteRed fill color (0-255).—
FillColorGreenByteGreen fill color (0-255).—
FillColorBlueByteBlue fill color (0-255).—
IsFillInsideBooleanWhether to fill inside (True) or outside (False).—
OpacitySingleFill opacity (0-1).—
IsShowProgressBoolean, OptionalWhether to display progress.True
MaskImageBitmap, OptionalOptional mask to constrain filling.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Filled image, or Nothing if filling fails.

Example Code
let filled = ImgProc.FillRegion(bitmap, 255, 0, 0, true, 0.5);
15. ImgProc.FloodFill(SourceImage, CenterX, CenterY, FillColorR, FillColorG, FillColorB, ToleranceR, ToleranceG, ToleranceB, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: Bitmap
▶
Description

Fills region starting from center point with color.

Syntax

let result = ImgProc.FloodFill(SourceImage, CenterX, CenterY, FillColorR, FillColorG, FillColorB, ToleranceR, ToleranceG, ToleranceB, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource image to fill.—
CenterXIntegerCenter X-coordinate to start fill.—
CenterYIntegerCenter Y-coordinate to start fill.—
FillColorRByteFill red component.—
FillColorGByteFill green component.—
FillColorBByteFill blue component.—
ToleranceRIntegerRed color tolerance.—
ToleranceGIntegerGreen color tolerance.—
ToleranceBIntegerBlue color tolerance.—
MaskImageBitmap, OptionalOptional mask to constrain fill.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

Bitmap — Filled image, or Nothing if fill fails.

Example Code
let filled = ImgProc.FloodFill(bitmap, 50, 50, 255, 0, 0, 10, 10, 10);
16. ImgProc.Generate_BlankImage(Pic_Target, BackColor) Returns: Void
▶
Description

Generates blank image in picture control.

Syntax

ImgProc.Generate_BlankImage(Pic_Target, BackColor);

Parameters
ParameterDescriptionDefault
Pic_TargetPictureBoxTarget picture control.
Type: PictureBox; required; passed by reference.
—
BackColorColorBackground color for the blank image.—
Return Value

Void

Example Code
ImgProc.Generate_BlankImage(picTarget, Color.White);
17. ImgProc.Get_ActualFormRect(SrcForm) Returns: Rectangle
▶
Description

Gets actual rectangle bounds of form.

Syntax

let result = ImgProc.Get_ActualFormRect(SrcForm);

Parameters
ParameterDescriptionDefault
SrcFormFormSource form window.—
Return Value

Rectangle — Rectangle bounds of the form, or Rectangle.Empty if retrieval fails.

Example Code
let bounds = ImgProc.Get_ActualFormRect(myForm);
18. ImgProc.Get_CoreCount() Returns: Integer
▶
Description

Gets number of processor cores.

Syntax

let result = ImgProc.Get_CoreCount();

Return Value

Integer — Number of available processor cores, or 1 if retrieval fails.

Example Code
let cores = ImgProc.Get_CoreCount();
19. ImgProc.Get_CursorPosition(x, y) Returns: Void
▶
Description

Gets current cursor position on screen.

Syntax

ImgProc.Get_CursorPosition(x, y);

Parameters
ParameterDescriptionDefault
xIntegerOutput cursor X coordinate.
Type: Integer; required; passed by reference.
—
yIntegerOutput cursor Y coordinate.
Type: Integer; required; passed by reference.
—
Return Value

Void — None.

Example Code
ImgProc.Get_CursorPosition(cursorX, cursorY);
20. ImgProc.Get_ImageFormat(FileExtension) Returns: Object
▶
Description

Gets image format object from file extension.

Syntax

let result = ImgProc.Get_ImageFormat(FileExtension);

Parameters
ParameterDescriptionDefault
FileExtensionStringFile extension (e.g., '.jpg', '.png').—
Return Value

Object — Image format object, or Nothing if format not found.

Example Code
let fmt = ImgProc.Get_ImageFormat(".jpg");
21. ImgProc.Get_WindowHeightMargin(TargetForm) Returns: Integer
▶
Description

Gets window height margin value.

Syntax

let result = ImgProc.Get_WindowHeightMargin(TargetForm);

Parameters
ParameterDescriptionDefault
TargetFormFormTarget form window.—
Return Value

Integer — Window height margin, or 0 if retrieval fails.

Example Code
let margin = ImgProc.Get_WindowHeightMargin(myForm);
22. ImgProc.Get_WindowWidthMargin(TargetForm) Returns: Integer
▶
Description

Gets window width margin value.

Syntax

let result = ImgProc.Get_WindowWidthMargin(TargetForm);

Parameters
ParameterDescriptionDefault
TargetFormFormTarget form window.—
Return Value

Integer — Window width margin, or 0 if retrieval fails.

Example Code
let margin = ImgProc.Get_WindowWidthMargin(myForm);
23. ImgProc.GetControlBitmap(CTL) Returns: Bitmap
▶
Description

Gets bitmap snapshot of UI control.

Syntax

let result = ImgProc.GetControlBitmap(CTL);

Parameters
ParameterDescriptionDefault
CTLControlSource UI control.—
Return Value

Bitmap — Bitmap snapshot of the control, or Nothing if snapshot fails.

Example Code
let ctlBitmap = ImgProc.GetControlBitmap(myPictureBox);
24. ImgProc.SaveDepthMapToSTL_BoxFilter(SourceImage, FilePath, MaxSTLHeight, BaseThickness, SmoothingPasses, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: String
▶
Description

Saves depth map as STL file using box filter.

Syntax

let result = ImgProc.SaveDepthMapToSTL_BoxFilter(SourceImage, FilePath, MaxSTLHeight, BaseThickness, SmoothingPasses, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource depth map image.—
FilePathStringPath to save STL file.—
MaxSTLHeightSingle, OptionalMaximum STL height.15.0F
BaseThicknessSingle, OptionalBase thickness for STL.2.0F
SmoothingPassesInteger, OptionalNumber of smoothing passes.3
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

String — File path if save successful, empty string if operation fails.

Example Code
let result = ImgProc.SaveDepthMapToSTL_BoxFilter(depthBitmap, "output.stl", 15.0, 2.0, 3);
25. ImgProc.SaveDepthMapToSTL_GaussianFilter(SourceImage, FilePath, MaxSTLHeight, BaseThickness, SmoothingPasses, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) Returns: String
▶
Description

Saves depth map as STL file using Gaussian filter.

Syntax

let result = ImgProc.SaveDepthMapToSTL_GaussianFilter(SourceImage, FilePath, MaxSTLHeight, BaseThickness, SmoothingPasses, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameters
ParameterDescriptionDefault
SourceImageBitmapSource depth map image.—
FilePathStringPath to save STL file.—
MaxSTLHeightSingle, OptionalMaximum STL height.15.0F
BaseThicknessSingle, OptionalBase thickness for STL.2.0F
SmoothingPassesInteger, OptionalNumber of smoothing passes.3
MaskImageBitmap, OptionalOptional mask to constrain operation.Nothing
MaskRegionBoundaryRectangle, OptionalBoundary rectangle for masked region.Nothing
IsMaskAllRegionSelectedBoolean, OptionalWhether entire region is selected.True
Return Value

String — File path if save successful, empty string if operation fails.

Example Code
let result = ImgProc.SaveDepthMapToSTL_GaussianFilter(depthBitmap, "output.stl", 15.0, 2.0, 3);
26. ImgProc.Stop_Processing() Returns: Void
▶
Description

Stops the current image processing operation.

Syntax

ImgProc.Stop_Processing();

Return Value

Void

Example Code
ImgProc.Stop_Processing();
5. ObjectDetector (ScriptObjectDetectorHelper) 8 Functions
▶
Class Overview: 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
▶
1. ObjectDetector.Detect(img, confThreshold, nmsThreshold, useTiling) Returns: Integer
▶
Description

Detects objects in an image and stores the detection results.

Syntax

let result = ObjectDetector.Detect(img, confThreshold, nmsThreshold, useTiling);

Parameters
ParameterDescriptionDefault
imgBitmapImage to analyze.—
confThresholdDouble, OptionalMinimum confidence threshold.0.5F
nmsThresholdDouble, OptionalNon-maximum suppression threshold.0.4F
useTilingBoolean, OptionalWhether to use tiled inference.False
Return Value

Integer — Number of detected objects, or 0 if detection fails.

Example Code
let count = ObjectDetector.Detect(bitmap, 0.5, 0.4, false);
2. ObjectDetector.GetAllResults() Returns: ONNX_YOLOv3Detector.DetectionResult()
▶
Description

Returns all detection results from the most recent detection.

Syntax

let result = ObjectDetector.GetAllResults();

Return Value

ONNX_YOLOv3Detector.DetectionResult() — Array of detection results, or an empty array when no results are available.

Example Code
let results = ObjectDetector.GetAllResults();
3. ObjectDetector.GetClassCount(className) Returns: Integer
▶
Description

Returns the number of detected objects with the specified class label.

Syntax

let result = ObjectDetector.GetClassCount(className);

Parameters
ParameterDescriptionDefault
classNameStringClass label to count.—
Return Value

Integer — Number of detections for the class.

Example Code
let count = ObjectDetector.GetClassCount("person");
4. ObjectDetector.GetClassLocations(className) Returns: RectangleF()
▶
Description

Returns bounding boxes for detections of the specified class.

Syntax

let result = ObjectDetector.GetClassLocations(className);

Parameters
ParameterDescriptionDefault
classNameStringClass label to locate.—
Return Value

RectangleF() — Array of bounding rectangles for matching detections.

Example Code
let locations = ObjectDetector.GetClassLocations("person");
5. ObjectDetector.GetLastError() Returns: String
▶
Description

Returns the most recent error message produced by the helper.

Syntax

let result = ObjectDetector.GetLastError();

Return Value

String — The last error message, or an empty string when no error is recorded.

Example Code
let errorMessage = ObjectDetector.GetLastError();
6. ObjectDetector.GetRenderedImage(img, showConfidence, colorName) Returns: Bitmap
▶
Description

Returns a copy of the image rendered with detection boxes and labels.

Syntax

let result = ObjectDetector.GetRenderedImage(img, showConfidence, colorName);

Parameters
ParameterDescriptionDefault
imgBitmapSource image to render.—
showConfidenceBoolean, OptionalWhether to display confidence values.True
colorNameString, OptionalKnown .NET color name for boxes and labels."Red"
Return Value

Bitmap — Rendered bitmap, or Nothing if rendering fails.

Example Code
let rendered = ObjectDetector.GetRenderedImage(bitmap, true, "Lime");
7. ObjectDetector.HasClass(className) Returns: Boolean
▶
Description

Checks whether the most recent results contain the specified object class.

Syntax

let result = ObjectDetector.HasClass(className);

Parameters
ParameterDescriptionDefault
classNameStringClass label to find.—
Return Value

Boolean — True if the class was detected; otherwise False.

Example Code
let found = ObjectDetector.HasClass("person");
8. ObjectDetector.Initialize() Returns: Boolean
▶
Description

Initializes the YOLOv3 detector with its default model and settings.

Syntax

let result = ObjectDetector.Initialize();

Return Value

Boolean — True when the detector is initialized or already available; otherwise False.

Example Code
let ready = ObjectDetector.Initialize();
6. Region (ScriptRegionHelper) 38 Functions
▶
Class Overview: 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
▶
1. Region.AddCircle(left, top, right, bottom) Returns: Void
▶
Description

Adds a circular area defined by a bounding rectangle to the current multi-region selection.

Syntax

Region.AddCircle(left, top, right, bottom);

Parameters
ParameterDescriptionDefault
leftIntegerLeft X coordinate.—
topIntegerTop Y coordinate.—
rightIntegerRight X coordinate.—
bottomIntegerBottom Y coordinate.—
Return Value

Void — Void. Coordinates are clipped to the workspace image bounds.

Example Code
Region.AddCircle(10, 20, 100, 120);
2. Region.AddMaskImage(appendBmp, offsetX, offsetY) Returns: Void
▶
Description

Adds mask pixels from another bitmap at the specified offset.

Syntax

Region.AddMaskImage(appendBmp, offsetX, offsetY);

Parameters
ParameterDescriptionDefault
appendBmpBitmapBitmap whose white pixels are added to the mask.—
offsetXInteger, OptionalHorizontal offset in pixels.0
offsetYInteger, OptionalVertical offset in pixels.0
Return Value

Void — Void.

Example Code
Region.AddMaskImage(mask, 10, 5);
3. Region.AddPolygon(coords) Returns: Void
▶
Description

Adds a polygonal area to the current multi-region selection.

Syntax

Region.AddPolygon(coords);

Parameters
ParameterDescriptionDefault
coordsInteger()At least three coordinate pairs in X, Y order.—
Return Value

Void — Void. Coordinates are clipped to the workspace image bounds.

Example Code
Region.AddPolygon(New Integer() {10, 10, 100, 10, 50, 80});
4. Region.AddRectangle(left, top, right, bottom) Returns: Void
▶
Description

Adds a rectangular area to the current multi-region selection.

Syntax

Region.AddRectangle(left, top, right, bottom);

Parameters
ParameterDescriptionDefault
leftIntegerLeft X coordinate.—
topIntegerTop Y coordinate.—
rightIntegerRight X coordinate.—
bottomIntegerBottom Y coordinate.—
Return Value

Void — Void. Coordinates are clipped to the workspace image bounds.

Example Code
Region.AddRectangle(10, 20, 100, 120);
5. Region.GetBinaryMaskImage() Returns: Bitmap
▶
Description

Creates a binary bitmap representing the current selection mask.

Syntax

let result = Region.GetBinaryMaskImage();

Return Value

Bitmap — Mask bitmap with selected pixels in white and unselected pixels in black, or Nothing if unavailable.

Example Code
let mask = Region.GetBinaryMaskImage();
6. Region.GetBoundaryBottom() Returns: Integer
▶
Description

Returns the bottom coordinate of the current selection boundary.

Syntax

let result = Region.GetBoundaryBottom();

Return Value

Integer — Bottom boundary coordinate in pixels.

Example Code
let bottom = Region.GetBoundaryBottom();
7. Region.GetBoundaryLeft() Returns: Integer
▶
Description

Returns the left coordinate of the current selection boundary.

Syntax

let result = Region.GetBoundaryLeft();

Return Value

Integer — Left boundary coordinate in pixels.

Example Code
let left = Region.GetBoundaryLeft();
8. Region.GetBoundaryRight() Returns: Integer
▶
Description

Returns the right coordinate of the current selection boundary.

Syntax

let result = Region.GetBoundaryRight();

Return Value

Integer — Right boundary coordinate in pixels.

Example Code
let right = Region.GetBoundaryRight();
9. Region.GetBoundaryTop() Returns: Integer
▶
Description

Returns the top coordinate of the current selection boundary.

Syntax

let result = Region.GetBoundaryTop();

Return Value

Integer — Top boundary coordinate in pixels.

Example Code
let top = Region.GetBoundaryTop();
10. Region.GetRectangleBottom() Returns: Integer
▶
Description

Returns the bottom coordinate of the current rectangular selection boundary.

Syntax

let result = Region.GetRectangleBottom();

Return Value

Integer — Bottom boundary coordinate in pixels.

Example Code
let bottom = Region.GetRectangleBottom();
11. Region.GetRectangleLeft() Returns: Integer
▶
Description

Returns the left coordinate of the current rectangular selection boundary.

Syntax

let result = Region.GetRectangleLeft();

Return Value

Integer — Left boundary coordinate in pixels.

Example Code
let left = Region.GetRectangleLeft();
12. Region.GetRectangleRight() Returns: Integer
▶
Description

Returns the right coordinate of the current rectangular selection boundary.

Syntax

let result = Region.GetRectangleRight();

Return Value

Integer — Right boundary coordinate in pixels.

Example Code
let right = Region.GetRectangleRight();
13. Region.GetRectangleTop() Returns: Integer
▶
Description

Returns the top coordinate of the current rectangular selection boundary.

Syntax

let result = Region.GetRectangleTop();

Return Value

Integer — Top boundary coordinate in pixels.

Example Code
let top = Region.GetRectangleTop();
14. Region.GetSelectMode() Returns: String
▶
Description

Returns the current selection mode.

Syntax

let result = Region.GetSelectMode();

Return Value

String — Selection mode name: None, Adding, or Subtracting.

Example Code
let mode = Region.GetSelectMode();
15. Region.GetShape() Returns: String
▶
Description

Returns the name of the current selection shape type.

Syntax

let result = Region.GetShape();

Return Value

String — Selection shape name, or "None" when unavailable.

Example Code
let shapeName = Region.GetShape();
16. Region.Hide() Returns: Void
▶
Description

Hides the current selection shape.

Syntax

Region.Hide();

Return Value

Void — Void.

Example Code
Region.Hide();
17. Region.Invalidate() Returns: Void
▶
Description

Refreshes the workspace drawing canvas.

Syntax

Region.Invalidate();

Return Value

Void — Void.

Example Code
Region.Invalidate();
18. Region.IsAllRegionSelected() Returns: Boolean
▶
Description

Checks whether the entire workspace image region is selected.

Syntax

let result = Region.IsAllRegionSelected();

Return Value

Boolean — True when the entire region is selected or workspace state is unavailable; otherwise False.

Example Code
let allSelected = Region.IsAllRegionSelected();
19. Region.IsBitmapMask() Returns: Boolean
▶
Description

Checks whether the current selection is a bitmap mask.

Syntax

let result = Region.IsBitmapMask();

Return Value

Boolean — True when the selection is a bitmap mask; otherwise False.

Example Code
let isMask = Region.IsBitmapMask();
20. Region.IsCircle() Returns: Boolean
▶
Description

Checks whether the current selection shape is a circle.

Syntax

let result = Region.IsCircle();

Return Value

Boolean — True when the selection is a circle; otherwise False.

Example Code
let isCircle = Region.IsCircle();
21. Region.IsLine() Returns: Boolean
▶
Description

Checks whether the current selection shape is a line.

Syntax

let result = Region.IsLine();

Return Value

Boolean — True when the selection is a line; otherwise False.

Example Code
let isLine = Region.IsLine();
22. Region.IsNone() Returns: Boolean
▶
Description

Checks whether no selection shape is active.

Syntax

let result = Region.IsNone();

Return Value

Boolean — True when no selection shape is active; otherwise False.

Example Code
let isEmpty = Region.IsNone();
23. Region.IsPath() Returns: Boolean
▶
Description

Checks whether the current selection shape is a freehand path.

Syntax

let result = Region.IsPath();

Return Value

Boolean — True when the selection is a path; otherwise False.

Example Code
let isPath = Region.IsPath();
24. Region.IsPolygon() Returns: Boolean
▶
Description

Checks whether the current selection shape is a polygon.

Syntax

let result = Region.IsPolygon();

Return Value

Boolean — True when the selection is a polygon; otherwise False.

Example Code
let isPolygon = Region.IsPolygon();
25. Region.IsRectangle() Returns: Boolean
▶
Description

Checks whether the current selection shape is a rectangle.

Syntax

let result = Region.IsRectangle();

Return Value

Boolean — True when the selection is a rectangle; otherwise False.

Example Code
let isRectangle = Region.IsRectangle();
26. Region.RemoveCircle(left, top, right, bottom) Returns: Void
▶
Description

Removes a circular area defined by a bounding rectangle from the current multi-region selection.

Syntax

Region.RemoveCircle(left, top, right, bottom);

Parameters
ParameterDescriptionDefault
leftIntegerLeft X coordinate.—
topIntegerTop Y coordinate.—
rightIntegerRight X coordinate.—
bottomIntegerBottom Y coordinate.—
Return Value

Void — Void. Coordinates are clipped to the workspace image bounds.

Example Code
Region.RemoveCircle(10, 20, 100, 120);
27. Region.RemovePolygon(coords) Returns: Void
▶
Description

Removes a polygonal area from the current multi-region selection.

Syntax

Region.RemovePolygon(coords);

Parameters
ParameterDescriptionDefault
coordsInteger()At least three coordinate pairs in X, Y order.—
Return Value

Void — Void. Coordinates are clipped to the workspace image bounds.

Example Code
Region.RemovePolygon(New Integer() {10, 10, 100, 10, 50, 80});
28. Region.RemoveRectangle(left, top, right, bottom) Returns: Void
▶
Description

Removes a rectangular area from the current multi-region selection.

Syntax

Region.RemoveRectangle(left, top, right, bottom);

Parameters
ParameterDescriptionDefault
leftIntegerLeft X coordinate.—
topIntegerTop Y coordinate.—
rightIntegerRight X coordinate.—
bottomIntegerBottom Y coordinate.—
Return Value

Void — Void. Coordinates are clipped to the workspace image bounds.

Example Code
Region.RemoveRectangle(10, 20, 100, 120);
29. Region.SetBinaryMaskImage(maskBmp) Returns: Void
▶
Description

Sets the current selection from a binary mask bitmap.

Syntax

Region.SetBinaryMaskImage(maskBmp);

Parameters
ParameterDescriptionDefault
maskBmpBitmapBitmap containing the selection mask.—
Return Value

Void — Void. No change is made when the bitmap or workspace is unavailable.

Example Code
Region.SetBinaryMaskImage(mask);
30. Region.SetCircle(left, top, right, bottom) Returns: Void
▶
Description

Creates a circular selection inside the specified bounding rectangle.

Syntax

Region.SetCircle(left, top, right, bottom);

Parameters
ParameterDescriptionDefault
leftIntegerLeft X coordinate.—
topIntegerTop Y coordinate.—
rightIntegerRight X coordinate.—
bottomIntegerBottom Y coordinate.—
Return Value

Void — Void.

Example Code
Region.SetCircle(10, 20, 100, 120);
31. Region.SetLine(x1, y1, x2, y2) Returns: Void
▶
Description

Creates a line selection between two points.

Syntax

Region.SetLine(x1, y1, x2, y2);

Parameters
ParameterDescriptionDefault
x1IntegerFirst endpoint X coordinate.—
y1IntegerFirst endpoint Y coordinate.—
x2IntegerSecond endpoint X coordinate.—
y2IntegerSecond endpoint Y coordinate.—
Return Value

Void — Void.

Example Code
Region.SetLine(10, 20, 100, 120);
32. Region.SetPath(coords) Returns: Void
▶
Description

Creates a freehand path selection from an array of alternating X and Y coordinates.

Syntax

Region.SetPath(coords);

Parameters
ParameterDescriptionDefault
coordsInteger()At least two coordinate pairs in X, Y order.—
Return Value

Void — Void.

Example Code
Region.SetPath(New Integer() {10, 10, 50, 40, 100, 20});
33. Region.SetPolygon(coords) Returns: Void
▶
Description

Creates a polygon selection from an array of alternating X and Y coordinates.

Syntax

Region.SetPolygon(coords);

Parameters
ParameterDescriptionDefault
coordsInteger()At least three coordinate pairs in X, Y order.—
Return Value

Void — Void.

Example Code
Region.SetPolygon(New Integer() {10, 10, 100, 10, 50, 80});
34. Region.SetRectangle(left, top, right, bottom) Returns: Void
▶
Description

Creates a rectangular selection from two corner coordinates.

Syntax

Region.SetRectangle(left, top, right, bottom);

Parameters
ParameterDescriptionDefault
leftIntegerLeft X coordinate.—
topIntegerTop Y coordinate.—
rightIntegerRight X coordinate.—
bottomIntegerBottom Y coordinate.—
Return Value

Void — Void.

Example Code
Region.SetRectangle(10, 20, 100, 120);
35. Region.SetSelectMode(modeName) Returns: Void
▶
Description

Sets the selection mode to none, adding, or subtracting.

Syntax

Region.SetSelectMode(modeName);

Parameters
ParameterDescriptionDefault
modeNameStringString 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 — Void. Unrecognized values are ignored.

Example Code
Region.SetSelectMode("Adding");
36. Region.Show() Returns: Void
▶
Description

Displays the last drawn selection shape.

Syntax

Region.Show();

Return Value

Void — Void.

Example Code
Region.Show();
37. Region.SubtractMaskImage(subtractBmp, offsetX, offsetY) Returns: Void
▶
Description

Removes mask pixels using another bitmap at the specified offset.

Syntax

Region.SubtractMaskImage(subtractBmp, offsetX, offsetY);

Parameters
ParameterDescriptionDefault
subtractBmpBitmapBitmap whose white pixels are removed from the mask.—
offsetXInteger, OptionalHorizontal offset in pixels.0
offsetYInteger, OptionalVertical offset in pixels.0
Return Value

Void — Void.

Example Code
Region.SubtractMaskImage(mask, 10, 5);
38. Region.Unselect() Returns: Void
▶
Description

Clears the current selection and hides its selection shape.

Syntax

Region.Unselect();

Return Value

Void — Void.

Example Code
Region.Unselect();
7. UI (ScriptUIHelper) 4 Functions
▶
Class Overview: 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
▶
1. UI.CopyToClipboard(text) Returns: Void
▶
Description

Copies text to the system clipboard with license validation.

Syntax

UI.CopyToClipboard(text);

Parameters
ParameterDescriptionDefault
textObjectText content to copy.—
Return Value

Void

Example Code
UI.CopyToClipboard("Hello World");
2. UI.IsCancelled() Returns: Boolean
▶
Description

Gets whether cancellation has been requested.

Syntax

let result = UI.IsCancelled();

Return Value

Boolean — True if cancellation is requested, False otherwise.

Example Code
let cancelled = UI.IsCancelled();
3. UI.MsgBox(prompt, buttons, title) Returns: Integer
▶
Description

Displays a message box dialog with customizable buttons and title.

Syntax

let result = UI.MsgBox(prompt, buttons, title);

Parameters
ParameterDescriptionDefault
promptObjectMessage text to display.—
buttonsObject, OptionalButton style as MsgBoxStyle enumeration value.Nothing
titleObject, OptionalDialog title text.Nothing
Return Value

Integer — Integer representing the clicked button (VB.NET MsgBoxResult values).

Example Code
let result = UI.MsgBox("Continue?", 4, "Confirmation");
4. UI.YieldEvents() Returns: Void
▶
Description

Yields control to allow event processing and UI updates.

Syntax

UI.YieldEvents();

Return Value

Void

Example Code
UI.YieldEvents();
8. VideoExtractor (ScriptVideoExtractorHelper) 15 Functions
▶
Video & Frame Extraction Actions 15 functions
▶
1. VideoExtractor.BeginRangeScan(startTimeSec, endTimeSec, interval, intervalUnit) Returns: Integer
▶
Description

Initializes a sequential frame scan over a time range for step-by-step loop processing in scripts.

Syntax

let result = VideoExtractor.BeginRangeScan(startTimeSec, endTimeSec, interval, intervalUnit);

Parameters
ParameterDescriptionDefault
startTimeSecDouble, OptionalStart time in seconds.0.0
endTimeSecDouble, OptionalEnd time in seconds (-1.0 for end of video).-1.0
intervalDouble, OptionalTime step interval value.1.0
intervalUnitString, OptionalInterval time unit ("MS", "SEC", "MIN", "HOUR")."SEC"
Return Value

Integer — Total estimated number of frames to be scanned, or 0 if initialization fails.

Example Code
let total = VideoExtractor.BeginRangeScan(0.0, 10.0, 500, "MS");
2. VideoExtractor.CloseVideo() Returns: Void
▶
Description

Closes the currently opened video file without disposing the helper instance.

Syntax

VideoExtractor.CloseVideo();

Return Value

Void — Void.

Example Code
VideoExtractor.CloseVideo();
3. VideoExtractor.ExtractFrameAt(timeInSeconds) Returns: Bitmap
▶
Description

Extracts a single video frame at the exact specified time in seconds.

Syntax

let result = VideoExtractor.ExtractFrameAt(timeInSeconds);

Parameters
ParameterDescriptionDefault
timeInSecondsDoubleTarget timestamp in seconds.—
Return Value

Bitmap — Extracted frame as a Bitmap, or Nothing if extraction fails.

Example Code
let frameBmp = VideoExtractor.ExtractFrameAt(12.5);
4. VideoExtractor.ExtractFrameAtHMS(hmsTimeString) Returns: Bitmap
▶
Description

Extracts a single video frame using a formatted time string (e.g., "00:01:30" or "00:01:30.500").

Syntax

let result = VideoExtractor.ExtractFrameAtHMS(hmsTimeString);

Parameters
ParameterDescriptionDefault
hmsTimeStringStringFormatted time string (HH:MM:SS or HH:MM:SS.fff).—
Return Value

Bitmap — Extracted frame as a Bitmap, or Nothing if parsing or extraction fails.

Example Code
let frameBmp = VideoExtractor.ExtractFrameAtHMS("00:01:15.250");
5. VideoExtractor.GetDuration() Returns: Double
▶
Description

Returns the total duration of the currently opened video in seconds.

Syntax

let result = VideoExtractor.GetDuration();

Return Value

Double — Total video duration in seconds, or 0.0 if no video is open.

Example Code
let totalSec = VideoExtractor.GetDuration();
6. VideoExtractor.GetFrameDuration() Returns: Double
▶
Description

Returns the duration of a single frame in seconds.

Syntax

let result = VideoExtractor.GetFrameDuration();

Return Value

Double — Single frame duration in seconds, or 0.0 if no video is open.

Example Code
let stepSec = VideoExtractor.GetFrameDuration();
7. VideoExtractor.GetFrameRate() Returns: Double
▶
Description

Returns the approximate frame rate (FPS) of the currently opened video.

Syntax

let result = VideoExtractor.GetFrameRate();

Return Value

Double — Frames per second as Double, or 0.0 if no video is open.

Example Code
let fps = VideoExtractor.GetFrameRate();
8. VideoExtractor.GetLastError() Returns: String
▶
Description

Returns the most recent error message produced by the helper.

Syntax

let result = VideoExtractor.GetLastError();

Return Value

String — The last error message, or an empty string when no error is recorded.

Example Code
let errorMessage = VideoExtractor.GetLastError();
9. VideoExtractor.GetTotalFrameCount(startTimeSec, endTimeSec, interval, intervalUnit) Returns: Integer
▶
Description

Calculates the total number of frames that will be extracted for the given time range and interval.

Syntax

let result = VideoExtractor.GetTotalFrameCount(startTimeSec, endTimeSec, interval, intervalUnit);

Parameters
ParameterDescriptionDefault
startTimeSecDoubleStart time in seconds.—
endTimeSecDoubleEnd time in seconds.—
intervalDoubleTime interval value.—
intervalUnitString, OptionalInterval time unit ("MS", "SEC", "MIN", "HOUR")."SEC"
Return Value

Integer — Total frame count as Integer.

Example Code
let total = VideoExtractor.GetTotalFrameCount(0.0, 60.0, 500, "MS");
10. VideoExtractor.GetVideoHeight() Returns: Integer
▶
Description

Returns the display height of the currently opened video in pixels.

Syntax

let result = VideoExtractor.GetVideoHeight();

Return Value

Integer — Video height in pixels, or 0 if no video is open.

Example Code
let h = VideoExtractor.GetVideoHeight();
11. VideoExtractor.GetVideoWidth() Returns: Integer
▶
Description

Returns the display width of the currently opened video in pixels.

Syntax

let result = VideoExtractor.GetVideoWidth();

Return Value

Integer — Video width in pixels, or 0 if no video is open.

Example Code
let w = VideoExtractor.GetVideoWidth();
12. VideoExtractor.IsVideoOpened() Returns: Boolean
▶
Description

Checks whether a video file is currently opened and ready for extraction.

Syntax

let result = VideoExtractor.IsVideoOpened();

Return Value

Boolean — True if a video file is open; otherwise False.

Example Code
let isOpen = VideoExtractor.IsVideoOpened();
13. VideoExtractor.OpenVideo(filePath) Returns: Boolean
▶
Description

Opens a video file for frame extraction.

Syntax

let result = VideoExtractor.OpenVideo(filePath);

Parameters
ParameterDescriptionDefault
filePathStringFull path to the video file.—
Return Value

Boolean — True if the video file was successfully opened; otherwise False.

Example Code
let opened = VideoExtractor.OpenVideo("C:\Videos\sample.mp4");
14. VideoExtractor.ReadNextFrame(outTimestampSec) Returns: Bitmap
▶
Description

Reads the next frame in the active sequential scan and advances the scan timestamp.

Syntax

let result = VideoExtractor.ReadNextFrame(outTimestampSec);

Parameters
ParameterDescriptionDefault
outTimestampSecDouble, OptionalOutput parameter receiving the timestamp (in seconds) of the extracted frame.0.0
Return Value

Bitmap — Extracted Bitmap for the current step, or Nothing when the scan finishes or fails.

Example Code
let bmp = VideoExtractor.ReadNextFrame(currentSec);
15. VideoExtractor.SendFrameToWorkspace(timeInSeconds, putUndo) Returns: Boolean
▶
Description

Extracts a single frame at the specified time directly into the active PhenoCapture workspace.

Syntax

let result = VideoExtractor.SendFrameToWorkspace(timeInSeconds, putUndo);

Parameters
ParameterDescriptionDefault
timeInSecondsDoubleTarget timestamp in seconds.—
putUndoBoolean, OptionalWhether to record the operation in the Undo engine.True
Return Value

Boolean — True if the frame was loaded into the workspace; otherwise False.

Example Code
VideoExtractor.SendFrameToWorkspace(10.0, true);
9. VideoWriter (ScriptVideoWriterHelper) 13 Functions
▶
Video & Animation Encoding Actions 13 functions
▶
1. VideoWriter.AddFrame(frameBitmap) Returns: Boolean
▶
Description

Appends a Bitmap frame to the currently opened video or animation.

Syntax

let result = VideoWriter.AddFrame(frameBitmap);

Parameters
ParameterDescriptionDefault
frameBitmapBitmapSource Bitmap to encode. Automatically resized if dimensions differ from target size.—
Return Value

Boolean — True if the frame was successfully encoded; otherwise False.

Example Code
VideoWriter.AddFrame(bmp);
2. VideoWriter.AddFrameFromFile(imageFilePath, showPreviewWindow) Returns: Boolean
▶
Description

Loads an image file from disk and appends it as a frame to the currently opened video.

Syntax

let result = VideoWriter.AddFrameFromFile(imageFilePath, showPreviewWindow);

Parameters
ParameterDescriptionDefault
imageFilePathStringFull path to the source image file.—
showPreviewWindowBoolean, OptionalWhether to show the frame thumbnail and progress in a dedicated resizable window.False
Return Value

Boolean — True if the image was loaded and encoded; otherwise False.

Example Code
VideoWriter.AddFrameFromFile("C:\Images\frame001.png", true);
3. VideoWriter.AddWorkspaceFrame() Returns: Boolean
▶
Description

Captures the current image from the active PhenoCapture workspace and appends it as a video frame.

Syntax

let result = VideoWriter.AddWorkspaceFrame();

Return Value

Boolean — True if the workspace image was successfully encoded; otherwise False.

Example Code
writer.AddWorkspaceFrame();
4. VideoWriter.BeginFolderEncoding(sourceFolder, destinationFile, fps, format, bitrateKbps, skipStep) Returns: Integer
▶
Description

Scans a folder for supported image files and initializes the video encoder automatically using the first image's resolution.

Syntax

let result = VideoWriter.BeginFolderEncoding(sourceFolder, destinationFile, fps, format, bitrateKbps, skipStep);

Parameters
ParameterDescriptionDefault
sourceFolderStringDirectory containing source images.—
destinationFileString, OptionalOutput video or animation file path (if empty, saves as Output_Encoded.mp4 in sourceFolder).""
fpsInteger, OptionalFrames per second (1 - 90).10
formatString, OptionalOutput format ("MP4", "WMV", "GIF", "APNG")."MP4"
bitrateKbpsInteger, OptionalTarget video bitrate in kbps.4000
skipStepInteger, OptionalFrame step interval (1 = every file, 2 = every 2nd file).1
Return Value

Integer — Total number of frames scheduled to be encoded, or 0 if initialization fails.

Example Code
let total = VideoWriter.BeginFolderEncoding("C:\Images", "C:\Images\Output.mp4", 10, "MP4");
5. VideoWriter.CloseVideo() Returns: Boolean
▶
Description

Finalizes and closes the currently opened video or animation file, and closes the preview window if open.

Syntax

let result = VideoWriter.CloseVideo();

Return Value

Boolean — True if finalized cleanly; otherwise False.

Example Code
VideoWriter.CloseVideo();
6. VideoWriter.EncodeNextFolderFrame(showPreviewWindow) Returns: Boolean
▶
Description

Encodes the next scheduled image frame from the folder initialized by BeginFolderEncoding.

Syntax

let result = VideoWriter.EncodeNextFolderFrame(showPreviewWindow);

Parameters
ParameterDescriptionDefault
showPreviewWindowBoolean, OptionalWhether to display the current thumbnail and frame count in a dedicated resizable window.True
Return Value

Boolean — True if the frame was encoded; False when finished or if an error occurs.

Example Code
let ok = VideoWriter.EncodeNextFolderFrame(true);
7. VideoWriter.GetCurrentFrameFileName() Returns: String
▶
Description

Returns the file name of the most recently encoded image frame during folder encoding.

Syntax

let result = VideoWriter.GetCurrentFrameFileName();

Return Value

String — File name string (e.g., "frame001.png").

Example Code
let fileName = VideoWriter.GetCurrentFrameFileName();
8. VideoWriter.GetLastError() Returns: String
▶
Description

Returns the most recent error message produced by the helper.

Syntax

let result = VideoWriter.GetLastError();

Return Value

String — The last error message, or an empty string when no error is recorded.

Example Code
let errorMessage = VideoWriter.GetLastError();
9. VideoWriter.GetTargetHeight() Returns: Integer
▶
Description

Returns the aligned frame height (in pixels) of the currently opened output file.

Syntax

let result = VideoWriter.GetTargetHeight();

Return Value

Integer — Target frame height in pixels, or 0 if not opened.

Example Code
let h = VideoWriter.GetTargetHeight();
10. VideoWriter.GetTargetWidth() Returns: Integer
▶
Description

Returns the aligned frame width (in pixels) of the currently opened output file.

Syntax

let result = VideoWriter.GetTargetWidth();

Return Value

Integer — Target frame width in pixels, or 0 if not opened.

Example Code
let w = VideoWriter.GetTargetWidth();
11. VideoWriter.GetWrittenFrameCount() Returns: Integer
▶
Description

Returns the number of frames written to the currently opened video or animation.

Syntax

let result = VideoWriter.GetWrittenFrameCount();

Return Value

Integer — Total number of encoded frames.

Example Code
let count = VideoWriter.GetWrittenFrameCount();
12. VideoWriter.IsVideoOpened() Returns: Boolean
▶
Description

Checks whether a video or animation file is currently opened for writing.

Syntax

let result = VideoWriter.IsVideoOpened();

Return Value

Boolean — True if an output stream is open and ready to receive frames; otherwise False.

Example Code
let isOpen = VideoWriter.IsVideoOpened();
13. VideoWriter.OpenVideo(filePath, width, height, fps, format, bitrateKbps, estimatedFrameCount) Returns: Boolean
▶
Description

Opens a new video or animation file (MP4, WMV, GIF, or APNG) for frame-by-frame encoding.

Syntax

let result = VideoWriter.OpenVideo(filePath, width, height, fps, format, bitrateKbps, estimatedFrameCount);

Parameters
ParameterDescriptionDefault
filePathStringFull destination path for the output file.—
widthIntegerFrame width in pixels.—
heightIntegerFrame height in pixels.—
fpsInteger, OptionalFrames per second (1 - 90).10
formatString, OptionalOutput format ("MP4", "WMV", "GIF", "APNG")."MP4"
bitrateKbpsInteger, OptionalTarget video bitrate in kbps (e.g., 4000 for 4 Mbps).4000
estimatedFrameCountInteger, OptionalExpected frame count (used by APNG header and progress window).0
Return Value

Boolean — True if the encoder was successfully initialized; otherwise False.

Example Code
let ok = VideoWriter.OpenVideo("C:\Temp\out.mp4", 640, 480, 15, "MP4", 4000, 100);