JavaScript

PhenoCapture Scripting API Reference (JavaScript)


1. Action (ScriptActionHelper)

System & Workspace Actions

Action.ActivateUndoEngine()

Description: Activates the undo engine for workspace operations

Syntax: await Action.ActivateUndoEngine();

Return Value: None

Example:

Action.ActivateUndoEngine();

Action.DeactivateUndoEngine()

Description: Deactivates the undo engine to disable undo tracking

Syntax: await Action.DeactivateUndoEngine();

Return Value: None

Example:

Action.DeactivateUndoEngine();

Action.SaveWorkspaceAs()

Description: Saves the current workspace with a new name

Syntax: await Action.SaveWorkspaceAs();

Return Value: None

Example:

Action.SaveWorkspaceAs();

Action.SaveWorkspaceSelectionAs()

Description: Saves the current workspace selection as a new file

Syntax: await Action.SaveWorkspaceSelectionAs();

Return Value: None

Example:

Action.SaveWorkspaceSelectionAs();

Action.SaveImage(sourceBitmap, destFileName, jpegQuality)

Description: Saves a bitmap image to the specified file path

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

Parameter Description
sourceBitmap (Bitmap) GDI+ Bitmap object to save
destFileName (String) Full destination path on disk
jpegQuality (Integer, Optional) JPEG compression quality (1-100)

Return Value: String

Example:

let img, errStr;
img = Action.GetImage(0);
errStr = Action.SaveImage(img, "C:\Output\Result.jpg", 95);

Action.SaveImageDialog(targetBitmap, selectedExtension, selectedQuality)

Description: Opens a dialog to save an image with specified options

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

Parameter Description
targetBitmap (Bitmap) GDI+ Bitmap object to save
selectedExtension (String) Default file extension for the dialog
selectedQuality (Integer) Default image quality setting

Return Value: None

Example:

Action.SaveImageDialog(img, "jpg", 90);

Action.SaveImageAction(outputFolder, prefix, suffix, formatType, quality)

Description: Saves image with action parameters including prefix, suffix, and format

Syntax: const result = await Action.SaveImageAction(outputFolder, prefix, suffix, formatType, quality);

Parameter Description
outputFolder (String, Optional) Target directory for saving
prefix (String, Optional) Prefix for the filename
suffix (String, Optional) Suffix for the filename
formatType (Integer, Optional) Save image format type
quality (Integer, Optional) Image compression quality

Return Value: Boolean

Example:

let success ;= Action.SaveImageAction("C:\Data", "Exp1_", "_Out", 2, 100);

Action.PasteAndFitToRectangle()

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

Syntax: const result = await Action.PasteAndFitToRectangle();

Return Value: Boolean

Example:

let result;
result = Action.PasteAndFitToRectangle();

Edit & Selection Actions

Action.ExpandSelection(expandByPixels)

Description: Expands the current selection by specified number of pixels

Syntax: const result = await Action.ExpandSelection(expandByPixels);

Parameter Description
expandByPixels (Integer, Optional) Number of pixels to expand

Return Value: Boolean

Example:

let success ;= Action.ExpandSelection(10);

Action.ShrinkSelection(shrinkByPixels)

Description: Shrinks the current selection by specified number of pixels

Syntax: const result = await Action.ShrinkSelection(shrinkByPixels);

Parameter Description
shrinkByPixels (Integer, Optional) Number of pixels to shrink

Return Value: Boolean

Example:

let success ;= Action.ShrinkSelection(10);

Action.PutToImageBuffer(targetLocation)

Description: Stores the current image to a buffer location

Syntax: const result = await Action.PutToImageBuffer(targetLocation);

Parameter Description
targetLocation (Integer, Optional) Buffer location index

Return Value: Boolean

Example:

let success ;= Action.PutToImageBuffer(2);

Action.GetFromImageBuffer(sourceLocation)

Description: Retrieves an image from a buffer location

Syntax: const result = await Action.GetFromImageBuffer(sourceLocation);

Parameter Description
sourceLocation (Integer, Optional) Buffer location index

Return Value: Boolean

Example:

let success ;= Action.GetFromImageBuffer(2);

Action.Copy()

Description: Copies the current image to clipboard

Syntax: const result = await Action.Copy();

Return Value: Boolean

Example:

let success ;= Action.Copy();

Action.Paste()

Description: Pastes an image from clipboard

Syntax: const result = await Action.Paste();

Return Value: Boolean

Example:

let success ;= Action.Paste();

Action.Unselect()

Description: Clears the current selection

Syntax: const result = await Action.Unselect();

Return Value: Boolean

Example:

let success ;= Action.Unselect();

Image Transforms & Filters

Action.BoxAveraging(kernelSize)

Description: Applies box averaging filter to smooth the image

Syntax: const result = await Action.BoxAveraging(kernelSize);

Parameter Description
kernelSize (Integer, Optional) Size of the filter kernel

Return Value: Boolean

Example:

let success ;= Action.BoxAveraging(5);

Action.GaussianFilter(kernelSize)

Description: Applies Gaussian blur filter to the image

Syntax: const result = await Action.GaussianFilter(kernelSize);

Parameter Description
kernelSize (Integer, Optional) Size of the Gaussian kernel

Return Value: Boolean

Example:

let success ;= Action.GaussianFilter(5);

Action.FlipVertically()

Description: Flips the image vertically

Syntax: const result = await Action.FlipVertically();

Return Value: Boolean

Example:

let success ;= Action.FlipVertically();

Action.FlipHorizontally()

Description: Flips the image horizontally

Syntax: const result = await Action.FlipHorizontally();

Return Value: Boolean

Example:

let success ;= Action.FlipHorizontally();

Action.Sharpen3x3()

Description: Applies 3×3 sharpening filter to enhance edges

Syntax: const result = await Action.Sharpen3x3();

Return Value: Boolean

Example:

let success ;= Action.Sharpen3x3();

Action.Sharpen5x5HighQuality(sharpenStrengthPercentage)

Description: Applies high-quality 5×5 sharpening filter with adjustable strength

Syntax: const result = await Action.Sharpen5x5HighQuality(sharpenStrengthPercentage);

Parameter Description
sharpenStrengthPercentage (Integer, Optional) Strength of sharpening (percentage)

Return Value: Boolean

Example:

let success ;= Action.Sharpen5x5HighQuality(20);

Action.AdvancedSharpening(sharpenAmountPercentage)

Description: Applies advanced sharpening with customizable amount

Syntax: const result = await Action.AdvancedSharpening(sharpenAmountPercentage);

Parameter Description
sharpenAmountPercentage (Integer, Optional) Amount of sharpening (percentage)

Return Value: Boolean

Example:

let success ;= Action.AdvancedSharpening(150);

Action.SmartDenoise(radius, threshold)

Description: Reduces noise while preserving edges with smart denoising

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

Parameter Description
radius (Integer, Optional) Radius for noise reduction
threshold (Integer, Optional) Threshold for noise detection

Return Value: Boolean

Example:

let success ;= Action.SmartDenoise(7, 40);

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

Description: Creates an embossed effect on the image

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

Parameter Description
angle (Single, Optional) Lighting angle
distance (Integer, Optional) Emboss depth/distance
strength (Integer, Optional) Effect strength
bias (Integer, Optional) Color bias

Return Value: Boolean

Example:

let success ;= Action.Emboss(45.0F, 2, 150, 128);

Action.Dithering(ditheringAlgorithmType)

Description: Applies dithering algorithm to reduce color depth

Syntax: const result = await Action.Dithering(ditheringAlgorithmType);

Parameter Description
ditheringAlgorithmType (Integer, Optional) Type of dithering algorithm

Return Value: Boolean

Example:

let success ;= Action.Dithering(1);

Action.MosaicFilter(mosaicModeType, value)

Description: Applies mosaic or pixelation filter for privacy or artistic effect

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

Parameter Description
mosaicModeType (Integer, Optional) Mosaic mode selection
value (Integer, Optional) Block size or intensity

Return Value: Boolean

Example:

let success ;= Action.MosaicFilter(0, 15);

Action.RotationalAlignmentByLine(backgroundColorRed, backgroundColorGreen, backgroundColorBlue)

Description: Rotates image to align with specified line

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

Parameter Description
backgroundColorRed (Integer, Optional) Red component of background (0-255)
backgroundColorGreen (Integer, Optional) Green component of background (0-255)
backgroundColorBlue (Integer, Optional) Blue component of background (0-255)

Return Value: Boolean

Example:

let success ;= Action.RotationalAlignmentByLine(0, 0, 0);

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

Description: Resizes image to specified dimensions with interpolation

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

Parameter Description
resizeUnitType (Integer, Optional) Unit of measurement for resize
maintainAspectRatio (Boolean, Optional) Keep original aspect ratio
baseDimensionType (Integer, Optional) Dimension to base aspect ratio on
targetWidth (Integer, Optional) Target width
targetHeight (Integer, Optional) Target height
interpolationAlgorithmType (Integer, Optional) Algorithm for resampling

Return Value: Boolean

Example:

let success ;= Action.Resize(0, true, 0, 1024, 768, 4);

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

Description: Rotates image by specified angle with background color fill

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

Parameter Description
rotationAngleDegrees (Single, Optional) Angle in degrees
rotationDirectionType (Integer, Optional) Direction of rotation (e.g., CW/CCW)
backgroundColorRed (Integer, Optional) Red component of fill color
backgroundColorGreen (Integer, Optional) Green component of fill color
backgroundColorBlue (Integer, Optional) Blue component of fill color

Return Value: Boolean

Example:

let success ;= Action.Rotate(45.5F, 1, 255, 255, 255);

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

Description: Crops image to specified rectangular area

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

Parameter Description
cropWidthPixels (Integer, Optional) Width of cropped area
cropHeightPixels (Integer, Optional) Height of cropped area
startXCoordinate (Integer, Optional) Starting X coordinate
startYCoordinate (Integer, Optional) Starting Y coordinate

Return Value: Boolean

Example:

let success ;= Action.Crop(200, 200, 50, 50);

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

Description: Resizes canvas around image with alignment and background color options

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

Parameter Description
resizeUnitType (Integer, Optional) Unit of measurement
maintainAspectRatio (Boolean, Optional) Keep aspect ratio for canvas
baseDimensionType (Integer, Optional) Base dimension for aspect ratio
targetWidth (Integer, Optional) Target canvas width
targetHeight (Integer, Optional) Target canvas height
canvasAlignmentType (Integer, Optional) Alignment of original image
backgroundColorRed (Integer, Optional) Background red value
backgroundColorGreen (Integer, Optional) Background green value
backgroundColorBlue (Integer, Optional) Background blue value

Return Value: Boolean

Example:

let success ;= Action.ResizeCanvas(0, false, 0, 1920, 1080, 4, 0, 0, 0);

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

Description: Overlays image with chroma key (color-based) transparency replacement

Syntax: const result = await Action.ChromaKeyOverlay(sourceLocation1, targetColorRed, targetColorGreen, targetColorBlue, sourceLocation2, opacity, enableFeathering, featheringRadius);

Parameter Description
sourceLocation1 (Integer, Optional) Foreground image location
targetColorRed (Integer, Optional) Chroma key color Red
targetColorGreen (Integer, Optional) Chroma key color Green
targetColorBlue (Integer, Optional) Chroma key color Blue
sourceLocation2 (Integer, Optional) Background image location
opacity (Integer, Optional) Overlay opacity percentage
enableFeathering (Boolean, Optional) Enable edge feathering
featheringRadius (Integer, Optional) Feathering blur radius

Return Value: Boolean

Example:

let success ;= Action.ChromaKeyOverlay(1, 0, 255, 0, 0, 100, true, 20);

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

Description: Adds text annotation or watermark to image with styling options: fontStyleInt: 0 = Regular, 1 = Bold, 2 = Italic, 3 = Bold+Italic, 4 = Underline, 8 = Strikeout

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

Parameter Description
textString (String, Optional) The text string to display on the canvas.
locationX (Integer, Optional) The starting X coordinate for the text.
locationY (Integer, Optional) The starting Y coordinate for the text.
fontName (String, Optional) The font family name (e.g., "Arial", "Times New Roman").
fontSize (Single, Optional) The size of the font.
fontStyleInt (Integer, Optional) Font style configuration (0 = Regular, 1 = Bold, 2 = Italic, 3 = Bold+Italic, 4 = Underline, 8 = Strikeout).
innerColorArgb (Integer, Optional) ARGB integer value for the text fill color (Default is Yellow: -256).
outerColorArgb (Integer, Optional) ARGB integer value for the text outline color (Default is Black: -16777216).
opacity (Integer, Optional) Opacity level of the text from 0 (transparent) to 100 (solid).
outlineThickness (Single, Optional) Thickness of the outer stroke/outline of the text.
angle (Single, Optional) Rotation angle of the text in degrees.
isAntiAlias (Boolean, Optional) Applies anti-aliasing to smooth the text edges if True.

Return Value: Boolean

Example:

// VBScript Example
let success;
// Draw bold text rotated by 45 degrees with a thick outline
success = Action.TextAnnotation("Sample Label", 150, 150, "Arial", 24.0, 1, -256, -16777216, 100, 2.5, 45.0, true);

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

Description: Overlays one image on another with blend modes and feathering

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

Parameter Description
sourceLocation1 (Integer, Optional) First image source location
sourceLocation2 (Integer, Optional) Second image source location
targetColorRed (Integer, Optional) Target transparent color Red
targetColorGreen (Integer, Optional) Target transparent color Green
targetColorBlue (Integer, Optional) Target transparent color Blue
opacity (Integer, Optional) Overlay opacity percentage
enableFeathering (Boolean, Optional) Enable edge feathering
featheringRadius (Integer, Optional) Feathering blur radius
tolerance (Integer, Optional) Tolerance level for transparent color matching (0 to 255)
gradientAlpha (Boolean, Optional) Apply gradual alpha blending based on color difference within the tolerance range

Return Value: Boolean

Example:

let success ;= Action.OverlayImage(1, 0, 255, 255, 255, 50, true, 15, 30, true);

Color & Channel Actions

Action.SplitRGB(rgbSplitChannelType)

Description: Splits image into separate RGB channels

Syntax: const result = await Action.SplitRGB(rgbSplitChannelType);

Parameter Description
rgbSplitChannelType (Integer, Optional) RGB channel to isolate

Return Value: Boolean

Example:

let success ;= Action.SplitRGB(1);

Action.DeleteChannel(channelToDeleteType)

Description: Removes a specific color channel from the image

Syntax: const result = await Action.DeleteChannel(channelToDeleteType);

Parameter Description
channelToDeleteType (Integer, Optional) Color channel to remove

Return Value: Boolean

Example:

let success ;= Action.DeleteChannel(2);

Action.GrayFrom(sourceChannelType)

Description: Converts a specific channel to grayscale

Syntax: const result = await Action.GrayFrom(sourceChannelType);

Parameter Description
sourceChannelType (Integer, Optional) Source color channel

Return Value: Boolean

Example:

let success ;= Action.GrayFrom(1);

Action.Invert()

Description: Inverts all colors in the image (negative)

Syntax: const result = await Action.Invert();

Return Value: Boolean

Example:

let success ;= Action.Invert();

Action.GrayScaling()

Description: Converts image to grayscale

Syntax: const result = await Action.GrayScaling();

Return Value: Boolean

Example:

let success ;= Action.GrayScaling();

Action.ConvertToRgChrom()

Description: Converts image to RG chromaticity coordinates

Syntax: const result = await Action.ConvertToRgChrom();

Return Value: Boolean

Example:

let success ;= Action.ConvertToRgChrom();

Action.GrayToColor(mapType, isReversed)

Description: Converts grayscale image to color using specified color map

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

Parameter Description
mapType (Integer, Optional) Type of color map
isReversed (Boolean, Optional) Reverse the color map

Return Value: Boolean

Example:

let success ;= Action.GrayToColor(3, true);

Action.AutoTone(clipPercentage)

Description: Automatically adjusts tonal range for better contrast

Syntax: const result = await Action.AutoTone(clipPercentage);

Parameter Description
clipPercentage (Single, Optional) Percentage of pixels to clip

Return Value: Boolean

Example:

let success ;= Action.AutoTone(0.1F);

Action.AutoContrast(clipPercentage)

Description: Automatically adjusts contrast to optimal levels

Syntax: const result = await Action.AutoContrast(clipPercentage);

Parameter Description
clipPercentage (Single, Optional) Percentage of pixels to clip

Return Value: Boolean

Example:

let success ;= Action.AutoContrast(0.2F);

Action.AutoEqualize()

Description: Equalizes histogram to distribute tones across full range

Syntax: const result = await Action.AutoEqualize();

Return Value: Boolean

Example:

let success ;= Action.AutoEqualize();

Action.AutoGamma()

Description: Automatically adjusts gamma for optimal brightness curve

Syntax: const result = await Action.AutoGamma();

Return Value: Boolean

Example:

let success ;= Action.AutoGamma();

Action.AutoWhiteBalance()

Description: Automatically performs white balance to neutralize color casts

Syntax: const result = await Action.AutoWhiteBalance();

Return Value: Boolean

Example:

let success ;= Action.AutoWhiteBalance();

Action.AutoShadowsHighlights(shadowCorrectionStrengthPercentage, highlightCorrectionStrengthPercentage)

Description: Automatically corrects shadow and highlight areas with adjustable strength

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

Parameter Description
shadowCorrectionStrengthPercentage (Single, Optional) Strength of shadow recovery
highlightCorrectionStrengthPercentage (Single, Optional) Strength of highlight recovery

Return Value: Boolean

Example:

let success ;= Action.AutoShadowsHighlights(60.0F, 20.0F);

Action.AdaptiveContrast(contrastStrengthPercentage, gridTilesX, gridTilesY, contrastClipLimit)

Description: Applies adaptive contrast enhancement with CLAHE algorithm

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

Parameter Description
contrastStrengthPercentage (Integer, Optional) Enhancement strength
gridTilesX (Integer, Optional) Number of horizontal grid tiles
gridTilesY (Integer, Optional) Number of vertical grid tiles
contrastClipLimit (Single, Optional) Limit for contrast clipping

Return Value: Boolean

Example:

let success ;= Action.AdaptiveContrast(30, 4, 4, 2.0F);

Action.CorrectUnevenIllumination(illuminationGridSize)

Description: Corrects uneven illumination across image using rolling ball algorithm

Syntax: const result = await Action.CorrectUnevenIllumination(illuminationGridSize);

Parameter Description
illuminationGridSize (Integer, Optional) Grid size for illumination estimation

Return Value: Boolean

Example:

let success ;= Action.CorrectUnevenIllumination(16);

Action.RollingBallBackgroundSubtraction(rollingBallBoxSize, isObjectColorAutomatic, manualObjectColorType)

Description: Removes background using rolling ball background subtraction

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

Parameter Description
rollingBallBoxSize (Integer, Optional) Radius of rolling ball
isObjectColorAutomatic (Boolean, Optional) Automatically detect object color
manualObjectColorType (Integer, Optional) Manual object color mode

Return Value: Boolean

Example:

let success ;= Action.RollingBallBackgroundSubtraction(100, false, 1);

Action.BrightContrast(brightnessLevel, contrastLevel, autoBrightness)

Description: Adjusts brightness and contrast levels

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

Parameter Description
brightnessLevel (Integer, Optional) Brightness adjustment value
contrastLevel (Integer, Optional) Contrast adjustment value
autoBrightness (Boolean, Optional) Enable automatic brightness

Return Value: Boolean

Example:

let success ;= Action.BrightContrast(10, 20, false);

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

Description: Replaces one color with another in the image

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

Parameter Description
sourceColorRed (Integer, Optional) Source color Red
sourceColorGreen (Integer, Optional) Source color Green
sourceColorBlue (Integer, Optional) Source color Blue
targetColorRed (Integer, Optional) Target color Red
targetColorGreen (Integer, Optional) Target color Green
targetColorBlue (Integer, Optional) Target color Blue

Return Value: Boolean

Example:

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

Action.CIELab(lightnessShift, aAxisShift, bAxisShift)

Description: Adjusts color in CIE Lab color space for perceptually uniform color adjustments

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

Parameter Description
lightnessShift (Integer, Optional) Shift in Lightness (L)
aAxisShift (Integer, Optional) Shift in Green-Red axis (a)
bAxisShift (Integer, Optional) Shift in Blue-Yellow axis (b)

Return Value: Boolean

Example:

let success ;= Action.CIELab(10, -5, 5);

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

Description: Adjusts saturation and intensity for specific color bands

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

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

Return Value: Boolean

Example:

let success ;= Action.MultibandColor(10, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);

Action.HueSaturationIntensity(hue, saturation, intensity)

Description: Adjusts hue, saturation, and intensity channels independently

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

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

Return Value: Boolean

Example:

let success ;= Action.HueSaturationIntensity(15, 20, 10);

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

Description: Merges multiple images as channels in specified color space

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

Parameter Description
colorSpaceType (Integer, Optional) Target color space
image1Source (Integer, Optional) Source index for channel 1
image2Source (Integer, Optional) Source index for channel 2
image3Source (Integer, Optional) Source index for channel 3

Return Value: Boolean

Example:

let success ;= Action.MergeChannels(0, 1, 2, 3);

Processing & Morphological Actions

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

Description: Fills a region (selection or ROI) with specified color

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

Parameter Description
fillRegionType (Integer, Optional) Type of region to fill
fillColorRed (Integer, Optional) Fill color Red component
fillColorGreen (Integer, Optional) Fill color Green component
fillColorBlue (Integer, Optional) Fill color Blue component
fillOpacityPercentage (Integer, Optional) Opacity percentage

Return Value: Boolean

Example:

let success ;= Action.FillRegion(1, 255, 0, 0, 50);

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

Description: Draws outline border around selected region with specified color and thickness

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

Parameter Description
borderColorRed (Integer, Optional) Border color Red
borderColorGreen (Integer, Optional) Border color Green
borderColorBlue (Integer, Optional) Border color Blue
borderThicknessPixels (Integer, Optional) Thickness of the border
borderOpacityPercentage (Integer, Optional) Opacity of the border
applyToMultipleROIs (Boolean, Optional) Apply to multiple Regions of Interest

Return Value: Boolean

Example:

let success ;= Action.DrawSelectionBorder(255, 255, 0, 2, 100, true);

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

Description: Hides outlines by replacing them with specified color or most frequent color

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

Parameter Description
targetColorRed (Integer, Optional) Target color Red
targetColorGreen (Integer, Optional) Target color Green
targetColorBlue (Integer, Optional) Target color Blue
useMostFrequentColor (Boolean, Optional) Use most frequent color automatically

Return Value: Boolean

Example:

let success ;= Action.HideOutlines(0, 0, 0, false);

Action.ChangeNonBlackToWhite()

Description: Converts all non-black pixels to white

Syntax: const result = await Action.ChangeNonBlackToWhite();

Return Value: Boolean

Example:

let success ;= Action.ChangeNonBlackToWhite();

Action.Erode(morphologyKernelSize)

Description: Applies morphological erosion to thin objects

Syntax: const result = await Action.Erode(morphologyKernelSize);

Parameter Description
morphologyKernelSize (Integer, Optional) Size of morphology kernel

Return Value: Boolean

Example:

let success ;= Action.Erode(5);

Action.Dilate(morphologyKernelSize)

Description: Applies morphological dilation to thicken objects

Syntax: const result = await Action.Dilate(morphologyKernelSize);

Parameter Description
morphologyKernelSize (Integer, Optional) Size of morphology kernel

Return Value: Boolean

Example:

let success ;= Action.Dilate(5);

Action.EdgeDetection(edgeDetectionAlgorithmType)

Description: Detects edges using specified algorithm

Syntax: const result = await Action.EdgeDetection(edgeDetectionAlgorithmType);

Parameter Description
edgeDetectionAlgorithmType (Integer, Optional) Edge detection algorithm mode

Return Value: Boolean

Example:

let success ;= Action.EdgeDetection(1);

Action.CannyEdge(cannyHighThreshold)

Description: Applies Canny edge detection algorithm

Syntax: const result = await Action.CannyEdge(cannyHighThreshold);

Parameter Description
cannyHighThreshold (Integer, Optional) High threshold for Canny detection

Return Value: Boolean

Example:

let success ;= Action.CannyEdge(150);

Action.Skeletonize()

Description: Converts object outlines to skeleton (1-pixel centerline)

Syntax: const result = await Action.Skeletonize();

Return Value: Boolean

Example:

let success ;= Action.Skeletonize();

Action.SkeletonizeExtended()

Description: Applies extended skeletonization for more detailed centerlines

Syntax: const result = await Action.SkeletonizeExtended();

Return Value: Boolean

Example:

let success ;= Action.SkeletonizeExtended();

Action.BoundaryDetection(boundaryOverlayModeType)

Description: Detects object boundaries with overlay option

Syntax: const result = await Action.BoundaryDetection(boundaryOverlayModeType);

Parameter Description
boundaryOverlayModeType (Integer, Optional) Mode for boundary processing

Return Value: Boolean

Example:

let success ;= Action.BoundaryDetection(1);

Action.RemoveBlackDots(maxDotSize)

Description: Removes small black dots and noise

Syntax: const result = await Action.RemoveBlackDots(maxDotSize);

Parameter Description
maxDotSize (Integer, Optional) Maximum size of dots to remove

Return Value: Boolean

Example:

let success ;= Action.RemoveBlackDots(3);

Action.RemoveWhiteDots(maxDotSize)

Description: Removes small white dots and noise

Syntax: const result = await Action.RemoveWhiteDots(maxDotSize);

Parameter Description
maxDotSize (Integer, Optional) Maximum size of dots to remove

Return Value: Boolean

Example:

let success ;= Action.RemoveWhiteDots(3);

Action.Outline()

Description: Traces outlines of objects in binary image

Syntax: const result = await Action.Outline();

Return Value: Boolean

Example:

let success ;= Action.Outline();

Action.ErodeOutline()

Description: Erodes the outline to make it thinner

Syntax: const result = await Action.ErodeOutline();

Return Value: Boolean

Example:

let success ;= Action.ErodeOutline();

Action.DilateOutline()

Description: Dilates the outline to make it thicker

Syntax: const result = await Action.DilateOutline();

Return Value: Boolean

Example:

let success ;= Action.DilateOutline();

Action.ManualThresholding(binarizationThresholdValue)

Description: Converts image to binary using manual threshold value

Syntax: const result = await Action.ManualThresholding(binarizationThresholdValue);

Parameter Description
binarizationThresholdValue (Integer, Optional) Threshold value (0-255)

Return Value: Boolean

Example:

let success ;= Action.ManualThresholding(150);

Action.MultiStepThresholding(redChannelLevels, greenChannelLevels, blueChannelLevels)

Description: Applies multi-level thresholding to separate multiple intensity ranges

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

Parameter Description
redChannelLevels (Integer, Optional) Levels for Red channel
greenChannelLevels (Integer, Optional) Levels for Green channel
blueChannelLevels (Integer, Optional) Levels for Blue channel

Return Value: Boolean

Example:

let success ;= Action.MultiStepThresholding(3, 3, 3);

Action.DifferentialImage(firstImageSourceLocation, secondImageSourceLocation)

Description: Computes difference between two images

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

Parameter Description
firstImageSourceLocation (Integer, Optional) Source index for first image
secondImageSourceLocation (Integer, Optional) Source index for second image

Return Value: Boolean

Example:

let success ;= Action.DifferentialImage(1, 2);

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

Description: Segments image using watershed algorithm for object separation

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

Parameter Description
minDistanceThreshold (Integer, Optional) Minimum distance between peaks
smoothingRadius (Integer, Optional) Radius for initial smoothing
boundaryThickness (Integer, Optional) Thickness of detected boundaries
boundaryColorRed (Integer, Optional) Boundary color Red
boundaryColorGreen (Integer, Optional) Boundary color Green
boundaryColorBlue (Integer, Optional) Boundary color Blue

Return Value: Boolean

Example:

let success ;= Action.WatershedSegmentation(15, 5, 2, 0, 255, 0);

Action.BinaryOperation(logicalOperationType, firstImageSourceLocation, secondImageSourceLocation)

Description: Performs binary logical operations between two images

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

Parameter Description
logicalOperationType (Integer, Optional) Type of logical operation (AND, OR, etc)
firstImageSourceLocation (Integer, Optional) First image source index
secondImageSourceLocation (Integer, Optional) Second image source index

Return Value: Boolean

Example:

let success ;= Action.BinaryOperation(1, 0, 2);

Action.AdaptiveThresholding(adaptiveBoxSize, adaptiveThresholdLevel, isObjectColorAutomatic, manualObjectColorType)

Description: Applies adaptive thresholding for varying illumination conditions

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

Parameter Description
adaptiveBoxSize (Integer, Optional) Box size for adaptive calculation
adaptiveThresholdLevel (Integer, Optional) Threshold tuning level
isObjectColorAutomatic (Boolean, Optional) Auto detect object color
manualObjectColorType (Integer, Optional) Manual object color mode

Return Value: Boolean

Example:

let success ;= Action.AdaptiveThresholding(100, 90, false, 1);

Action.RegionColoring(connectivity)

Description: Colors connected regions with different colors for identification

Syntax: const result = await Action.RegionColoring(connectivity);

Parameter Description
connectivity (Integer, Optional) Pixel connectivity (4 or 8)

Return Value: Boolean

Example:

let success ;= Action.RegionColoring(4);

Action.SuperPixelSegmentation(numSuperpixels, compactness, fillWithWhite)

Description: Segments image into superpixels for efficient processing

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

Parameter Description
numSuperpixels (Integer, Optional) Desired number of superpixels
compactness (Single, Optional) Compactness factor
fillWithWhite (Boolean, Optional) Fill boundaries with white

Return Value: Boolean

Example:

let success ;= Action.SuperPixelSegmentation(500, 20.0F, true);

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

Description: Overlays a stamp image on current image with transformations

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

Parameter Description
stampImageSource (Integer, Optional)
locationX (Integer, Optional)
locationY (Integer, Optional)
scaleX (Integer, Optional)
scaleY (Integer, Optional)
angle (Single, Optional) Rotation angle of the stamp image
opacity (Integer, Optional)
enableTransparentColor (Boolean, Optional) Enable transparency for a specific color
transparentColorArgb (Integer, Optional) ARGB integer value of the color to make transparent
enableGradualAlpha (Boolean, Optional) Enable smooth gradual alpha blending for the transparent color
tolerance (Integer, Optional) Color tolerance level (0 to 100) for transparency
enableFeather (Boolean, Optional) Enable edge feathering effect
featherRadius (Integer, Optional) Feathering blur radius in pixels

Return Value: Boolean

Example:

let outputImg ;= Action.ImageStamp(srcImg, stampImg, 100.0F, 100.0F, 250.0F, 250.0F, 45.0F, 80, true, -1, false, 10, true, 30);

Action.FFT()

Description: Applies Fast Fourier Transform for frequency domain analysis

Syntax: const result = await Action.FFT();

Return Value: Boolean

Example:

let success ;= Action.FFT();

Action.InverseFFT()

Description: Applies Inverse Fast Fourier Transform to reconstruct spatial image from frequency domain

Syntax: const result = await Action.InverseFFT();

Return Value: Boolean

Example:

let success ;= Action.InverseFFT();

Hardware & Capture Actions

Action.Capture()

Description: Captures image from connected camera or scanner

Syntax: const result = await Action.Capture();

Return Value: Boolean

Example:

let success ;= Action.Capture();

Action.AcquireImagefromScanner(useSilentMode)

Description: Acquires image from scanner with optional silent mode

Syntax: const result = await Action.AcquireImagefromScanner(useSilentMode);

Parameter Description
useSilentMode (Boolean, Optional) Operate without showing scanner UI

Return Value: Boolean

Example:

let success ;= Action.AcquireImagefromScanner(false);

Neural & AI Processing Actions

Action.AIDepthEstimation(autoResizeLargeImages)

Description: Estimates depth map using AI deep learning model

Syntax: const result = await Action.AIDepthEstimation(autoResizeLargeImages);

Parameter Description
autoResizeLargeImages (Boolean, Optional) Automatically resize large inputs

Return Value: Boolean

Example:

let success ;= Action.AIDepthEstimation(false);

Action.AIDocumentUnwarping()

Description: Straightens and unwraps perspective-distorted document images

Syntax: const result = await Action.AIDocumentUnwarping();

Return Value: Boolean

Example:

let success ;= Action.AIDocumentUnwarping();

Action.AIBinarizationSegmentation()

Description: Segments document image and binarizes using AI model

Syntax: const result = await Action.AIBinarizationSegmentation();

Return Value: Boolean

Example:

let success ;= Action.AIBinarizationSegmentation();

Action.AIInpainting()

Description: Removes unwanted objects from image using AI inpainting

Syntax: const result = await Action.AIInpainting();

Return Value: Boolean

Example:

let success ;= Action.AIInpainting();

Action.AIBackgroundRemovalSelfie(virtualBackgroundColorRed, virtualBackgroundColorGreen, virtualBackgroundColorBlue)

Description: Removes background from selfie with optional virtual background

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

Parameter Description
virtualBackgroundColorRed (Integer, Optional) Virtual background Red
virtualBackgroundColorGreen (Integer, Optional) Virtual background Green
virtualBackgroundColorBlue (Integer, Optional) Virtual background Blue

Return Value: Boolean

Example:

let success ;= Action.AIBackgroundRemovalSelfie(0, 255, 0);

Action.AIImageSharpening(sharpenBoostFactor)

Description: Sharpens image using AI-powered enhancement

Syntax: const result = await Action.AIImageSharpening(sharpenBoostFactor);

Parameter Description
sharpenBoostFactor (Single, Optional) Sharpening intensity factor

Return Value: Boolean

Example:

let success ;= Action.AIImageSharpening(3.0F);

Action.AIImageQualityRestorationFast(restorationBoostFactor)

Description: Restores low-quality image using fast AI model

Syntax: const result = await Action.AIImageQualityRestorationFast(restorationBoostFactor);

Parameter Description
restorationBoostFactor (Single, Optional) Restoration boost multiplier

Return Value: Boolean

Example:

let success ;= Action.AIImageQualityRestorationFast(1.5F);

Action.AIImageQualityRestorationSlow()

Description: Restores low-quality image using slow but more accurate AI model

Syntax: const result = await Action.AIImageQualityRestorationSlow();

Return Value: Boolean

Example:

let success ;= Action.AIImageQualityRestorationSlow();

Action.AIImageQualityRestorationSlowest()

Description: Restores low-quality image using slowest but highest quality AI model

Syntax: const result = await Action.AIImageQualityRestorationSlowest();

Return Value: Boolean

Example:

let success ;= Action.AIImageQualityRestorationSlowest();

Action.AIImageQualityRestorationFastest()

Description: Restores low-quality image using fastest AI model for quick preview

Syntax: const result = await Action.AIImageQualityRestorationFastest();

Return Value: Boolean

Example:

let success ;= Action.AIImageQualityRestorationFastest();

Action.AIBackgroundRemovalGeneral(virtualBackgroundColorRed, virtualBackgroundColorGreen, virtualBackgroundColorBlue)

Description: Removes background from general images with optional virtual background

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

Parameter Description
virtualBackgroundColorRed (Integer, Optional) Virtual background Red
virtualBackgroundColorGreen (Integer, Optional) Virtual background Green
virtualBackgroundColorBlue (Integer, Optional) Virtual background Blue

Return Value: Boolean

Example:

let success ;= Action.AIBackgroundRemovalGeneral(0, 0, 0);

Action.AIBackgroundRemovalPortrait(virtualBackgroundColorRed, virtualBackgroundColorGreen, virtualBackgroundColorBlue)

Description: Removes background from portrait images with optional virtual background

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

Parameter Description
virtualBackgroundColorRed (Integer, Optional) Virtual background Red
virtualBackgroundColorGreen (Integer, Optional) Virtual background Green
virtualBackgroundColorBlue (Integer, Optional) Virtual background Blue

Return Value: Boolean

Example:

let success ;= Action.AIBackgroundRemovalPortrait(0, 0, 0);

Action.AISmartSelection()

Description: Creates intelligent selection based on visual content

Syntax: const result = await Action.AISmartSelection();

Return Value: Boolean

Example:

let success ;= Action.AISmartSelection();

Action.AIAutoSubjectSelectionGeneral()

Description: Automatically selects subject in general images using AI

Syntax: const result = await Action.AIAutoSubjectSelectionGeneral();

Return Value: Boolean

Example:

let success ;= Action.AIAutoSubjectSelectionGeneral();

Action.AIAutoSubjectSelectionPortrait()

Description: Automatically selects subject in portrait images using AI

Syntax: const result = await Action.AIAutoSubjectSelectionPortrait();

Return Value: Boolean

Example:

let success ;= Action.AIAutoSubjectSelectionPortrait();

Action.AIImageUpscaleRealESRGAN(upscaleMagnificationType)

Description: Upscales image using RealESRGAN deep learning model

Syntax: const result = await Action.AIImageUpscaleRealESRGAN(upscaleMagnificationType);

Parameter Description
upscaleMagnificationType (Integer, Optional) Scale factor multiplier

Return Value: Boolean

Example:

let success ;= Action.AIImageUpscaleRealESRGAN(2);

Action.AIImageUpscaleRealESRFast()

Description: Upscales image using fast RealESRGAN variant for quick results

Syntax: const result = await Action.AIImageUpscaleRealESRFast();

Return Value: Boolean

Example:

let success ;= Action.AIImageUpscaleRealESRFast();

Data Extraction & Analysis Actions

Action.AverageColorValue(analysisTargetChannelType)

Description: Extracts and returns average color value for specified channel

Syntax: const result = await Action.AverageColorValue(analysisTargetChannelType);

Parameter Description
analysisTargetChannelType (Integer, Optional) Target channel to analyze

Return Value: String

Example:

let val ;= Action.AverageColorValue(1);

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

Description: Counts pixels of specified color and returns results

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

Parameter Description
targetColorRed (Integer, Optional) Target Red value
targetColorGreen (Integer, Optional) Target Green value
targetColorBlue (Integer, Optional) Target Blue value
resultOutputFormatType (Integer, Optional) Output formatting scheme

Return Value: String

Example:

let result ;= Action.PixelCounter(0, 0, 0, 1);

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

Description: Analyzes multiple cells in grid layout and extracts statistical data

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

Parameter Description
gridColumnsX (Integer, Optional) Number of grid columns
gridRowsY (Integer, Optional) Number of grid rows
cellShapeType (Integer, Optional) Shape classification of cell
cellDiameterPixels (Integer, Optional) Cell diameter in pixels
analysisModeType (Integer, Optional) Mode of calculation
analysisTargetChannelType (Integer, Optional) Target channel for analysis
targetColorPresetName (String, Optional) Named color preset

Return Value: String

Example:

let result ;= Action.MultiCellAnalysis(10, 10, 1, 15, 0, 0, "Black");

Action.OCRTextExtraction()

Description: Extracts text from image using Optical Character Recognition

Syntax: const result = await Action.OCRTextExtraction();

Return Value: String

Example:

let textData ;= Action.OCRTextExtraction();

Image Transfer Functions between Script Engine and PhenoCapture

Action.GetImage(sourceLocation)

Description: Retrieves image from specified buffer location

Syntax: const result = await Action.GetImage(sourceLocation);

Parameter Description
sourceLocation (Integer, Optional) Image location index (0 = workspace)

Return Value: Bitmap

Example:

let myImg ;= Action.GetImage(0);

Action.SetImage(newImage, targetLocation)

Description: Sets image to specified buffer location

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

Parameter Description
newImage (Bitmap) Source bitmap to send
targetLocation (Integer, Optional) Target destination index (0 = workspace)

Return Value: Boolean

Example:

let success ;= Action.SetImage(myImg, 0);

2. ImgProc (ScriptImgProcHelper)

Core Image & Buffer Pipeline

ImgProc.CloneImage(SourceImage)

Description: Creates a deep copy of the image

Syntax: const result = await ImgProc.CloneImage(SourceImage);

Parameter Description
SourceImage (Bitmap) Source bitmap image

Return Value: Bitmap

Example:

let copyBmp As Bitmap ;= ImgProc.CloneImage(srcBmp);

ImgProc.RemoveTransparency(SourceImage)

Description: Removes alpha channel transparency from image

Syntax: const result = await ImgProc.RemoveTransparency(SourceImage);

Parameter Description
SourceImage (Bitmap) Source image with potential transparency

Return Value: Bitmap

Example:

let nonTransBmp As Bitmap ;= ImgProc.RemoveTransparency(srcBmp);

ImgProc.Generate_Canvas(nWidth, nHeight, BackColor)

Description: Creates blank canvas with specified dimensions and background color

Syntax: const result = await ImgProc.Generate_Canvas(nWidth, nHeight, BackColor);

Parameter Description
nWidth (Integer) Canvas width in pixels
nHeight (Integer) Canvas height in pixels
BackColor (Color) Background fill color

Return Value: Bitmap

Example:

let canvas As Bitmap ;= ImgProc.Generate_Canvas(800, 600, Color.White);

ImgProc.RegionExtract_BasicAnalysis(Src_IDMap(,), Src_ColorTable(,))

Description: Extracts basic region analysis statistics from label and color maps

Syntax: await ImgProc.RegionExtract_BasicAnalysis(Src_IDMap(,), Src_ColorTable(,));

Parameter Description
Src_IDMap(,) (Object)
Src_ColorTable(,) (Object)

Return Value: None

Example:

await ImgProc.RegionExtract_BasicAnalysis(Src_IDMap(,), Src_ColorTable(,));

ImgProc.RegionExtract_RasterScanning_NoMaskImage(SourceImage, LabelIDMap, RegionColorTable, BkColor)

Description: Extracts regions using raster scanning without mask

Syntax: const result = await ImgProc.RegionExtract_RasterScanning_NoMaskImage(SourceImage, LabelIDMap, RegionColorTable, BkColor);

Parameter Description
SourceImage (Bitmap)
LabelIDMap (Integer(,))
RegionColorTable (Byte(,))
BkColor (Integer, Optional)

Return Value: Bitmap

Example:

let result;
result = ImgProc.RegionExtract_RasterScanning_NoMaskImage(SourceImage, LabelIDMap, RegionColorTable, BkColor);

ImgProc.RegionExtract_RasterScanning(SourceImage, LabelIDMap, RegionColorTable, BkColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Extracts regions using raster scanning with optional mask support

Syntax: const result = await ImgProc.RegionExtract_RasterScanning(SourceImage, LabelIDMap, RegionColorTable, BkColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap)
LabelIDMap (Integer(,))
RegionColorTable (Byte(,))
BkColor (Integer, Optional)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

let result;
result = ImgProc.RegionExtract_RasterScanning(SourceImage, LabelIDMap, RegionColorTable, BkColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

ImgProc.RegionExtract_Update_LabelIDMap_To_Image(SourceImage, LabelIDMap, RegionColorTable, IsOverlap, BkColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Converts label ID map values to corresponding image colors

Syntax: const result = await ImgProc.RegionExtract_Update_LabelIDMap_To_Image(SourceImage, LabelIDMap, RegionColorTable, IsOverlap, BkColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap)
LabelIDMap (Integer(,))
RegionColorTable (Byte(,))
IsOverlap (Boolean, Optional)
BkColor (Integer, Optional)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

let result;
result = ImgProc.RegionExtract_Update_LabelIDMap_To_Image(SourceImage, LabelIDMap, RegionColorTable, IsOverlap, BkColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

ImgProc.RegionExtract_Crop_LabelIDMap_To_2DByte(LabelIDMap, IDInfoIndex, X1, X2, Y1, Y2)

Description: Extracts and converts specified regions from label map to byte array

Syntax: await ImgProc.RegionExtract_Crop_LabelIDMap_To_2DByte(LabelIDMap, IDInfoIndex, X1, X2, Y1, Y2);

Parameter Description
LabelIDMap (Integer(,))
IDInfoIndex (Integer)
X1 (Integer)
X2 (Integer)
Y1 (Integer)
Y2 (Integer) As Byte()

Return Value: None

Example:

await ImgProc.RegionExtract_Crop_LabelIDMap_To_2DByte(LabelIDMap, IDInfoIndex, X1, X2, Y1, Y2);

ImgProc.RegionExtract_Update_LabelIDMap_ByIncluding(LabelIDMap, IDArray)

Description: Updates label ID map to include only specified region IDs

Syntax: await ImgProc.RegionExtract_Update_LabelIDMap_ByIncluding(LabelIDMap, IDArray);

Parameter Description
LabelIDMap (Integer(,))
IDArray (Dictionary(Of Integer, Boolean)) As Integer()

Return Value: None

Example:

await ImgProc.RegionExtract_Update_LabelIDMap_ByIncluding(LabelIDMap, IDArray);

ImgProc.RegionExtract_Convert_LabelIDMap_To_Image(LabelIDMap, ObjectRed, ObjectGreen, ObjectBlue)

Description: Converts label ID map to colored image representation

Syntax: const result = await ImgProc.RegionExtract_Convert_LabelIDMap_To_Image(LabelIDMap, ObjectRed, ObjectGreen, ObjectBlue);

Parameter Description
LabelIDMap (Integer(,))
ObjectRed (Byte, Optional)
ObjectGreen (Byte, Optional)
ObjectBlue (Byte, Optional)

Return Value: Bitmap

Example:

let result;
result = ImgProc.RegionExtract_Convert_LabelIDMap_To_Image(LabelIDMap, ObjectRed, ObjectGreen, ObjectBlue);

ImgProc.RegionExtract_Create_OutlinedOriginalImage(SourceImage, LabelIDMap, ObjectRed, ObjectGreen, ObjectBlue)

Description: Creates image with region outlines overlaid on original

Syntax: const result = await ImgProc.RegionExtract_Create_OutlinedOriginalImage(SourceImage, LabelIDMap, ObjectRed, ObjectGreen, ObjectBlue);

Parameter Description
SourceImage (Bitmap)
LabelIDMap (Integer(,))
ObjectRed (Byte, Optional)
ObjectGreen (Byte, Optional)
ObjectBlue (Byte, Optional)

Return Value: Bitmap

Example:

let result;
result = ImgProc.RegionExtract_Create_OutlinedOriginalImage(SourceImage, LabelIDMap, ObjectRed, ObjectGreen, ObjectBlue);

ImgProc.RegionExtract_Create_WhiteObjectOutlineImage(SourceLabelIDMap(,), SourceIDINfoIndex, x1, x2, y1, y2, DilateBoxSize)

Description: Creates white outlined image from label map with dilation

Syntax: const result = await ImgProc.RegionExtract_Create_WhiteObjectOutlineImage(SourceLabelIDMap(,), SourceIDINfoIndex, x1, x2, y1, y2, DilateBoxSize);

Parameter Description
SourceLabelIDMap(,) (Object)
SourceIDINfoIndex (Integer)
x1 (Integer)
x2 (Integer)
y1 (Integer)
y2 (Integer)
DilateBoxSize (Integer)

Return Value: Bitmap

Example:

let result;
result = ImgProc.RegionExtract_Create_WhiteObjectOutlineImage(SourceLabelIDMap(,), SourceIDINfoIndex, x1, x2, y1, y2, DilateBoxSize);

ImgProc.RegionExtract_Crop_WhiteObjectImage(SourceLabelIDMap(,), SourceIDINfoIndex, x1, x2, y1, y2)

Description: Crops white object region from label ID map

Syntax: const result = await ImgProc.RegionExtract_Crop_WhiteObjectImage(SourceLabelIDMap(,), SourceIDINfoIndex, x1, x2, y1, y2);

Parameter Description
SourceLabelIDMap(,) (Object)
SourceIDINfoIndex (Integer)
x1 (Integer)
x2 (Integer)
y1 (Integer)
y2 (Integer)

Return Value: Bitmap

Example:

let result;
result = ImgProc.RegionExtract_Crop_WhiteObjectImage(SourceLabelIDMap(,), SourceIDINfoIndex, x1, x2, y1, y2);

ImgProc.RegionExtract_Create_GreenObjectOutlineImage(SourceLabelIDMap(,), SourceIDINfoIndex, x1, x2, y1, y2, DilateBoxSize)

Description: Creates green outlined image from label map with dilation

Syntax: const result = await ImgProc.RegionExtract_Create_GreenObjectOutlineImage(SourceLabelIDMap(,), SourceIDINfoIndex, x1, x2, y1, y2, DilateBoxSize);

Parameter Description
SourceLabelIDMap(,) (Object)
SourceIDINfoIndex (Integer)
x1 (Integer)
x2 (Integer)
y1 (Integer)
y2 (Integer)
DilateBoxSize (Integer)

Return Value: Bitmap

Example:

let result;
result = ImgProc.RegionExtract_Create_GreenObjectOutlineImage(SourceLabelIDMap(,), SourceIDINfoIndex, x1, x2, y1, y2, DilateBoxSize);

ImgProc.CompareBitmapImages(b1, b2)

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

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

Parameter Description
b1 (Bitmap)
b2 (Bitmap)

Return Value: Boolean

Example:

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

ImgProc.Convert_Gray24Bit_To_8bppIndexed(srcBitmap)

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

Syntax: const result = await ImgProc.Convert_Gray24Bit_To_8bppIndexed(srcBitmap);

Parameter Description
srcBitmap (Bitmap)

Return Value: Bitmap

Example:

let result;
result = ImgProc.Convert_Gray24Bit_To_8bppIndexed(srcBitmap);

ImgProc.Resize_Canvas(SourceImage, nWidth, nHeight, StretchDirection, BackColor)

Description: Resizes canvas and centers/stretches image

Syntax: const result = await ImgProc.Resize_Canvas(SourceImage, nWidth, nHeight, StretchDirection, BackColor);

Parameter Description
SourceImage (Bitmap)
nWidth (Integer)
nHeight (Integer)
StretchDirection (String)
BackColor (Color)

Return Value: Bitmap

Example:

let result;
result = ImgProc.Resize_Canvas(SourceImage, nWidth, nHeight, StretchDirection, BackColor);

ImgProc.AddMargin(SourceImage, LeftMargin, RightMargin, TopMargin, BottomMargin)

Description: Adds margins to image edges

Syntax: const result = await ImgProc.AddMargin(SourceImage, LeftMargin, RightMargin, TopMargin, BottomMargin);

Parameter Description
SourceImage (Bitmap)
LeftMargin (Integer)
RightMargin (Integer)
TopMargin (Integer)
BottomMargin (Integer)

Return Value: Bitmap

Example:

let result;
result = ImgProc.AddMargin(SourceImage, LeftMargin, RightMargin, TopMargin, BottomMargin);

ImgProc.RGBToGray_ByRealCalc(r, g, b)

Description: Converts RGB to grayscale using precise calculation

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

Parameter Description
r (Integer)
g (Integer)
b (Integer)

Return Value: Integer

Example:

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

ImgProc.RGBToGray(r, g, b)

Description: Converts RGB to grayscale byte value

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

Parameter Description
r (Integer)
g (Integer)
b (Integer)

Return Value: Byte

Example:

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

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

Description: Applies color map to grayscale image

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

Parameter Description
SourceImage (Bitmap)
MapType (ImgProcessing.ColorMapType)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

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

ImgProc.DrawSelectionBorder(SourceImage, cR, cG, cB, BorderThickness, Opacity)

Description: Draws selection border with RGB values

Syntax: const result = await ImgProc.DrawSelectionBorder(SourceImage, cR, cG, cB, BorderThickness, Opacity);

Parameter Description
SourceImage (Bitmap)
cR (Byte)
cG (Byte)
cB (Byte)
BorderThickness (Integer)
Opacity (Byte)

Return Value: Bitmap

Example:

let result;
result = ImgProc.DrawSelectionBorder(SourceImage, cR, cG, cB, BorderThickness, Opacity);

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

Description: Converts hexadecimal color string to RGB values

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

Parameter Description
HexColorStr (String)
R (Byte)
G (Byte)
B (Byte)

Return Value: None

Example:

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

ImgProc.BoxAveraging_ByEveryAddition(SourceImage, BoxSizeHalf, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Box averaging using iterative addition method

Syntax: const result = await ImgProc.BoxAveraging_ByEveryAddition(SourceImage, BoxSizeHalf, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap)
BoxSizeHalf (Integer)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

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

ImgProc.BoxAveraging_ByIntegralMap(SourceImage, BoxSizeHalf, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Box averaging using integral image for fast processing

Syntax: const result = await ImgProc.BoxAveraging_ByIntegralMap(SourceImage, BoxSizeHalf, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap)
BoxSizeHalf (Integer)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

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

ImgProc.StandardFilter(SourceImage, FilterMask(,), WeightFactor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Applies custom convolution filter mask

Syntax: const result = await ImgProc.StandardFilter(SourceImage, FilterMask(,), WeightFactor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap)
FilterMask(,) (Object)
WeightFactor (Integer, Optional)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

let result;
result = ImgProc.StandardFilter(SourceImage, FilterMask(,), WeightFactor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

ImgProc.EdgeDetect_by_ExplicitComp(SourceImage, IsOverlay, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Detects edges using explicit comparison method

Syntax: const result = await ImgProc.EdgeDetect_by_ExplicitComp(SourceImage, IsOverlay, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap)
IsOverlay (Boolean)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

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

ImgProc.Get_PixelLocationArray_Bk(SourceGrayImage, DestPixelGray, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Gets pixel locations matching specified grayscale value

Syntax: await ImgProc.Get_PixelLocationArray_Bk(SourceGrayImage, DestPixelGray, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceGrayImage (Bitmap)
DestPixelGray (Byte)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: None

Example:

await ImgProc.Get_PixelLocationArray_Bk(SourceGrayImage, DestPixelGray, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

ImgProc.Get_PixelLocationArray(SourceGrayImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Gets all white pixel locations in grayscale image

Syntax: await ImgProc.Get_PixelLocationArray(SourceGrayImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceGrayImage (Bitmap)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: None

Example:

await ImgProc.Get_PixelLocationArray(SourceGrayImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

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

Description: Detects edges using left-hand rule method

Syntax: const result = await ImgProc.EdgeDetect_by_LeftHand(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

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

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

Description: Detects edges using upper-left hand kernel

Syntax: const result = await ImgProc.EdgeDetect_by_UpperLeftHand(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

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

ImgProc.Stop_Processing()

Description: Stops the current image processing operation

Syntax: await ImgProc.Stop_Processing();

Return Value: None

Example:

await ImgProc.Stop_Processing();

ImgProc.Maximum(rR, rG, rB)

Description: Returns maximum value among three color components

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

Parameter Description
rR (Single)
rG (Single)
rB (Single)

Return Value: Single

Example:

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

ImgProc.Minimum(rR, rG, rB)

Description: Returns minimum value among three color components

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

Parameter Description
rR (Single)
rG (Single)
rB (Single)

Return Value: Single

Example:

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

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

Description: Converts RGB to CIELab using parallel method

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

Parameter Description
r (Byte)
g (Byte)
b (Byte)
Out_L (Byte)
Out_a (Byte)
Out_b (Byte)

Return Value: None

Example:

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

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

Description: Converts RGB to HSI using parallel method

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

Parameter Description
r (Integer)
g (Integer)
b (Integer)
Hue (Single)
Saturation (Single)
Intensity (Single)

Return Value: None

Example:

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

ImgProc.Digitalize(ColorChannelValue, LevelCount)

Description: Quantizes color channel value to discrete levels

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

Parameter Description
ColorChannelValue (Single)
LevelCount (Integer)

Return Value: Byte

Example:

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

ImgProc.Draw_ColorLevelBox(ColorMode, Pic_Target, LevelCount)

Description: Draws color level distribution box in picture control

Syntax: await ImgProc.Draw_ColorLevelBox(ColorMode, Pic_Target, LevelCount);

Parameter Description
ColorMode (Integer)
Pic_Target (PictureBox)
LevelCount (Integer)

Return Value: None

Example:

await ImgProc.Draw_ColorLevelBox(ColorMode, Pic_Target, LevelCount);

ImgProc.Generate_BlankImage(Pic_Target, BackColor)

Description: Generates blank image in picture control

Syntax: await ImgProc.Generate_BlankImage(Pic_Target, BackColor);

Parameter Description
Pic_Target (PictureBox)
BackColor (Color)

Return Value: None

Example:

await ImgProc.Generate_BlankImage(Pic_Target, BackColor);

ImgProc.Create_BlankImage(SourceImage, BackColor)

Description: Creates blank image with specified background color

Syntax: const result = await ImgProc.Create_BlankImage(SourceImage, BackColor);

Parameter Description
SourceImage (Bitmap)
BackColor (Color)

Return Value: Bitmap

Example:

let result;
result = ImgProc.Create_BlankImage(SourceImage, BackColor);

ImgProc.Draw_LineProfile(ProfileData, Pic_Target, ProfileColor, IsCenterLined)

Description: Draws line profile within picture control

Syntax: const result = await ImgProc.Draw_LineProfile(ProfileData, Pic_Target, ProfileColor, IsCenterLined);

Parameter Description
ProfileData (Single())
Pic_Target (PictureBox)
ProfileColor (Color)
IsCenterLined (Boolean, Optional)

Return Value: Bitmap

Example:

let result;
result = ImgProc.Draw_LineProfile(ProfileData, Pic_Target, ProfileColor, IsCenterLined);

ImgProc.Draw_Histogram(ProfileData, TotPixelCount, Pic_Target, ProfileColor)

Description: Draws histogram within picture control

Syntax: const result = await ImgProc.Draw_Histogram(ProfileData, TotPixelCount, Pic_Target, ProfileColor);

Parameter Description
ProfileData (Single())
TotPixelCount (Integer)
Pic_Target (PictureBox)
ProfileColor (Color)

Return Value: Bitmap

Example:

let result;
result = ImgProc.Draw_Histogram(ProfileData, TotPixelCount, Pic_Target, ProfileColor);

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

Description: Decomposes color to ARGB and HSI components

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

Parameter Description
ColorValue (Integer)
RedValue (Byte)
GreenValue (Byte)
BlueValue (Byte)
GrayValue (Byte)
HueValue (Single)
SaturationValue (Single)
IntensityValue (Single)

Return Value: None

Example:

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

ImgProc.Get_PixelColor_From1PixelInScreen(TargetX, TargetY)

Description: Gets pixel color from screen at specified coordinates

Syntax: const result = await ImgProc.Get_PixelColor_From1PixelInScreen(TargetX, TargetY);

Parameter Description
TargetX (Integer)
TargetY (Integer)

Return Value: Integer

Example:

let result;
result = ImgProc.Get_PixelColor_From1PixelInScreen(TargetX, TargetY);

ImgProc.Get_PixelColor(SourceBitmap, TargetX, TargetY)

Description: Gets pixel color from bitmap at specified coordinates

Syntax: const result = await ImgProc.Get_PixelColor(SourceBitmap, TargetX, TargetY);

Parameter Description
SourceBitmap (Bitmap)
TargetX (Integer)
TargetY (Integer)

Return Value: Integer

Example:

let result;
result = ImgProc.Get_PixelColor(SourceBitmap, TargetX, TargetY);

ImgProc.Get_PixelColor_FromScreen(TargetX, TargetY)

Description: Gets pixel color from screen

Syntax: const result = await ImgProc.Get_PixelColor_FromScreen(TargetX, TargetY);

Parameter Description
TargetX (Integer)
TargetY (Integer)

Return Value: Integer

Example:

let result;
result = ImgProc.Get_PixelColor_FromScreen(TargetX, TargetY);

ImgProc.Get_MotionDetectHits(SourceImage1, SourceImage2, StepSize, Tolerance)

Description: Detects motion between two images

Syntax: const result = await ImgProc.Get_MotionDetectHits(SourceImage1, SourceImage2, StepSize, Tolerance);

Parameter Description
SourceImage1 (Bitmap)
SourceImage2 (Bitmap)
StepSize (Single)
Tolerance (Single)

Return Value: Single

Example:

let result;
result = ImgProc.Get_MotionDetectHits(SourceImage1, SourceImage2, StepSize, Tolerance);

ImgProc.Draw_Text_Outlined(Pic_Target, x, y, TextString, TextFont, InnerColor, OuterColor)

Description: Draws text with outline in picture control

Syntax: const result = await ImgProc.Draw_Text_Outlined(Pic_Target, x, y, TextString, TextFont, InnerColor, OuterColor);

Parameter Description
Pic_Target (PictureBox)
x (Integer)
y (Integer)
TextString (String)
TextFont (Font)
InnerColor (Color)
OuterColor (Color)

Return Value: Bitmap

Example:

let result;
result = ImgProc.Draw_Text_Outlined(Pic_Target, x, y, TextString, TextFont, InnerColor, OuterColor);

ImgProc.Draw_Text_Outlined_Image(SourceImage, x, y, TextString, TextFont, InnerColor, OuterColor)

Description: Draws outlined text on image

Syntax: const result = await ImgProc.Draw_Text_Outlined_Image(SourceImage, x, y, TextString, TextFont, InnerColor, OuterColor);

Parameter Description
SourceImage (Bitmap)
x (Integer)
y (Integer)
TextString (String)
TextFont (Font)
InnerColor (Color)
OuterColor (Color)

Return Value: Bitmap

Example:

let result;
result = ImgProc.Draw_Text_Outlined_Image(SourceImage, x, y, TextString, TextFont, InnerColor, OuterColor);

ImgProc.Draw_Text_Outlined_Graphics(SourceGraphics, x, y, TextString, TextFont, InnerColor, OuterColor)

Description: Draws outlined text on graphics object

Syntax: await ImgProc.Draw_Text_Outlined_Graphics(SourceGraphics, x, y, TextString, TextFont, InnerColor, OuterColor);

Parameter Description
SourceGraphics (Graphics)
x (Integer)
y (Integer)
TextString (String)
TextFont (Font)
InnerColor (Color)
OuterColor (Color)

Return Value: None

Example:

await ImgProc.Draw_Text_Outlined_Graphics(SourceGraphics, x, y, TextString, TextFont, InnerColor, OuterColor);

ImgProc.Get_MinValue(Value1, Value2, Value3, Value4, Value5)

Description: Returns minimum value among five values

Syntax: const result = await ImgProc.Get_MinValue(Value1, Value2, Value3, Value4, Value5);

Parameter Description
Value1 (Single)
Value2 (Single)
Value3 (Single)
Value4 (Single)
Value5 (Single)

Return Value: Single

Example:

let result;
result = ImgProc.Get_MinValue(Value1, Value2, Value3, Value4, Value5);

ImgProc.Get_MaxValue(Value1, Value2, Value3, Value4, Value5)

Description: Returns maximum value among five values

Syntax: const result = await ImgProc.Get_MaxValue(Value1, Value2, Value3, Value4, Value5);

Parameter Description
Value1 (Single)
Value2 (Single)
Value3 (Single)
Value4 (Single)
Value5 (Single)

Return Value: Single

Example:

let result;
result = ImgProc.Get_MaxValue(Value1, Value2, Value3, Value4, Value5);

ImgProc.Quantify_ColorPixel(SourceImage, Return_ColorTable(,), TotalPixelCount, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Counts and classifies all color pixels

Syntax: const result = await ImgProc.Quantify_ColorPixel(SourceImage, Return_ColorTable(,), TotalPixelCount, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap)
Return_ColorTable(,) (Object)
TotalPixelCount (Integer)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Integer

Example:

let result;
result = ImgProc.Quantify_ColorPixel(SourceImage, Return_ColorTable(,), TotalPixelCount, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

ImgProc.Count_NumberOfGrayPixel_OfInterest(SourceGrayImage, GrayColorOfInterest, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Counts grayscale pixels of specific value

Syntax: const result = await ImgProc.Count_NumberOfGrayPixel_OfInterest(SourceGrayImage, GrayColorOfInterest, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceGrayImage (Bitmap)
GrayColorOfInterest (Integer)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Integer

Example:

let result;
result = ImgProc.Count_NumberOfGrayPixel_OfInterest(SourceGrayImage, GrayColorOfInterest, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

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

Description: Calculates average grayscale value

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

Parameter Description
SourceImage (Bitmap)
TotalPixelsCount (Long)
AnalysisInterval (Integer)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Single

Example:

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

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

Description: Calculates average red channel value

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

Parameter Description
SourceImage (Bitmap)
TotalPixelsCount (Long)
AnalysisInterval (Integer)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Single

Example:

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

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

Description: Calculates average green channel value

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

Parameter Description
SourceImage (Bitmap)
TotalPixelsCount (Long)
AnalysisInterval (Integer)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Single

Example:

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

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

Description: Calculates average blue channel value

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

Parameter Description
SourceImage (Bitmap)
TotalPixelsCount (Long)
AnalysisInterval (Integer)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Single

Example:

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

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

Description: Calculates average hue value

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

Parameter Description
SourceImage (Bitmap)
TotalPixelsCount (Long)
AnalysisInterval (Integer)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Single

Example:

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

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

Description: Calculates average saturation value

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

Parameter Description
SourceImage (Bitmap)
TotalPixelsCount (Long)
AnalysisInterval (Integer)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Single

Example:

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

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

Description: Calculates average intensity value

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

Parameter Description
SourceImage (Bitmap)
TotalPixelsCount (Long)
AnalysisInterval (Integer)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Single

Example:

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

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

Description: Calculates average cyan channel value

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

Parameter Description
SourceImage (Bitmap)
TotalPixelsCount (Long)
AnalysisInterval (Integer)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Single

Example:

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

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

Description: Calculates average magenta channel value

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

Parameter Description
SourceImage (Bitmap)
TotalPixelsCount (Long)
AnalysisInterval (Integer)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Single

Example:

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

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

Description: Calculates average yellow channel value

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

Parameter Description
SourceImage (Bitmap)
TotalPixelsCount (Long)
AnalysisInterval (Integer)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Single

Example:

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

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

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

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

Parameter Description
SourceImage (Bitmap)
TotalPixelsCount (Long)
AnalysisInterval (Integer)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Single

Example:

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

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

Description: Calculates average L (lightness) value in CIELab

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

Parameter Description
SourceImage (Bitmap)
TotalPixelsCount (Long)
AnalysisInterval (Integer)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Single

Example:

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

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

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

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

Parameter Description
SourceImage (Bitmap)
TotalPixelsCount (Long)
AnalysisInterval (Integer)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Single

Example:

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

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

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

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

Parameter Description
SourceImage (Bitmap)
TotalPixelsCount (Long)
AnalysisInterval (Integer)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Single

Example:

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

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

Description: Calculates average red chromaticity value

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

Parameter Description
SourceImage (Bitmap)
TotalPixelsCount (Long)
AnalysisInterval (Integer)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Single

Example:

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

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

Description: Calculates average green chromaticity value

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

Parameter Description
SourceImage (Bitmap)
TotalPixelsCount (Long)
AnalysisInterval (Integer)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Single

Example:

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

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

Description: Calculates average blue chromaticity value

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

Parameter Description
SourceImage (Bitmap)
TotalPixelsCount (Long)
AnalysisInterval (Integer)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Single

Example:

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

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

Description: Calculates average using predefined color formula

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

Parameter Description
SourceImage (Bitmap)
TotalPixelsCount (Long)
AnalysisInterval (Integer)
FormulaMethod (Integer)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Single

Example:

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

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

Description: Calculates multiple color channel averages simultaneously

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

Parameter Description
SourceImage (Bitmap)
ShapeMode (Integer)
X1 (Integer)
Y1 (Integer)
X2 (Integer)
Y2 (Integer)
ReturnRed (Byte)
ReturnGreen (Byte)
ReturnBlue (Byte)
ReturnGray (Byte)
ReturnHue (Single)
ReturnSat (Single)
ReturnIntensity (Single)
ReturnCyan (Single)
ReturnMagenta (Single)
ReturnYellow (Single)
ReturnK (Single)
ReturnLab_L (Single)
ReturnLab_a (Single)
ReturnLab_b (Single)
ReturnRG_Red (Single)
ReturnRG_Green (Single)
ReturnRG_Blue (Single)

Return Value: None

Example:

await 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);

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

Description: Gets individual pixel color values in multiple color spaces

Syntax: await ImgProc.Get_PixelColorValues(SourceImage, X1, Y1, ReturnRed, ReturnGreen, ReturnBlue, ReturnGray, ReturnHue, ReturnSat, ReturnIntensity, ReturnCyan, ReturnMagenta, ReturnYellow, ReturnK, ReturnLab_L, ReturnLab_a, ReturnLab_b, ReturnRG_Red, ReturnRG_Green, ReturnRG_Blue);

Parameter Description
SourceImage (Bitmap)
X1 (Integer)
Y1 (Integer)
ReturnRed (Byte)
ReturnGreen (Byte)
ReturnBlue (Byte)
ReturnGray (Byte)
ReturnHue (Single)
ReturnSat (Single)
ReturnIntensity (Single)
ReturnCyan (Single)
ReturnMagenta (Single)
ReturnYellow (Single)
ReturnK (Single)
ReturnLab_L (Single)
ReturnLab_a (Single)
ReturnLab_b (Single)
ReturnRG_Red (Single)
ReturnRG_Green (Single)
ReturnRG_Blue (Single)

Return Value: None

Example:

await 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);

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

Description: Calculates total pixel count in selected region

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

Parameter Description
SourceImage (Bitmap)
SelectShape (Integer)
X1 (Integer)
Y1 (Integer)
X2 (Integer)
Y2 (Integer)
ColorBW (Integer)

Return Value: Long

Example:

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

ImgProc.ColorHexToColorInteger(ColorHex)

Description: Converts hexadecimal color string to integer

Syntax: const result = await ImgProc.ColorHexToColorInteger(ColorHex);

Parameter Description
ColorHex (String)

Return Value: Integer

Example:

let result;
result = ImgProc.ColorHexToColorInteger(ColorHex);

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

Description: Converts hexadecimal color string to RGB components

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

Parameter Description
HexColorStr (String)
R (Byte)
G (Byte)
B (Byte)

Return Value: None

Example:

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

ImgProc.RGBToColorHex(RedValue, GreenValue, BlueValue)

Description: Converts RGB values to hexadecimal color string

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

Parameter Description
RedValue (Integer)
GreenValue (Integer)
BlueValue (Integer)

Return Value: String

Example:

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

ImgProc.BrightContrast(SourceImage, BrightLevel, ContrastLevel, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Adjusts brightness and contrast of image

Syntax: const result = await ImgProc.BrightContrast(SourceImage, BrightLevel, ContrastLevel, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap)
BrightLevel (Integer)
ContrastLevel (Integer)
IsShowProgress (Boolean, Optional)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

let result;
result = ImgProc.BrightContrast(SourceImage, BrightLevel, ContrastLevel, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

ImgProc.Image_FromFile(FileName)

Description: Loads image from file path

Syntax: const result = await ImgProc.Image_FromFile(FileName);

Parameter Description
FileName (String)

Return Value: Bitmap

Example:

let result;
result = ImgProc.Image_FromFile(FileName);

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

Description: Calculates local grayscale average from integral map

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

Parameter Description
IntegralGrayImageMap(,) (Object)
LocalBoxSize (Integer)
CenterX (Integer)
CenterY (Integer)

Return Value: Byte

Example:

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

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

Description: Gets 2D color RGB map from image

Syntax: const result = await ImgProc.Get_ColorRGB2DMap(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Object

Example:

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

ImgProc.Check_If_CloseShape(Src_BitMap(,), FalseTolerance)

Description: Checks if shape is closed (no gaps)

Syntax: const result = await ImgProc.Check_If_CloseShape(Src_BitMap(,), FalseTolerance);

Parameter Description
Src_BitMap(,) (Object)
FalseTolerance (Integer, Optional)

Return Value: Boolean

Example:

let result;
result = ImgProc.Check_If_CloseShape(Src_BitMap(,), FalseTolerance);

ImgProc.Find_OptimalThreshold_For_BWLeveling_Using_FloodFillWithTolerance(SourceGrayImage, Return_BWGrayImage)

Description: Finds optimal threshold for black-white leveling using flood fill

Syntax: const result = await ImgProc.Find_OptimalThreshold_For_BWLeveling_Using_FloodFillWithTolerance(SourceGrayImage, Return_BWGrayImage);

Parameter Description
SourceGrayImage (Bitmap)
Return_BWGrayImage (Bitmap)

Return Value: Integer

Example:

let result;
result = ImgProc.Find_OptimalThreshold_For_BWLeveling_Using_FloodFillWithTolerance(SourceGrayImage, Return_BWGrayImage);

ImgProc.BWLeveling_Using_FloodFillWithTolerance(SourceGrayImage, IsConductBlurring, IsFindThresholdValue, DefaultThresholdValue, Return_OptimalThresholdValue)

Description: Applies black-white leveling with optional auto thresholding

Syntax: const result = await ImgProc.BWLeveling_Using_FloodFillWithTolerance(SourceGrayImage, IsConductBlurring, IsFindThresholdValue, DefaultThresholdValue, Return_OptimalThresholdValue);

Parameter Description
SourceGrayImage (Bitmap)
IsConductBlurring (Boolean)
IsFindThresholdValue (Boolean)
DefaultThresholdValue (Integer)
Return_OptimalThresholdValue (Integer)

Return Value: Bitmap

Example:

let result;
result = ImgProc.BWLeveling_Using_FloodFillWithTolerance(SourceGrayImage, IsConductBlurring, IsFindThresholdValue, DefaultThresholdValue, Return_OptimalThresholdValue);

ImgProc.BWLeveling_Using_FloodFillWithTolerance_Core(SourceGrayImage, ExcludeGrayRange_Min, ExcludeGrayRange_Max)

Description: Applies black-white leveling excluding specified gray range

Syntax: const result = await ImgProc.BWLeveling_Using_FloodFillWithTolerance_Core(SourceGrayImage, ExcludeGrayRange_Min, ExcludeGrayRange_Max);

Parameter Description
SourceGrayImage (Bitmap)
ExcludeGrayRange_Min (Integer)
ExcludeGrayRange_Max (Integer)

Return Value: Bitmap

Example:

let result;
result = ImgProc.BWLeveling_Using_FloodFillWithTolerance_Core(SourceGrayImage, ExcludeGrayRange_Min, ExcludeGrayRange_Max);

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

Description: Removes red channel from image

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

Parameter Description
SourceImage (Bitmap)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

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

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

Description: Removes green channel from image

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

Parameter Description
SourceImage (Bitmap)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

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

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

Description: Removes blue channel from image

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

Parameter Description
SourceImage (Bitmap)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

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

ImgProc.CaptureDesktopScreen_Old(ReturnedImage, PrintCursor)

Description: Captures desktop screen to bitmap (legacy method)

Syntax: await ImgProc.CaptureDesktopScreen_Old(ReturnedImage, PrintCursor);

Parameter Description
ReturnedImage (Bitmap)
PrintCursor (Boolean, Optional)

Return Value: None

Example:

await ImgProc.CaptureDesktopScreen_Old(ReturnedImage, PrintCursor);

ImgProc.Get_CursorPosition(x, y)

Description: Gets current cursor position on screen

Syntax: await ImgProc.Get_CursorPosition(x, y);

Parameter Description
x (Integer)
y (Integer)

Return Value: None

Example:

await ImgProc.Get_CursorPosition(x, y);

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

Description: Creates deep copy of image region

Syntax: const result = await ImgProc.DeepCopy(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

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

ImgProc.Get_ActualFormRect(SrcForm)

Description: Gets actual rectangle bounds of form

Syntax: const result = await ImgProc.Get_ActualFormRect(SrcForm);

Parameter Description
SrcForm (Form)

Return Value: Rectangle

Example:

let result;
result = ImgProc.Get_ActualFormRect(SrcForm);

ImgProc.GetControlBitmap(CTL)

Description: Gets bitmap snapshot of UI control

Syntax: const result = await ImgProc.GetControlBitmap(CTL);

Parameter Description
CTL (Control)

Return Value: Bitmap

Example:

let result;
result = ImgProc.GetControlBitmap(CTL);

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

Description: Changes specified color to new color throughout image

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

Parameter Description
SourceImage (Bitmap)
ColorOfInterest_RGBInt (Integer)
ChangeToR (Byte)
ChangeToG (Byte)
ChangeToB (Byte)
IsShowProgress (Boolean, Optional)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

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

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

Description: Changes specified RGB color to new RGB color

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

Parameter Description
SourceImage (Bitmap)
ColorOfInterestR (Byte)
ColorOfInterestG (Byte)
ColorOfInterestB (Byte)
ChangeToR (Byte)
ChangeToG (Byte)
ChangeToB (Byte)
IsShowProgress (Boolean, Optional)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

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

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

Description: Removes/hides outlines of specified color from image

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

Parameter Description
SourceImage (Bitmap)
TargetColor_R (Byte)
TargetColor_G (Byte)
TargetColor_B (Byte)
IsMostFrequentColor (Boolean, Optional)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

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

ImgProc.Get_Avgerage_Color_3x3Box_ExceptOneColor(TargetX, TargetY, TargetColor_R, TargetColor_G, TargetColor_B, ColorChannelNum)

Description: Gets average color from 3×3 box excluding target color

Syntax: const result = await ImgProc.Get_Avgerage_Color_3x3Box_ExceptOneColor(TargetX, TargetY, TargetColor_R, TargetColor_G, TargetColor_B, ColorChannelNum);

Parameter Description
TargetX (Integer)
TargetY (Integer)
TargetColor_R (Byte)
TargetColor_G (Byte)
TargetColor_B (Byte)
ColorChannelNum (Integer)

Return Value: Byte

Example:

let result;
result = ImgProc.Get_Avgerage_Color_3x3Box_ExceptOneColor(TargetX, TargetY, TargetColor_R, TargetColor_G, TargetColor_B, ColorChannelNum);

ImgProc.Overlay_Mask3DByte_To_Image(SourceImage, SourceMaskImage3DByte, TransparentColor, Opacity, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Overlays 3D byte mask to image with transparency

Syntax: const result = await ImgProc.Overlay_Mask3DByte_To_Image(SourceImage, SourceMaskImage3DByte, TransparentColor, Opacity, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap)
SourceMaskImage3DByte (Byte(,,))
TransparentColor (Integer)
Opacity (Single)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

let result;
result = ImgProc.Overlay_Mask3DByte_To_Image(SourceImage, SourceMaskImage3DByte, TransparentColor, Opacity, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

ImgProc.Overlay_MaskImage_To_Image(SourceImage, SourceMaskImage, TransparentColor, Opacity)

Description: Overlays mask bitmap to image with transparency

Syntax: const result = await ImgProc.Overlay_MaskImage_To_Image(SourceImage, SourceMaskImage, TransparentColor, Opacity);

Parameter Description
SourceImage (Bitmap)
SourceMaskImage (Bitmap)
TransparentColor (Integer)
Opacity (Single)

Return Value: Bitmap

Example:

let result;
result = ImgProc.Overlay_MaskImage_To_Image(SourceImage, SourceMaskImage, TransparentColor, Opacity);

ImgProc.Get_ImageFormat(FileExtension)

Description: Gets image format object from file extension

Syntax: const result = await ImgProc.Get_ImageFormat(FileExtension);

Parameter Description
FileExtension (String)

Return Value: Object

Example:

let result;
result = ImgProc.Get_ImageFormat(FileExtension);

ImgProc.ARGBToARGBInteger(_AlphaValue, _RedValue, _GreenValue, _BlueValue)

Description: Converts ARGB values to integer

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

Parameter Description
_AlphaValue (Integer)
_RedValue (Integer)
_GreenValue (Integer)
_BlueValue (Integer)

Return Value: Integer

Example:

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

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

Description: Converts ARGB bytes to Color object

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

Parameter Description
AlphaInByte (Integer)
RedInByte (Integer)
GreenInByte (Integer)
BlueInByte (Integer)

Return Value: Color

Example:

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

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

Description: Splits K (black) channel in CMYK decomposition

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

Parameter Description
SourceImage (Bitmap)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

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

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

Description: Splits C (cyan) channel in CMYK decomposition

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

Parameter Description
SourceImage (Bitmap)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

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

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

Description: Splits M (magenta) channel in CMYK decomposition

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

Parameter Description
SourceImage (Bitmap)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

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

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

Description: Splits Y (yellow) channel in CMYK decomposition

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

Parameter Description
SourceImage (Bitmap)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

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

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

Description: Converts RGB to rg chromaticity with parallel processing

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

Parameter Description
SourceImage (Bitmap)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

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

ImgProc.RGBToGChromaticity(_RedValue, _GreenValue, _BlueValue)

Description: Converts RGB to green chromaticity coordinate

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

Parameter Description
_RedValue (Integer)
_GreenValue (Integer)
_BlueValue (Integer)

Return Value: None

Example:

await ImgProc.RGBToGChromaticity(_RedValue, _GreenValue, _BlueValue);

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

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

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

Parameter Description
RedValue (Integer)
GreenValue (Integer)
BlueValue (Integer)
RGChromaticity_Red (Byte)
RGChromaticity_Green (Byte)
RGChromaticity_Blue (Byte)

Return Value: None

Example:

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

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

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

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

Parameter Description
SourceImage (Bitmap)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

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

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

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

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

Parameter Description
SourceImage (Bitmap)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

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

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

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

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

Parameter Description
SourceImage (Bitmap)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

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

ImgProc.Get_GrayValues(SourceImage, x1, y1, x2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Extracts grayscale values from image line

Syntax: await ImgProc.Get_GrayValues(SourceImage, x1, y1, x2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap)
x1 (Integer)
y1 (Integer)
x2 (Integer)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: None

Example:

await ImgProc.Get_GrayValues(SourceImage, x1, y1, x2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

ImgProc.IsSameImage_QuickCheck(IsTheFirstImage, SourceImage, x1, y1, x2)

Description: Quick check if image is same as stored reference

Syntax: const result = await ImgProc.IsSameImage_QuickCheck(IsTheFirstImage, SourceImage, x1, y1, x2);

Parameter Description
IsTheFirstImage (Boolean)
SourceImage (Bitmap)
x1 (Integer)
y1 (Integer)
x2 (Integer)

Return Value: Boolean

Example:

let result;
result = ImgProc.IsSameImage_QuickCheck(IsTheFirstImage, SourceImage, x1, y1, x2);

ImgProc.IsSameImage(IsTheFirstImage, SourceImage)

Description: Checks if image is same as stored reference

Syntax: const result = await ImgProc.IsSameImage(IsTheFirstImage, SourceImage);

Parameter Description
IsTheFirstImage (Boolean)
SourceImage (Bitmap)

Return Value: Boolean

Example:

let result;
result = ImgProc.IsSameImage(IsTheFirstImage, SourceImage);

ImgProc.AreImagesIdentical(img1, img2)

Description: Checks if two images are identical

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

Parameter Description
img1 (Bitmap)
img2 (Bitmap)

Return Value: Boolean

Example:

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

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

Description: Validates image dimensions against constraints

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

Parameter Description
SourceImage (Bitmap)
MinWidth (Integer, Optional)
MinHeight (Integer, Optional)
MaxWidth (Integer, Optional)
MaxHeight (Integer, Optional)

Return Value: String

Example:

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

ImgProc.Extract_PixelLocations(SourceGrayImage, GrayColorOfInterest, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Extracts pixel coordinates of specified gray color

Syntax: await ImgProc.Extract_PixelLocations(SourceGrayImage, GrayColorOfInterest, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceGrayImage (Bitmap)
GrayColorOfInterest (Integer)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: None

Example:

await ImgProc.Extract_PixelLocations(SourceGrayImage, GrayColorOfInterest, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

ImgProc.Extract_PixelLocations_FromByte(SrcByteArray, GrayColorOfInterest, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Extracts pixel coordinates from byte array

Syntax: await ImgProc.Extract_PixelLocations_FromByte(SrcByteArray, GrayColorOfInterest, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SrcByteArray (Byte(,))
GrayColorOfInterest (Integer)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: None

Example:

await ImgProc.Extract_PixelLocations_FromByte(SrcByteArray, GrayColorOfInterest, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

ImgProc.Get_WindowHeightMargin(TargetForm)

Description: Gets window height margin value

Syntax: const result = await ImgProc.Get_WindowHeightMargin(TargetForm);

Parameter Description
TargetForm (Form)

Return Value: Integer

Example:

let result;
result = ImgProc.Get_WindowHeightMargin(TargetForm);

ImgProc.Get_WindowWidthMargin(TargetForm)

Description: Gets window width margin value

Syntax: const result = await ImgProc.Get_WindowWidthMargin(TargetForm);

Parameter Description
TargetForm (Form)

Return Value: Integer

Example:

let result;
result = ImgProc.Get_WindowWidthMargin(TargetForm);

ImgProc.Create_MaskRectangle(CanvasWidth, CanvasHeighT, MaskRect)

Description: Creates mask for single rectangle region

Syntax: const result = await ImgProc.Create_MaskRectangle(CanvasWidth, CanvasHeighT, MaskRect);

Parameter Description
CanvasWidth (Integer)
CanvasHeighT (Integer)
MaskRect (Rectangle)

Return Value: Bitmap

Example:

let result;
result = ImgProc.Create_MaskRectangle(CanvasWidth, CanvasHeighT, MaskRect);

ImgProc.Create_MaskRectangles(CanvasWidth, CanvasHeighT, MaskRects())

Description: Creates mask for multiple rectangle regions

Syntax: const result = await ImgProc.Create_MaskRectangles(CanvasWidth, CanvasHeighT, MaskRects());

Parameter Description
CanvasWidth (Integer)
CanvasHeighT (Integer)
MaskRects() (Object)

Return Value: Bitmap

Example:

let result;
result = ImgProc.Create_MaskRectangles(CanvasWidth, CanvasHeighT, MaskRects());

ImgProc.Create_MaskEllipse(CanvasWidth, CanvasHeighT, MaskRect)

Description: Creates mask for single ellipse region

Syntax: const result = await ImgProc.Create_MaskEllipse(CanvasWidth, CanvasHeighT, MaskRect);

Parameter Description
CanvasWidth (Integer)
CanvasHeighT (Integer)
MaskRect (Rectangle)

Return Value: Bitmap

Example:

let result;
result = ImgProc.Create_MaskEllipse(CanvasWidth, CanvasHeighT, MaskRect);

ImgProc.Create_MaskEllipses(CanvasWidth, CanvasHeighT, MaskRects())

Description: Creates mask for multiple ellipse regions

Syntax: const result = await ImgProc.Create_MaskEllipses(CanvasWidth, CanvasHeighT, MaskRects());

Parameter Description
CanvasWidth (Integer)
CanvasHeighT (Integer)
MaskRects() (Object)

Return Value: Bitmap

Example:

let result;
result = ImgProc.Create_MaskEllipses(CanvasWidth, CanvasHeighT, MaskRects());

ImgProc.Convert_To_24bitBitmap(SourceImage)

Description: Converts image to 24-bit RGB bitmap

Syntax: const result = await ImgProc.Convert_To_24bitBitmap(SourceImage);

Parameter Description
SourceImage (Bitmap)

Return Value: Bitmap

Example:

let result;
result = ImgProc.Convert_To_24bitBitmap(SourceImage);

ImgProc.Convert_To_24bitImage(SourceImage)

Description: Converts to 24-bit RGB image

Syntax: const result = await ImgProc.Convert_To_24bitImage(SourceImage);

Parameter Description
SourceImage (Bitmap)

Return Value: Bitmap

Example:

let result;
result = ImgProc.Convert_To_24bitImage(SourceImage);

ImgProc.Check_RGBInTextBox(Text_R, Text_G, Text_B)

Description: Validates RGB values in text boxes

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

Parameter Description
Text_R (TextBox)
Text_G (TextBox)
Text_B (TextBox)

Return Value: None

Example:

await ImgProc.Check_RGBInTextBox(Text_R, Text_G, Text_B);

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

Description: Splits rg chromaticity red channel

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

Parameter Description
SourceImage (Bitmap)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

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

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

Description: Splits rg chromaticity green channel

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

Parameter Description
SourceImage (Bitmap)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

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

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

Description: Splits rg chromaticity blue channel

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

Parameter Description
SourceImage (Bitmap)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

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

ImgProc.Overlay_MaskImage2DArray_To_Image3DArray(SourceImage2DArray(,,), MaskImage2DArray, MaskRed, MaskGreen, MaskBlue, x1, y1, TransparentColor)

Description: Overlays 2D mask array on 3D image array

Syntax: await ImgProc.Overlay_MaskImage2DArray_To_Image3DArray(SourceImage2DArray(,,), MaskImage2DArray, MaskRed, MaskGreen, MaskBlue, x1, y1, TransparentColor);

Parameter Description
SourceImage2DArray(,,) (Object)
MaskImage2DArray (Byte(,))
MaskRed (Byte)
MaskGreen (Byte)
MaskBlue (Byte)
x1 (Integer)
y1 (Integer)
TransparentColor (Byte)

Return Value: None

Example:

await ImgProc.Overlay_MaskImage2DArray_To_Image3DArray(SourceImage2DArray(,,), MaskImage2DArray, MaskRed, MaskGreen, MaskBlue, x1, y1, TransparentColor);

ImgProc.Extend_SkeletonCurve(srcGrayArray(,), maskGrayArray(,))

Description: Extends skeleton curve from gray array

Syntax: await ImgProc.Extend_SkeletonCurve(srcGrayArray(,), maskGrayArray(,));

Parameter Description
srcGrayArray(,) (Object)
maskGrayArray(,) (Object)

Return Value: None

Example:

await ImgProc.Extend_SkeletonCurve(srcGrayArray(,), maskGrayArray(,));

ImgProc.Count_ColorPixelOfInterest_FromGrayArray(ImageGrayArray(,), ColorOfInterestByte)

Description: Counts pixels of specified color in grayscale array

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

Parameter Description
ImageGrayArray(,) (Object)
ColorOfInterestByte (Byte)

Return Value: Integer

Example:

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

ImgProc.Count_ColorPixelOfInterest_FromGrayArray_Region(ImageGrayArray(,), ColorOfInterestByte, X1, Y1, X2, Y2)

Description: Counts pixels of specified color in region

Syntax: const result = await ImgProc.Count_ColorPixelOfInterest_FromGrayArray_Region(ImageGrayArray(,), ColorOfInterestByte, X1, Y1, X2, Y2);

Parameter Description
ImageGrayArray(,) (Object)
ColorOfInterestByte (Integer)
X1 (Integer)
Y1 (Integer)
X2 (Integer)
Y2 (Integer)

Return Value: Integer

Example:

let result;
result = ImgProc.Count_ColorPixelOfInterest_FromGrayArray_Region(ImageGrayArray(,), ColorOfInterestByte, X1, Y1, X2, Y2);

ImgProc.CountValidNeighborhoodPixel(srcGrayArray(,), searchPixelGrayColor, i, j)

Description: Counts valid neighborhood pixels of specified color

Syntax: const result = await ImgProc.CountValidNeighborhoodPixel(srcGrayArray(,), searchPixelGrayColor, i, j);

Parameter Description
srcGrayArray(,) (Object)
searchPixelGrayColor (Integer)
i (Integer)
j (Integer)

Return Value: Integer

Example:

let result;
result = ImgProc.CountValidNeighborhoodPixel(srcGrayArray(,), searchPixelGrayColor, i, j);

ImgProc.Search_SkeletonTail(SrcGrayShortArray(,), CenterX, CenterY, FillColorG, ToleranceG, MaxTrackingCount)

Description: Searches for skeleton tail endpoints

Syntax: await ImgProc.Search_SkeletonTail(SrcGrayShortArray(,), CenterX, CenterY, FillColorG, ToleranceG, MaxTrackingCount);

Parameter Description
SrcGrayShortArray(,) (Object)
CenterX (Integer)
CenterY (Integer)
FillColorG (Short)
ToleranceG (Integer)
MaxTrackingCount (Integer) As Point()

Return Value: None

Example:

await ImgProc.Search_SkeletonTail(SrcGrayShortArray(,), CenterX, CenterY, FillColorG, ToleranceG, MaxTrackingCount);

ImgProc.CompositeWithMask(originalImage, processedImage, maskImage, processedRegion)

Description: Composites processed image with mask on original

Syntax: const result = await ImgProc.CompositeWithMask(originalImage, processedImage, maskImage, processedRegion);

Parameter Description
originalImage (Bitmap)
processedImage (Bitmap)
maskImage (Bitmap)
processedRegion (Rectangle)

Return Value: Bitmap

Example:

let result;
result = ImgProc.CompositeWithMask(originalImage, processedImage, maskImage, processedRegion);

ImgProc.OverlayMask_Parallel(sourceImage, maskImage, overlayColor, alpha)

Description: Overlays mask with color and alpha transparency

Syntax: const result = await ImgProc.OverlayMask_Parallel(sourceImage, maskImage, overlayColor, alpha);

Parameter Description
sourceImage (Bitmap)
maskImage (Bitmap)
overlayColor (Color)
alpha (Integer)

Return Value: Bitmap

Example:

let result;
result = ImgProc.OverlayMask_Parallel(sourceImage, maskImage, overlayColor, alpha);

ImgProc.CopyToClipboardWithTransparency(img)

Description: Copies image to clipboard with transparency

Syntax: await ImgProc.CopyToClipboardWithTransparency(img);

Parameter Description
img (Bitmap)

Return Value: None

Example:

await ImgProc.CopyToClipboardWithTransparency(img);

ImgProc.AutoContrast(SourceImage, ClipPercent)

Description: Auto adjusts contrast automatically

Syntax: const result = await ImgProc.AutoContrast(SourceImage, ClipPercent);

Parameter Description
SourceImage (Bitmap)
ClipPercent (Single, Optional)

Return Value: Bitmap

Example:

let result;
result = ImgProc.AutoContrast(SourceImage, ClipPercent);

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

Description: Auto equalizes histogram

Syntax: const result = await ImgProc.AutoEqualize(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: Bitmap

Example:

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

ImgProc.SaveDepthMapToSTL_BoxFilter(SourceImage, FilePath, MaxSTLHeight, BaseThickness, SmoothingPasses, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Saves depth map as STL file using box filter

Syntax: const result = await ImgProc.SaveDepthMapToSTL_BoxFilter(SourceImage, FilePath, MaxSTLHeight, BaseThickness, SmoothingPasses, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap)
FilePath (String)
MaxSTLHeight (Single, Optional)
BaseThickness (Single, Optional)
SmoothingPasses (Integer, Optional)
MaskImage (Bitmap, Optional)
MaskRegionBoundary (Rectangle, Optional)
IsMaskAllRegionSelected (Boolean, Optional)

Return Value: String

Example:

let result;
result = ImgProc.SaveDepthMapToSTL_BoxFilter(SourceImage, FilePath, MaxSTLHeight, BaseThickness, SmoothingPasses, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

ImgProc.PasteAndFitToRectangle(BaseImage, OverlayImage, TargetRect)

Description: Pastes and fits overlay image into target rectangle

Syntax: const result = await ImgProc.PasteAndFitToRectangle(BaseImage, OverlayImage, TargetRect);

Parameter Description
BaseImage (Bitmap)
OverlayImage (Bitmap)
TargetRect (Rectangle)

Return Value: Bitmap

Example:

let result;
result = ImgProc.PasteAndFitToRectangle(BaseImage, OverlayImage, TargetRect);

Segmentation & Region Extraction

ImgProc.SuperPixelSegmentation(SourceImage, numSuperpixels, compactness, fillWithWhite, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Segments image into superpixels using parallel processing

Syntax: const result = await ImgProc.SuperPixelSegmentation(SourceImage, numSuperpixels, compactness, fillWithWhite, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source image to segment
numSuperpixels (Integer, Optional) Target number of superpixels
compactness (Single, Optional) Superpixel compactness factor
fillWithWhite (Boolean, Optional) Whether to fill region background with white
MaskImage (Bitmap, Optional) Mask bitmap for ROI
MaskRegionBoundary (Rectangle, Optional) Bounding box of ROI mask
IsMaskAllRegionSelected (Boolean, Optional) Flag indicating full canvas processing

Return Value: Bitmap

Example:

let spImg As Bitmap ;= ImgProc.SuperPixelSegmentation(srcBmp, 500, 50.0F);

ImgProc.RegionExtract_FloodFill4(SourceImage, LabelIDMap, RegionColorTable, BkColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Extracts regions using 4-connectivity flood fill algorithm

Syntax: const result = await ImgProc.RegionExtract_FloodFill4(SourceImage, LabelIDMap, RegionColorTable, BkColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
LabelIDMap (Integer(,)) ByRef output 2D array storing pixel region label IDs
RegionColorTable (Byte(,)) ByRef output 2D array storing color mapping per region
BkColor (Integer, Optional) Background color integer value
MaskImage (Bitmap, Optional) Mask bitmap
MaskRegionBoundary (Rectangle, Optional) Mask ROI boundary
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let idMap;(,) As Integer;
let colorTable;(,) As Byte;
let resBmp ;= ImgProc.RegionExtract_FloodFill4(srcBmp, idMap, colorTable);

ImgProc.RegionExtract_FloodFill8(SourceImage, LabelIDMap, RegionColorTable, BkColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Extracts regions using 8-connectivity flood fill algorithm

Syntax: const result = await ImgProc.RegionExtract_FloodFill8(SourceImage, LabelIDMap, RegionColorTable, BkColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
LabelIDMap (Integer(,)) ByRef output 2D array storing pixel region label IDs
RegionColorTable (Byte(,)) ByRef output 2D array storing color mapping per region
BkColor (Integer, Optional) Background color integer value
MaskImage (Bitmap, Optional) Mask bitmap
MaskRegionBoundary (Rectangle, Optional) Mask ROI boundary
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let idMap;(,) As Integer;
let colorTable;(,) As Byte;
let resBmp ;= ImgProc.RegionExtract_FloodFill8(srcBmp, idMap, colorTable);

ImgProc.RegionExtract_ColorFloodFill4(SourceImage, LabelIDMap, RegionColorTable, BoundaryColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Extracts color regions using 4-connectivity color flood fill

Syntax: const result = await ImgProc.RegionExtract_ColorFloodFill4(SourceImage, LabelIDMap, RegionColorTable, BoundaryColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
LabelIDMap (Integer(,)) ByRef output 2D array storing region label IDs
RegionColorTable (Byte(,)) ByRef output 2D array storing region colors
BoundaryColor (Integer, Optional) Boundary color integer value
MaskImage (Bitmap, Optional) Mask bitmap
MaskRegionBoundary (Rectangle, Optional) Mask ROI boundary
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let resBmp ;= ImgProc.RegionExtract_ColorFloodFill4(srcBmp, idMap, colorTable, 16776960);

ImgProc.RegionExtract_ColorFloodFill8(SourceImage, LabelIDMap, RegionColorTable, BoundaryColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Extracts color regions using 8-connectivity color flood fill

Syntax: const result = await ImgProc.RegionExtract_ColorFloodFill8(SourceImage, LabelIDMap, RegionColorTable, BoundaryColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
LabelIDMap (Integer(,)) ByRef output 2D array storing region label IDs
RegionColorTable (Byte(,)) ByRef output 2D array storing region colors
BoundaryColor (Integer, Optional) Boundary color integer value
MaskImage (Bitmap, Optional) Mask bitmap
MaskRegionBoundary (Rectangle, Optional) Mask ROI boundary
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let resBmp ;= ImgProc.RegionExtract_ColorFloodFill8(srcBmp, idMap, colorTable, 16776960);

Color Model & Channel Adjustments

ImgProc.ShadowsHighlights(SourceImage, ShadowAmount, HighlightAmount, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Adjusts shadows and highlights separately

Syntax: const result = await ImgProc.ShadowsHighlights(SourceImage, ShadowAmount, HighlightAmount, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap)
ShadowAmount (Single, Optional)
HighlightAmount (Single, Optional)
MaskImage (Bitmap, Optional) Optional mask image
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let res ;= ImgProc.ShadowsHighlights(srcBmp, 30.0F, 10.0F);

ImgProc.MultibandColor(original, rSat, rInt, ySat, yInt, gSat, gInt, cSat, cyanInt, bSat, bInt, mSat, mInt, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Applies multiband color processing to the image

Syntax: const result = await ImgProc.MultibandColor(original, rSat, rInt, ySat, yInt, gSat, gInt, cSat, cyanInt, bSat, bInt, mSat, mInt, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
original (Bitmap) Original bitmap image
rSat (Integer) Red saturation shift (-100 to 100)
rInt (Integer) Red intensity shift (-100 to 100)
ySat (Integer) Yellow saturation shift (-100 to 100)
yInt (Integer) Yellow intensity shift (-100 to 100)
gSat (Integer) Green saturation shift (-100 to 100)
gInt (Integer) Green intensity shift (-100 to 100)
cSat (Integer) Cyan saturation shift (-100 to 100)
cyanInt (Integer) Cyan intensity shift (-100 to 100)
bSat (Integer) Blue saturation shift (-100 to 100)
bInt (Integer) Blue intensity shift (-100 to 100)
mSat (Integer) Magenta saturation shift (-100 to 100)
mInt (Integer) Magenta intensity shift (-100 to 100)
MaskImage (Image, Optional) Optional mask image
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let res ;= ImgProc.MultibandColor(srcBmp, 10, 0, 0, 0, 20, 5, 0, 0, 0, 0, 0, 0);

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

Description: Converts image to CIELab color space with adjustable lightness

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

Parameter Description
original (Bitmap) Original input image
lShift (Integer) Lightness shift (-127 to 127)
aShift (Integer) Green-Red axis shift (-127 to 127)
bShift (Integer) Blue-Yellow axis shift (-127 to 127)
MaskImage (Image, Optional) Optional mask image
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let res ;= ImgProc.CIELab(srcBmp, 15, -10, 5);

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

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

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

Parameter Description
original (Bitmap) Original input image
hueShift (Integer) Hue angle shift (-180 to 180)
satShift (Integer) Saturation shift (-100 to 100)
intShift (Integer) Intensity shift (-100 to 100)
MaskImage (Image, Optional) Optional mask image
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let res ;= ImgProc.HueSaturationIntensity(srcBmp, 30, 20, -10);

ImgProc.ColorRangeSelection(SourceImage, ColorCode, IsFastAlgorithm, Tolerance, MaintainOrgColor, ColorSpaceName, IsShowProgressBar, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Selects pixels within specified color range

Syntax: const result = await ImgProc.ColorRangeSelection(SourceImage, ColorCode, IsFastAlgorithm, Tolerance, MaintainOrgColor, ColorSpaceName, IsShowProgressBar, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
ColorCode (Integer) Target color integer value
IsFastAlgorithm (Boolean) Flag to enable accelerated fast math calculation
Tolerance (Integer) Color distance tolerance threshold
MaintainOrgColor (Boolean) Preserve original colors for matched pixels
ColorSpaceName (String) Color space identifier ("RGB", "HSI", "LAB", etc.)
IsShowProgressBar (Boolean, Optional) Display execution progress bar
MaskImage (Bitmap, Optional) Optional mask image
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let res ;= ImgProc.ColorRangeSelection(srcBmp, 255, true, 15, true, "RGB");

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

Description: Converts colored image to grayscale

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

Parameter Description
SourceImage (Bitmap) Source color bitmap
IsShowProgress (Boolean, Optional) Flag to show progress indicator
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let grayBmp As Bitmap ;= ImgProc.GrayScaling(srcBmp);

ImgProc.Emboss(SourceImage, Angle, Distance, Strength, Bias, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Applies emboss filter to create 3D effect

Syntax: const result = await ImgProc.Emboss(SourceImage, Angle, Distance, Strength, Bias, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
Angle (Single, Optional) Light source direction angle in degrees
Distance (Integer, Optional) Shading distance offset in pixels
Strength (Single, Optional) Filter effect intensity multiplier
Bias (Integer, Optional) Gray level luminance bias offset
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let embBmp As Bitmap ;= ImgProc.Emboss(srcBmp, 45.0F, 2, 1.5F, 128);

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

Description: Applies outline filter to detect image edges

Syntax: const result = await ImgProc.Outline(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let outlineBmp As Bitmap ;= ImgProc.Outline(srcBmp);

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

Description: Changes all non-black pixels to white

Syntax: const result = await ImgProc.ChangeNonBlackToWhite(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let res ;= ImgProc.ChangeNonBlackToWhite(srcBmp);

Color Conversion & Utilities

ImgProc.ColorToColorHEX(SourceColor)

Description: Converts RGB Color to hexadecimal string representation

Syntax: const result = await ImgProc.ColorToColorHEX(SourceColor);

Parameter Description
SourceColor (Color) System.Drawing.Color object

Return Value: String

Example:

let hexVal As String ;= ImgProc.ColorToColorHEX(Color.Red);

ImgProc.ColorIntegerToRGB(PixelValue)

Description: Displays RGB values of a color integer to console

Syntax: await ImgProc.ColorIntegerToRGB(PixelValue);

Parameter Description
PixelValue (Integer) Packed RGB integer value

Return Value: None

Example:

ImgProc.ColorIntegerToRGB(16711680);

ImgProc.ColorIntegerToARGB(PixelValue)

Description: Displays ARGB values of a color integer to console

Syntax: await ImgProc.ColorIntegerToARGB(PixelValue);

Parameter Description
PixelValue (Integer) Packed ARGB integer value

Return Value: None

Example:

ImgProc.ColorIntegerToARGB(-65536);

ImgProc.RGBToARGBInteger(red, green, blue)

Description: Converts RGB values to ARGB integer format

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

Parameter Description
red (Integer) Red channel byte value (0-255)
green (Integer) Green channel byte value (0-255)
blue (Integer) Blue channel byte value (0-255)

Return Value: Integer

Example:

let colorInt As Integer ;= ImgProc.RGBToARGBInteger(255, 0, 0);

ImgProc.RGBToColor(RedInByte, GreenInByte, BlueInByte)

Description: Converts RGB byte values to Color object

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

Parameter Description
RedInByte (Integer) Red channel value
GreenInByte (Integer) Green channel value
BlueInByte (Integer) Blue channel value

Return Value: Color

Example:

let myColor As Color ;= ImgProc.RGBToColor(100, 150, 200);

Pixel & Image Format Inspection

ImgProc.IsBWPixel(red, green, blue)

Description: Checks if RGB pixel values represent black or white

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

Parameter Description
red (Byte) Red component
green (Byte) Green component
blue (Byte) Blue component

Return Value: Boolean

Example:

let isMonochrome As Boolean ;= ImgProc.IsBWPixel(255, 255, 255);

ImgProc.IsGrayImage(SourceImage)

Description: Checks if image is grayscale

Syntax: const result = await ImgProc.IsGrayImage(SourceImage);

Parameter Description
SourceImage (Bitmap) Source bitmap image

Return Value: Boolean

Example:

let isGray As Boolean ;= ImgProc.IsGrayImage(srcBmp);

ImgProc.IsBinaryImage(SourceImage)

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

Syntax: const result = await ImgProc.IsBinaryImage(SourceImage);

Parameter Description
SourceImage (Bitmap) Source bitmap image

Return Value: Boolean

Example:

let isBinary As Boolean ;= ImgProc.IsBinaryImage(srcBmp);

Halftoning & Dithering Filters

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

Description: Applies Floyd-Steinberg dithering for black and white conversion

Syntax: const result = await ImgProc.BW_Dithering_FS(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let ditherBmp As Bitmap ;= ImgProc.BW_Dithering_FS(srcBmp);

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

Description: Applies ordered dithering for black and white conversion

Syntax: const result = await ImgProc.BW_Dithering_OrderedDither(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let ordDitherBmp As Bitmap ;= ImgProc.BW_Dithering_OrderedDither(srcBmp);

Matrix & Array Memory Conversions

ImgProc.Convert_GrayByteArray_To_RGBImage(SrcByteArray(,))

Description: Converts grayscale byte array to RGB image

Syntax: const result = await ImgProc.Convert_GrayByteArray_To_RGBImage(SrcByteArray(,));

Parameter Description
SrcByteArray(,) (Object)

Return Value: Bitmap

Example:

let myBmp As Bitmap ;= ImgProc.Convert_GrayByteArray_To_RGBImage(grayByteMatrix);

ImgProc.Convert_GrayByteArray_To_RGBImage_Int(SrcByteArray(,))

Description: Converts grayscale integer array to RGB image

Syntax: const result = await ImgProc.Convert_GrayByteArray_To_RGBImage_Int(SrcByteArray(,));

Parameter Description
SrcByteArray(,) (Object)

Return Value: Bitmap

Example:

let myBmp As Bitmap ;= ImgProc.Convert_GrayByteArray_To_RGBImage_Int(grayIntMatrix);

ImgProc.Convert_RGBByteArray_To_RGBImage(SrcByteArray(,,))

Description: Converts RGB byte array to RGB image

Syntax: const result = await ImgProc.Convert_RGBByteArray_To_RGBImage(SrcByteArray(,,));

Parameter Description
SrcByteArray(,,) (Object)

Return Value: Bitmap

Example:

let myBmp As Bitmap ;= ImgProc.Convert_RGBByteArray_To_RGBImage(rgb3DMatrix);

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

Description: Extracts grayscale image pixels into byte array

Syntax: await ImgProc.Convert_GrayImage_To_GrayByteArray(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
MaskImage (Bitmap, Optional) Optional ROI mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: None

Example:

let byteMatrix;(,) As Byte = ImgProc.[...](asc_slot://start-slot-1)Convert_GrayImage_To_GrayByteArray(srcBmp);

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

Description: Extracts RGB image pixels into 3D byte array

Syntax: await ImgProc.Convert_RGBImage_To_RGBByteArray(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
MaskImage (Bitmap, Optional) Optional ROI mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: None

Example:

let rgbMatrix;(,,) As Byte = ImgProc.Convert_RGBImage_To_RGBByteArray(srcBmp);

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

Description: Converts RGB image pixels to grayscale byte array

Syntax: await ImgProc.Convert_RGBImage_To_GrayByteArray(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source color bitmap
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: None

Example:

let grayMatrix;(,) As Byte = ImgProc.Convert_RGBImage_To_GrayByteArray(srcBmp);

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

Description: Converts RGB image pixels to grayscale integer array

Syntax: await ImgProc.Convert_RGBImage_To_GrayIntegerArray(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source color bitmap
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: None

Example:

let intMatrix;(,) As Integer = ImgProc.Convert_RGBImage_To_GrayIntegerArray(srcBmp);

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

Description: Converts image to grayscale and stores in 2D byte array

Syntax: await ImgProc.GrayScaling_PutTo_2DByte(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: None

Example:

let resMatrix;(,) As Byte = ImgProc.GrayScaling_PutTo_2DByte(srcBmp);

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

Description: Converts image to grayscale and stores in 2D integer array

Syntax: await ImgProc.GrayScaling_PutTo_2DInt(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: None

Example:

let resIntMatrix;(,) As Integer = ImgProc.GrayScaling_PutTo_2DInt(srcBmp);

ImgProc.GrayScaling_ReturnImg_From_2DInt(SourceImage, Gray2DInt, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Converts image to grayscale and returns result from 2D integer array

Syntax: const result = await ImgProc.GrayScaling_ReturnImg_From_2DInt(SourceImage, Gray2DInt, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Reference source bitmap
Gray2DInt (Integer(,)) 2D integer grayscale values matrix
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let resBmp As Bitmap ;= ImgProc.GrayScaling_ReturnImg_From_2DInt(srcBmp, grayIntMatrix);

ImgProc.Overlay_GrayIntArray_On_Image(SourceImage, Gray2DInt, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Overlays grayscale integer array values as colors on image

Syntax: const result = await ImgProc.Overlay_GrayIntArray_On_Image(SourceImage, Gray2DInt, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source background bitmap
Gray2DInt (Integer(,)) 2D integer array containing overlay values
MaskImage (Bitmap) ROI mask image
MaskRegionBoundary (Rectangle) Boundary rectangle for ROI
IsMaskAllRegionSelected (Boolean) Flag for full selection mode

Return Value: Bitmap

Example:

let resBmp ;= ImgProc.Overlay_GrayIntArray_On_Image(srcBmp, grayMatrix, maskBmp, roiRect, false);

Geometric Transformations

ImgProc.ResizeByZoomFactor(SourceImage, ZoomFactor, InterpolationMode)

Description: Resizes image by specified zoom factor

Syntax: const result = await ImgProc.ResizeByZoomFactor(SourceImage, ZoomFactor, InterpolationMode);

Parameter Description
SourceImage (Bitmap) Source bitmap image
ZoomFactor (Single) Scaling factor (e.g. 1.5 = 150%, 0.5 = 50%)
InterpolationMode (Drawing2D.InterpolationMode, Optional) Quality resampling mode

Return Value: Bitmap

Example:

let zoomedBmp As Bitmap ;= ImgProc.ResizeByZoomFactor(srcBmp, 2.0F);

ImgProc.Resize(SourceImage, nWidth, nHeight, InterpolationMode)

Description: Resizes image to specified width and height

Syntax: const result = await ImgProc.Resize(SourceImage, nWidth, nHeight, InterpolationMode);

Parameter Description
SourceImage (Bitmap) Source bitmap image
nWidth (Integer) Target width in pixels
nHeight (Integer) Target height in pixels
InterpolationMode (Drawing2D.InterpolationMode, Optional) Quality resampling mode

Return Value: Bitmap

Example:

let resizedBmp As Bitmap ;= ImgProc.Resize(srcBmp, 1024, 768);

ImgProc.Crop(SourceImage, nWidth, nHeight, TargetX, TargetY)

Description: Crops image to specified width and height

Syntax: const result = await ImgProc.Crop(SourceImage, nWidth, nHeight, TargetX, TargetY);

Parameter Description
SourceImage (Bitmap) Source bitmap image
nWidth (Integer) Crop rectangle width
nHeight (Integer) Crop rectangle height
TargetX (Integer) Crop region top-left X position
TargetY (Integer) Crop region top-left Y position

Return Value: Bitmap

Example:

let subBmp As Bitmap ;= ImgProc.Crop(srcBmp, 200, 200, 50, 50);

ImgProc.Rotate(SourceImage, CenterX, CenterY, AngleDegree, BackgroundColor)

Description: Rotates image around specified center point by angle

Syntax: const result = await ImgProc.Rotate(SourceImage, CenterX, CenterY, AngleDegree, BackgroundColor);

Parameter Description
SourceImage (Bitmap) Source bitmap image
CenterX (Integer) Pivot point X coordinate
CenterY (Integer) Pivot point Y coordinate
AngleDegree (Single) Rotation angle in degrees
BackgroundColor (Color) Background fill color for exposed corners

Return Value: Bitmap

Example:

let rotBmp As Bitmap ;= ImgProc.Rotate(srcBmp, 100, 100, 45.0F, Color.Black);

ImgProc.RotateAtCenter(SourceImage, AngleDegree)

Description: Rotates image around its center by specified angle in degrees

Syntax: const result = await ImgProc.RotateAtCenter(SourceImage, AngleDegree);

Parameter Description
SourceImage (Bitmap) Source bitmap image
AngleDegree (Single) Rotation angle in degrees

Return Value: Bitmap

Example:

let rotBmp As Bitmap ;= ImgProc.RotateAtCenter(srcBmp, 90.0F);

ImgProc.Flip_Vertical(SourceImage)

Description: Flips image vertically

Syntax: const result = await ImgProc.Flip_Vertical(SourceImage);

Parameter Description
SourceImage (Bitmap) Source bitmap image

Return Value: Bitmap

Example:

let flippedBmp As Bitmap ;= ImgProc.Flip_Vertical(srcBmp);

ImgProc.Flip_Horizontal(SourceImage)

Description: Flips image horizontally

Syntax: const result = await ImgProc.Flip_Horizontal(SourceImage);

Parameter Description
SourceImage (Bitmap) Source bitmap image

Return Value: Bitmap

Example:

let flippedBmp As Bitmap ;= ImgProc.Flip_Horizontal(srcBmp);

ImgProc.RotateFlip(SourceImage, RotateFlipOption)

Description: Applies rotation and flip transformation to image

Syntax: const result = await ImgProc.RotateFlip(SourceImage, RotateFlipOption);

Parameter Description
SourceImage (Bitmap) Source bitmap image
RotateFlipOption (RotateFlipType) GDI+ RotateFlipType enumeration option

Return Value: Bitmap

Example:

let resBmp As Bitmap ;= ImgProc.RotateFlip(srcBmp, RotateFlipType.Rotate90FlipX);

Filtering & Enhancement

ImgProc.BoxAveraging(SourceImage, BoxSizeHalf, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Applies box averaging (blur) filter

Syntax: const result = await ImgProc.BoxAveraging(SourceImage, BoxSizeHalf, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
BoxSizeHalf (Integer) Half-width radius of the blur box kernel
MaskImage (Bitmap, Optional) Optional ROI mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let blurBmp As Bitmap ;= ImgProc.BoxAveraging(srcBmp, 3);

ImgProc.GaussianFilter(SourceImage, FilterSize, WeightFactor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Applies Gaussian blur filter

Syntax: const result = await ImgProc.GaussianFilter(SourceImage, FilterSize, WeightFactor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
FilterSize (Integer) Kernel filter size (must be odd number)
WeightFactor (Integer, Optional) Gaussian weight factor
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let gImg As Bitmap ;= ImgProc.GaussianFilter(srcBmp, 5, 0);

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

Description: Sharpens image using basic 3×3 kernel

Syntax: const result = await ImgProc.Sharpen_3x3(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let res ;= ImgProc.Sharpen_3x3(srcBmp);

ImgProc.Sharpen_3x3_Improved(SourceImage, Strength, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Sharpens image using improved 3×3 kernel

Syntax: const result = await ImgProc.Sharpen_3x3_Improved(SourceImage, Strength, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
Strength (Single, Optional) Sharpening strength factor
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let res ;= ImgProc.Sharpen_3x3_Improved(srcBmp, 1.5F);

ImgProc.Sharpen_5x5_HighQuality_Fixed(SourceImage, Strength, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Sharpens image using high-quality 5×5 kernel

Syntax: const result = await ImgProc.Sharpen_5x5_HighQuality_Fixed(SourceImage, Strength, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
Strength (Single, Optional) Sharpening strength factor
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let res ;= ImgProc.Sharpen_5x5_HighQuality_Fixed(srcBmp, 2.0F);

ImgProc.MosaicFilter(SourceImage, isPixelMode, value, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Applies mosaic or pixelation effect

Syntax: const result = await ImgProc.MosaicFilter(SourceImage, isPixelMode, value, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
isPixelMode (Boolean) True for pixel block mode, False for cell grid mode
value (Integer) Block size or pixelation magnitude
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let mosaicBmp As Bitmap ;= ImgProc.MosaicFilter(srcBmp, true, 10);

Edge Detection & Morphology

ImgProc.Erode(SourceImage, BoxSizeHalf, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected, IsDoGrayScaling)

Description: Applies erosion morphological operation

Syntax: const result = await ImgProc.Erode(SourceImage, BoxSizeHalf, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected, IsDoGrayScaling);

Parameter Description
SourceImage (Bitmap) Source bitmap image
BoxSizeHalf (Integer) Structuring element half-size radius
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode
IsDoGrayScaling (Boolean, Optional) Convert image to grayscale before processing

Return Value: Bitmap

Example:

let res ;= ImgProc.Erode(srcBmp, 2);

ImgProc.Dilate(SourceImage, BoxSizeHalf, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected, IsDoGrayScaling)

Description: Applies dilation morphological operation

Syntax: const result = await ImgProc.Dilate(SourceImage, BoxSizeHalf, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected, IsDoGrayScaling);

Parameter Description
SourceImage (Bitmap) Source bitmap image
BoxSizeHalf (Integer) Structuring element half-size radius
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode
IsDoGrayScaling (Boolean, Optional) Convert image to grayscale before processing

Return Value: Bitmap

Example:

let res ;= ImgProc.Dilate(srcBmp, 2);

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

Description: Detects edges using Sobel operator

Syntax: const result = await ImgProc.EdgeDetect_by_Sobel(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let edgeImg As Bitmap ;= ImgProc.EdgeDetect_by_Sobel(srcBmp);

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

Description: Detects edges using homogeneity measure

Syntax: const result = await ImgProc.EdgeDetect_by_Homogenity(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let edgeImg As Bitmap ;= ImgProc.EdgeDetect_by_Homogenity(srcBmp);

ImgProc.ErodeOutlines(SourceGrayImage, BackgroundGray, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Removes specified outline color from grayscale image edges

Syntax: const result = await ImgProc.ErodeOutlines(SourceGrayImage, BackgroundGray, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceGrayImage (Bitmap) Source grayscale bitmap image
BackgroundGray (Byte) Background gray intensity byte value
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let res ;= ImgProc.ErodeOutlines(grayBmp, 255);

ImgProc.DilateOutlines(SourceGrayImage, BackgroundGray, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Expands specified outline color on grayscale image edges

Syntax: const result = await ImgProc.DilateOutlines(SourceGrayImage, BackgroundGray, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceGrayImage (Bitmap) Source grayscale bitmap image
BackgroundGray (Byte) Background gray intensity byte value
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let res ;= ImgProc.DilateOutlines(grayBmp, 0);

Color Channel Splitting & Extraction

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

Description: Extracts red channel from color image as grayscale

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

Parameter Description
SourceImage (Bitmap) Source color bitmap
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let redCh ;= ImgProc.Split_Red(srcBmp);

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

Description: Extracts green channel from color image as grayscale

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

Parameter Description
SourceImage (Bitmap) Source color bitmap
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let greenCh ;= ImgProc.Split_Green(srcBmp);

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

Description: Extracts blue channel from color image as grayscale

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

Parameter Description
SourceImage (Bitmap) Source color bitmap
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let blueCh ;= ImgProc.Split_Blue(srcBmp);

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

Description: Extracts red channel as grayscale image

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

Parameter Description
SourceImage (Bitmap) Source color bitmap
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let redGrayBmp ;= ImgProc.GrayFrom_Red(srcBmp);

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

Description: Extracts green channel as grayscale

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

Parameter Description
SourceImage (Bitmap) Source color bitmap
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let greenGrayBmp ;= ImgProc.GrayFrom_Green(srcBmp);

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

Description: Extracts blue channel as grayscale image

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

Parameter Description
SourceImage (Bitmap) Source color bitmap
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let blueGrayBmp ;= ImgProc.GrayFrom_Blue(srcBmp);

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

Description: Extracts hue channel from HSI color space

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

Parameter Description
SourceImage (Bitmap) Source color bitmap
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let hueBmp ;= ImgProc.Split_Hue(srcBmp);

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

Description: Extracts saturation channel from HSI color space

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

Parameter Description
SourceImage (Bitmap) Source color bitmap
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let satBmp ;= ImgProc.Split_Saturation(srcBmp);

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

Description: Extracts intensity channel from HSI color space

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

Parameter Description
SourceImage (Bitmap) Source color bitmap
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let intBmp ;= ImgProc.Split_Intensity(srcBmp);

Color Space Conversions (Point-wise)

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

Description: Converts RGB to CMYK color space

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

Parameter Description
r (Byte) Red channel byte
g (Byte) Green channel byte
b (Byte) Blue channel byte
IsCompute_Cyan (Boolean) Compute cyan component flag
IsCompute_Magenta (Boolean) Compute magenta component flag
IsCompute_Yellow (Boolean) Compute yellow component flag

Return Value: None

Example:

ImgProc.RGBToCMYK(200, 100, 50, true, true, true);

ImgProc.RGBToLab(r, g, b)

Description: Converts RGB to CIELab color space

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

Parameter Description
r (Byte) Red channel byte
g (Byte) Green channel byte
b (Byte) Blue channel byte

Return Value: None

Example:

ImgProc.RGBToLab(128, 64, 32);

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

Description: Converts RGB to CIELab with original value output

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

Parameter Description
r (Byte) Red channel byte
g (Byte) Green channel byte
b (Byte) Blue channel byte
LabL (Double) ByRef output Lightness L*
Laba (Double) ByRef output a* channel
Labb (Double) ByRef output b* channel

Return Value: None

Example:

let L As Double, a As Double, b As Double;
ImgProc.RGBToLab_OriginalValue(255, 0, 0, L, a, b);

ImgProc.RGBToHSI(r, g, b)

Description: Converts RGB to HSI color space

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

Parameter Description
r (Byte) Red channel byte
g (Byte) Green channel byte
b (Byte) Blue channel byte

Return Value: None

Example:

ImgProc.RGBToHSI(100, 200, 150);

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

Description: Converts HSV to RGB color space

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

Parameter Description
h (Single) Hue angle (0.0 to 360.0)
s (Single) Saturation (0.0 to 1.0)
v (Single) Value/Brightness (0.0 to 1.0)
r (Byte) ByRef output Red byte
g (Byte) ByRef output Green byte
b (Byte) ByRef output Blue byte

Return Value: None

Example:

let r As Byte, g As Byte, b As Byte;
ImgProc.HSVtoRGB(120.0F, 0.5F, 0.8F, r, g, b);

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

Description: Converts HSI to RGB color space

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

Parameter Description
Hue (Integer) Hue angle in degrees (0-360)
Saturation255 (Single) Saturation scaled 0-255
Intensity255 (Single) Intensity scaled 0-255
Red (Integer) ByRef output Red integer
Green (Integer) ByRef output Green integer
Blue (Integer) ByRef output Blue integer

Return Value: None

Example:

let r As Integer, g As Integer, b As Integer;
ImgProc.HSITORGB(180, 128.0F, 200.0F, r, g, b);

Region Filling & Compositing

ImgProc.FillRegion(SourceImage, FillColorRed, FillColorGreen, FillColorBlue, IsFillInside, Opacity, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Fills image regions with RGB color value

Syntax: const result = await ImgProc.FillRegion(SourceImage, FillColorRed, FillColorGreen, FillColorBlue, IsFillInside, Opacity, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
FillColorRed (Byte)
FillColorGreen (Byte)
FillColorBlue (Byte)
IsFillInside (Boolean) True to fill inside ROI mask, False for outside
Opacity (Single) Fill opacity factor (0.0 to 1.0)
IsShowProgress (Boolean, Optional)
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let res ;= ImgProc.FillRegion(srcBmp, "#FF0000", true, 0.5F);

ImgProc.ChromaKey(SourceImage, overlayImg, chromaR, chromaG, chromaB, opacity, isFeather, featherRadius, MaskImage, IsMaskAllRegionSelected)

Description: Applies chroma key effect with transparent color removal

Syntax: const result = await ImgProc.ChromaKey(SourceImage, overlayImg, chromaR, chromaG, chromaB, opacity, isFeather, featherRadius, MaskImage, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap)
overlayImg (Bitmap)
chromaR (Integer, Optional) Chroma key color Red component
chromaG (Integer, Optional) Chroma key color Green component
chromaB (Integer, Optional) Chroma key color Blue component
opacity (Single, Optional) Overlay blend opacity (0.0 to 1.0)
isFeather (Boolean, Optional) Enable edge feathering
featherRadius (Integer, Optional) Feathering blur radius in pixels
MaskImage (Bitmap, Optional) Optional mask bitmap
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let res ;= ImgProc.ChromaKey(bgBmp, fgBmp, 0, 255, 0, 1.0F, true, 3);

ImgProc.FloodFill(SourceImage, CenterX, CenterY, FillColorR, FillColorG, FillColorB, ToleranceR, ToleranceG, ToleranceB, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Fills region starting from center point with color

Syntax: const result = await ImgProc.FloodFill(SourceImage, CenterX, CenterY, FillColorR, FillColorG, FillColorB, ToleranceR, ToleranceG, ToleranceB, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
CenterX (Integer) Seed point X coordinate
CenterY (Integer) Seed point Y coordinate
FillColorR (Byte) Target fill color Red component
FillColorG (Byte) Target fill color Green component
FillColorB (Byte) Target fill color Blue component
ToleranceR (Integer) Red channel tolerance threshold
ToleranceG (Integer) Green channel tolerance threshold
ToleranceB (Integer) Blue channel tolerance threshold
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let res ;= ImgProc.FloodFill(srcBmp, 100, 100, 255, 0, 0, 10, 10, 10);

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

Description: Inverts image colors

Syntax: const result = await ImgProc.Invert(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let negBmp ;= ImgProc.Invert(srcBmp);

Binarization & Thresholding

ImgProc.ManualBinarization(SourceImage, ThresholdValue, SkipGrayScaling, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Converts image to binary using manual threshold value

Syntax: const result = await ImgProc.ManualBinarization(SourceImage, ThresholdValue, SkipGrayScaling, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
ThresholdValue (Integer) Binarization threshold (0 to 255)
SkipGrayScaling (Boolean, Optional) Skip internal grayscale step if input is already gray
IsShowProgress (Boolean, Optional) Display execution progress
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let binBmp ;= ImgProc.ManualBinarization(srcBmp, 128);

ImgProc.AdaptiveBinarization(SourceImage, LocalBoxSizeValue, IsObjectWhite, ThresholdLevel, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Converts to binary using local adaptive threshold

Syntax: const result = await ImgProc.AdaptiveBinarization(SourceImage, LocalBoxSizeValue, IsObjectWhite, ThresholdLevel, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
LocalBoxSizeValue (Integer) Local window box size in pixels
IsObjectWhite (Boolean) True if foreground objects are lighter than background
ThresholdLevel (Integer) Sensitivity offset parameter
IsShowProgress (Boolean, Optional) Display execution progress
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let res ;= ImgProc.AdaptiveBinarization(srcBmp, 15, true, 5);

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

Description: Applies multi-step thresholding to separate color channels

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

Parameter Description
SourceImage (Bitmap) Source bitmap image
LevelCount_Red (Integer) Number of quantization levels for Red channel
LevelCount_Green (Integer) Number of quantization levels for Green channel
LevelCount_Blue (Integer) Number of quantization levels for Blue channel
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let res ;= ImgProc.MultiStepThresholding(srcBmp, 4, 4, 4);

Drawing & Text Overlays

ImgProc.Draw_Line(Pic_Target, X1, Y1, X2, Y2, LineColor)

Description: Draws line on picture control

Syntax: const result = await ImgProc.Draw_Line(Pic_Target, X1, Y1, X2, Y2, LineColor);

Parameter Description
Pic_Target (PictureBox) Target PictureBox control
X1 (Integer) Starting X coordinate
Y1 (Integer) Starting Y coordinate
X2 (Integer) Ending X coordinate
Y2 (Integer) Ending Y coordinate
LineColor (Color) Line color

Return Value: Bitmap

Example:

let res ;= ImgProc.Draw_Line(picBox, 10, 10, 200, 200, Color.Red);

ImgProc.Draw_Text_Outlined_Bitmap(Pic_Target, x, y, TextString, TextFont, InnerColor, OuterColor)

Description: Draws outlined text on bitmap

Syntax: const result = await ImgProc.Draw_Text_Outlined_Bitmap(Pic_Target, x, y, TextString, TextFont, InnerColor, OuterColor);

Parameter Description
Pic_Target (Bitmap) Target bitmap canvas
x (Integer) X position
y (Integer) Y position
TextString (String) Text string to render
TextFont (Font) System.Drawing.Font object
InnerColor (Color) Text inner fill color
OuterColor (Color) Outline stroke color

Return Value: Bitmap

Example:

let fnt As New Font;("Arial", 12.0F);
let res ;= ImgProc.Draw_Text_Outlined_Bitmap(srcBmp, 20, 20, "Label", fnt, Color.Yellow, Color.Black);

ImgProc.Draw_Rectangles(Pic_Target, SourceRectangles(), LineColor)

Description: Draws rectangles on image with specified color

Syntax: const result = await ImgProc.Draw_Rectangles(Pic_Target, SourceRectangles(), LineColor);

Parameter Description
Pic_Target (Bitmap) Target bitmap
SourceRectangles() (Object)
LineColor (Color) Stroke color for rectangle boundaries

Return Value: Bitmap

Example:

let rects;() As Rectangle = { New Rectangle(10,10,50,50) };
let res ;= ImgProc.Draw_Rectangles(srcBmp, rects, Color.Green);

ImgProc.TextAnnotation(SourceImage, x, y, textString, fontName, fontSize, fontStyleInt, innerColorArgb, outerColorArgb, opacityPercent, outlineThickness, angle, isAntiAlias)

Description: Annotates image with text and outline style

Syntax: const result = await ImgProc.TextAnnotation(SourceImage, x, y, textString, fontName, fontSize, fontStyleInt, innerColorArgb, outerColorArgb, opacityPercent, outlineThickness, angle, isAntiAlias);

Parameter Description
SourceImage (Bitmap) The base image to draw text on
x (Single) X coordinate for the text location
y (Single) Y coordinate for the text location
textString (String) The text string to draw
fontName (String, Optional) Name of the font family
fontSize (Single, Optional) Font size in points
fontStyleInt (Integer, Optional) Font style bitwise integer (0=Regular, 1=Bold, 2=Italic, etc.)
innerColorArgb (Integer, Optional) ARGB integer for the text fill color
outerColorArgb (Integer, Optional) ARGB integer for the text outline color
opacityPercent (Integer, Optional) Opacity percentage (0 to 100)
outlineThickness (Single, Optional) Thickness of the text outline
angle (Single, Optional) Rotation angle of the text
isAntiAlias (Boolean, Optional) Enable anti-aliasing for smooth edges

Return Value: Bitmap

Example:

let outputImg ;= Action.TextAnnotation(srcImg, 50.0F, 50.0F, "Sample Text", "Arial", 48.0F, 1, -1, -16777216, 100, 5.0F, 0.0F, true);

Pixel Analysis & Measurements

ImgProc.Get_Histogram(SourceImage, TotalPixelCount, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Calculates histogram of image pixel intensities

Syntax: await ImgProc.Get_Histogram(SourceImage, TotalPixelCount, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
TotalPixelCount (Integer) ByRef output total evaluated pixel count
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: None

Example:

let totCount As Integer;
let hist;(,) As Single = ImgProc.Get_Histogram(srcBmp, totCount);

ImgProc.Get_LineProfile(SourceImage, StartAt, EndAt, LineThickness, IsNormalizeBy255)

Description: Gets pixel intensity profile along a line

Syntax: await ImgProc.Get_LineProfile(SourceImage, StartAt, EndAt, LineThickness, IsNormalizeBy255);

Parameter Description
SourceImage (Bitmap) Source bitmap image
StartAt (Point) Starting point coordinate
EndAt (Point) Ending point coordinate
LineThickness (Integer) Profile sampling line width in pixels
IsNormalizeBy255 (Boolean, Optional) Normalize profile values to 0.0-1.0 range

Return Value: None

Example:

let profile;(,) As Single = ImgProc.Get_LineProfile(srcBmp, New Point(0,0), New Point(100,100), 3);

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

Description: Calculates average color value of specified channel

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

Parameter Description
SourceImage (Bitmap) Source bitmap image
TotalPixelsCount (Long) ByRef output total analyzed pixel count
AnalysisInterval (Integer) Pixel step sampling interval (e.g. 1 = every pixel)
ColorChannel (String) Channel name ("Red", "Green", "Blue", "Gray", etc.)
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Single

Example:

let pxCount As Long;
let avgRed As Single ;= ImgProc.Calculate_AverageColorValue(srcBmp, pxCount, 1, "Red");

ImgProc.Distance(X1, Y1, X2, Y2)

Description: Calculates Euclidean distance between two points

Syntax: const result = await ImgProc.Distance(X1, Y1, X2, Y2);

Parameter Description
X1 (Double) Point 1 X coordinate
Y1 (Double) Point 1 Y coordinate
X2 (Double) Point 2 X coordinate
Y2 (Double) Point 2 Y coordinate

Return Value: Double

Example:

let d As Double ;= ImgProc.Distance(0.0, 0.0, 3.0, 4.0);

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

Description: Counts pixels of specific color

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

Parameter Description
SourceImage (Bitmap) Source bitmap image
ColorOfInterest_RGBInt (Integer) Packed target RGB integer value
TotalPixelCount (Integer) ByRef output total evaluated pixels count
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Integer

Example:

let totPx As Integer;
let redCount As Integer ;= ImgProc.Count_ColorPixelOfInterest(srcBmp, 16711680, totPx);

Automated Image Enhancement & Restoration

ImgProc.RollingBoxBackgroundSubtraction(SourceImage, Radius, IsAutomatic, IsObjectWhite, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Removes background using rolling box filter

Syntax: const result = await ImgProc.RollingBoxBackgroundSubtraction(SourceImage, Radius, IsAutomatic, IsObjectWhite, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
Radius (Integer) Rolling ball/box pixel radius
IsAutomatic (Boolean, Optional) Enable automatic radius calculation
IsObjectWhite (Boolean, Optional) True if target objects are bright on dark background
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let resBmp ;= ImgProc.RollingBoxBackgroundSubtraction(srcBmp, 50, false, true);

ImgProc.CorrectUnevenIllumination(SourceImage, GridRows, GridCols, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Corrects uneven illumination using grid-based division

Syntax: const result = await ImgProc.CorrectUnevenIllumination(SourceImage, GridRows, GridCols, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
GridRows (Integer, Optional) Number of grid estimation rows
GridCols (Integer, Optional) Number of grid estimation columns
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let flatImg ;= ImgProc.CorrectUnevenIllumination(srcBmp, 16, 16);

ImgProc.SmartDenoise(SourceImage, Radius, Threshold, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Applies smart noise reduction preserving edges

Syntax: const result = await ImgProc.SmartDenoise(SourceImage, Radius, Threshold, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
Radius (Integer, Optional) Filter spatial neighborhood radius
Threshold (Integer, Optional) Photometric intensity difference threshold
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let cleanImg ;= ImgProc.SmartDenoise(srcBmp, 5, 25);

ImgProc.AdaptiveContrast(SourceImage, Strength, TilesX, TilesY, ClipLimit, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Applies adaptive contrast enhancement with histogram equalization

Syntax: const result = await ImgProc.AdaptiveContrast(SourceImage, Strength, TilesX, TilesY, ClipLimit, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
Strength (Single, Optional) Contrast enhancement strength (0.0 to 1.0)
TilesX (Integer, Optional) Number of tile grid columns
TilesY (Integer, Optional) Number of tile grid rows
ClipLimit (Single, Optional) Histogram clipping threshold limit
IsShowProgress (Boolean, Optional) Display progress indicator
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let claheBmp ;= ImgProc.AdaptiveContrast(srcBmp, 0.8F, 8, 8, 2.0F);

ImgProc.AutoTone(SourceImage, ClipPercent, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Auto adjusts tonal range

Syntax: const result = await ImgProc.AutoTone(SourceImage, ClipPercent, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
ClipPercent (Single, Optional) Histogram end clipping percentage
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let res ;= ImgProc.AutoTone(srcBmp, 0.5F);

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

Description: Auto adjusts white balance

Syntax: const result = await ImgProc.AutoWhiteBalance(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let awbBmp ;= ImgProc.AutoWhiteBalance(srcBmp);

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

Description: Auto adjusts gamma curve

Syntax: const result = await ImgProc.AutoGamma(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let gammaBmp ;= ImgProc.AutoGamma(srcBmp);

ImgProc.Sharpen_UnsharpMask(SourceImage, FilterSize, AmountPercent, Threshold, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Sharpens image using unsharp mask technique

Syntax: const result = await ImgProc.Sharpen_UnsharpMask(SourceImage, FilterSize, AmountPercent, Threshold, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
FilterSize (Integer, Optional) Gaussian blur kernel size
AmountPercent (Integer, Optional) Sharpening effect amount percentage
Threshold (Integer, Optional) Minimum edge contrast threshold
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let usmBmp ;= ImgProc.Sharpen_UnsharpMask(srcBmp, 11, 150, 5);

ImgProc.RemoveBackground(SourceImage, MatteImage, MaskRegionBoundary, IsMaskAllRegionSelected, BgColor, NewBackgroundImage)

Description: Removes background using matte with optional replacement

Syntax: const result = await ImgProc.RemoveBackground(SourceImage, MatteImage, MaskRegionBoundary, IsMaskAllRegionSelected, BgColor, NewBackgroundImage);

Parameter Description
SourceImage (Bitmap) Source foreground image
MatteImage (Bitmap) Matte alpha channel bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode
BgColor (Color, Optional) Replacement solid background color
NewBackgroundImage (Bitmap, Optional) Replacement background image

Return Value: Bitmap

Example:

let cutBmp ;= ImgProc.RemoveBackground(srcBmp, matteBmp);

Advanced Segmentation, Skeletonization & 3D Export

ImgProc.WatershedSegmentation(SourceImage, MinDistanceThreshold, SmoothRadius, BoundaryThickness, BoundR, BoundG, BoundB, ReturnOnlyBoundaries, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Segments image using watershed algorithm

Syntax: const result = await ImgProc.WatershedSegmentation(SourceImage, MinDistanceThreshold, SmoothRadius, BoundaryThickness, BoundR, BoundG, BoundB, ReturnOnlyBoundaries, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source binary/grayscale image
MinDistanceThreshold (Integer, Optional) Minimum distance peak threshold
SmoothRadius (Integer, Optional) Smoothing filter radius for seed generation
BoundaryThickness (Integer, Optional) Line thickness for drawn watershed boundaries
BoundR (Byte, Optional) Boundary line Red component
BoundG (Byte, Optional) Boundary line Green component
BoundB (Byte, Optional) Boundary line Blue component
ReturnOnlyBoundaries (Boolean, Optional) True to return boundary lines only
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let wsBmp ;= ImgProc.WatershedSegmentation(srcBmp, 15, 3, 2, 255, 0, 0);

ImgProc.SplitObjects_ConvexityDefects(SourceImage, MinDefectDepth, MaxCutLength, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Splits connected objects using convexity defects

Syntax: const result = await ImgProc.SplitObjects_ConvexityDefects(SourceImage, MinDefectDepth, MaxCutLength, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source binary bitmap
MinDefectDepth (Single, Optional) Minimum defect notch depth
MaxCutLength (Single, Optional) Maximum allowed cut line distance
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let splitBmp ;= ImgProc.SplitObjects_ConvexityDefects(srcBmp, 5.0F, 40.0F);

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

Description: Converts image to skeleton by removing interior pixels

Syntax: const result = await ImgProc.Skeletonize(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source binary bitmap image
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let skelBmp ;= ImgProc.Skeletonize(srcBmp);

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

Description: Skeletonizes image with extended processing

Syntax: const result = await ImgProc.SkeletonizeExtended(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source binary bitmap image
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let extSkel ;= ImgProc.SkeletonizeExtended(srcBmp);

ImgProc.Extract_SkeletonPoints(SkeletonArray(,), foreground)

Description: Extracts all skeleton points from array

Syntax: await ImgProc.Extract_SkeletonPoints(SkeletonArray(,), foreground);

Parameter Description
SkeletonArray(,) (Object)
foreground (Byte) As Point() Foreground pixel intensity value (e.g. 255)

Return Value: None

Example:

let pts;() As Point = ImgProc.Extract_SkeletonPoints(skelMatrix, 255);

ImgProc.Get_TrueSkeletonLength(SkeletonArray(,), foreground, umPerPixels, SplineVertexCount)

Description: Calculates true skeleton curve length with spline

Syntax: const result = await ImgProc.Get_TrueSkeletonLength(SkeletonArray(,), foreground, umPerPixels, SplineVertexCount);

Parameter Description
SkeletonArray(,) (Object)
foreground (Byte) Foreground intensity byte
umPerPixels (Single) Physical calibration factor (micrometers per pixel)
SplineVertexCount (Integer) Spline interpolation vertex sampling density

Return Value: Single

Example:

let realLen As Single ;= ImgProc.Get_TrueSkeletonLength(skelMatrix, 255, 0.45F, 100);

ImgProc.SaveDepthMapToSTL_GaussianFilter(SourceImage, FilePath, MaxSTLHeight, BaseThickness, SmoothingPasses, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Saves depth map as STL file using Gaussian filter

Syntax: const result = await ImgProc.SaveDepthMapToSTL_GaussianFilter(SourceImage, FilePath, MaxSTLHeight, BaseThickness, SmoothingPasses, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source depth map bitmap
FilePath (String) Destination file path for STL model output
MaxSTLHeight (Single, Optional) Maximum 3D height scale in mm
BaseThickness (Single, Optional) Model base plate thickness in mm
SmoothingPasses (Integer, Optional) Number of surface smoothing passes
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: String

Example:

let outPath ;= ImgProc.SaveDepthMapToSTL_GaussianFilter(srcBmp, "C:\model.stl", 20.0F, 3.0F);

Channel Merging & Image Arithmetic

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

Description: Merges three channel images using specified color space

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

Parameter Description
SourceImage (Image)
ColorSpace (String) Target color space ("RGB", "HSI", or "LAB")
Image1 (Bitmap) Channel 1 bitmap (R / H / L)
Image2 (Bitmap) Channel 2 bitmap (G / S / a)
Image3 (Bitmap) Channel 3 bitmap (B / I / b)
maskImage (Bitmap, Optional) Optional mask bitmap
maskRegionBoundary (Rectangle, Optional) ROI boundary box
isMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let rgbBmp ;= ImgProc.MergeChannels("RGB", rChBmp, gChBmp, bChBmp);

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

Description: Converts RGB to rg chromaticity coordinates

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

Parameter Description
SourceImage (Bitmap) Source color bitmap image
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let chromBmp ;= ImgProc.Convert_To_rgChromaticity(srcBmp);

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

Description: Performs binary AND operation on two grayscale images

Syntax: const result = await ImgProc.BinaryOperation_AND(SourceGrayImage1, SourceGrayImage2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceGrayImage1 (Bitmap) First input grayscale image
SourceGrayImage2 (Bitmap) Second input grayscale image
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let res ;= ImgProc.BinaryOperation_AND(img1, img2);

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

Description: Performs binary OR operation on two grayscale images

Syntax: const result = await ImgProc.BinaryOperation_OR(SourceGrayImage1, SourceGrayImage2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceGrayImage1 (Bitmap) First input grayscale image
SourceGrayImage2 (Bitmap) Second input grayscale image
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let res ;= ImgProc.BinaryOperation_OR(img1, img2);

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

Description: Performs binary XOR operation on two grayscale images

Syntax: const result = await ImgProc.BinaryOperation_XOR(SourceGrayImage1, SourceGrayImage2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceGrayImage1 (Bitmap) First input grayscale image
SourceGrayImage2 (Bitmap) Second input grayscale image
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let res ;= ImgProc.BinaryOperation_XOR(img1, img2);

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

Description: Computes difference between two images

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

Parameter Description
SourceGrayImage1 (Bitmap) First input grayscale bitmap
SourceGrayImage2 (Bitmap) Second input grayscale bitmap
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let diff ;= ImgProc.Compute_DifferentialImage(img1, img2);

Noise Cleaning & Edge Detection Advanced

ImgProc.RemoveBlackDots(SourceImage, MaxDotSize, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Removes small black noise dots from image

Syntax: const result = await ImgProc.RemoveBlackDots(SourceImage, MaxDotSize, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
MaxDotSize (Integer, Optional) Maximum noise dot radius in pixels
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let clean ;= ImgProc.RemoveBlackDots(srcBmp, 2);

ImgProc.RemoveWhiteDots(SourceImage, PixelColor, MaxDotSize, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Removes small white/specified color noise dots from image

Syntax: const result = await ImgProc.RemoveWhiteDots(SourceImage, PixelColor, MaxDotSize, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
PixelColor (Short) Target color code to fill removed dots
MaxDotSize (Integer, Optional) Maximum noise dot radius in pixels
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let clean ;= ImgProc.RemoveWhiteDots(srcBmp, 0, 2);

ImgProc.CannyEdgeDetecton(SourceImage, LocalBoxSize, SkipGrayScaling, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Detects edges using Canny edge detection algorithm

Syntax: const result = await ImgProc.CannyEdgeDetecton(SourceImage, LocalBoxSize, SkipGrayScaling, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
LocalBoxSize (Integer) Gaussian smoothing box size
SkipGrayScaling (Boolean, Optional) Skip grayscale conversion if already single-channel
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let cannyBmp ;= ImgProc.CannyEdgeDetecton(srcBmp, 3);

ImgProc.HoughTransform_For_Line(SourceImage, UserMaxCount, IsAbsoluteNormalization, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Detects lines in image using Hough transform

Syntax: const result = await ImgProc.HoughTransform_For_Line(SourceImage, UserMaxCount, IsAbsoluteNormalization, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
UserMaxCount (Integer) Maximum line accumulation limit
IsAbsoluteNormalization (Boolean) Absolute normalization flag
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let linesBmp ;= ImgProc.HoughTransform_For_Line(srcBmp, 100, true);

ImgProc.HoughTransform_For_Circle(SourceImage, Radius, AngleCount, IsAbsoluteNormalization, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Detects circles in image using Hough transform

Syntax: const result = await ImgProc.HoughTransform_For_Circle(SourceImage, Radius, AngleCount, IsAbsoluteNormalization, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
Radius (Single) Target search circle radius in pixels
AngleCount (Integer) Angular resolution sampling steps
IsAbsoluteNormalization (Boolean) Absolute normalization flag
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let circlesBmp ;= ImgProc.HoughTransform_For_Circle(srcBmp, 25.0F, 360, true);

Screen Capture & Environment Utilities

ImgProc.CaptureDesktopScreen(PrintCursor)

Description: Captures entire desktop screen to bitmap

Syntax: const result = await ImgProc.CaptureDesktopScreen(PrintCursor);

Parameter Description
PrintCursor (Boolean, Optional) Include cursor in screen capture

Return Value: Bitmap

Example:

let capBmp As Bitmap ;= ImgProc.CaptureDesktopScreen(true);

ImgProc.CaptureDesktopScreenByRegion(PrintCursor, IsAllRegion, X1, Y1, X2, Y2)

Description: Captures specified region of desktop screen

Syntax: const result = await ImgProc.CaptureDesktopScreenByRegion(PrintCursor, IsAllRegion, X1, Y1, X2, Y2);

Parameter Description
PrintCursor (Boolean) Include cursor in screen capture
IsAllRegion (Boolean) Capture entire screen if True
X1 (Integer) Top-left X coordinate
Y1 (Integer) Top-left Y coordinate
X2 (Integer) Bottom-right X coordinate
Y2 (Integer) Bottom-right Y coordinate

Return Value: Bitmap

Example:

let capBmp ;= ImgProc.CaptureDesktopScreenByRegion(true, false, 0, 0, 800, 600);

ImgProc.CaptureObject(pHwnd)

Description: Captures window or UI object to bitmap

Syntax: const result = await ImgProc.CaptureObject(pHwnd);

Parameter Description
pHwnd (IntPtr) Native Windows handle (HWND)

Return Value: Bitmap

Example:

let winBmp ;= ImgProc.CaptureObject(myControl.Handle);

ImgProc.Remap(SourceImage, mapX, mapY, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected)

Description: Remaps image using coordinate maps

Syntax: const result = await ImgProc.Remap(SourceImage, mapX, mapY, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) Source bitmap image
mapX (Single(,)) 2D single array mapping X coordinates
mapY (Single(,)) 2D single array mapping Y coordinates
MaskImage (Bitmap, Optional) Optional mask bitmap
MaskRegionBoundary (Rectangle, Optional) ROI boundary box
IsMaskAllRegionSelected (Boolean, Optional) Flag for full selection mode

Return Value: Bitmap

Example:

let remapBmp ;= ImgProc.Remap(srcBmp, mapXMatrix, mapYMatrix);

ImgProc.Get_CoreCount()

Description: Gets number of processor cores

Syntax: const result = await ImgProc.Get_CoreCount();

Return Value: Integer

Example:

let numCores As Integer ;= ImgProc.Get_CoreCount();

Image Transforms & Filters

ImgProc.ImageStamp(SourceImage, StampImage, destRectX, destRectY, destRectWidth, destRectHeight, angle, opacityPercent, enableTransparentColor, transparentColorArgb, enableFeather, featherRadius, enableGradualAlpha, tolerance)

Description: Stamps overlay image on source with transformation

Syntax: const result = await ImgProc.ImageStamp(SourceImage, StampImage, destRectX, destRectY, destRectWidth, destRectHeight, angle, opacityPercent, enableTransparentColor, transparentColorArgb, enableFeather, featherRadius, enableGradualAlpha, tolerance);

Parameter Description
SourceImage (Bitmap) The base image to stamp on
StampImage (Bitmap) The image to use as a stamp
destRectX (Single) X coordinate for the destination rectangle
destRectY (Single) Y coordinate for the destination rectangle
destRectWidth (Single) Width of the destination rectangle
destRectHeight (Single) Height of the destination rectangle
angle (Single, Optional) Rotation angle of the stamp image
opacityPercent (Integer, Optional) Opacity percentage (0 to 100)
enableTransparentColor (Boolean, Optional) Enable transparency for a specific color
transparentColorArgb (Integer, Optional) ARGB integer value of the color to make transparent
enableFeather (Boolean, Optional) Enable edge feathering effect
featherRadius (Integer, Optional) Feathering blur radius in pixels
enableGradualAlpha (Boolean, Optional) Enable smooth gradual alpha blending for the transparent color
tolerance (Integer, Optional) Color tolerance level (0 to 100) for transparency

Return Value: Bitmap

Example:

let outputImg ;= Action.ImageStamp(srcImg, stampImg, 100.0F, 100.0F, 250.0F, 250.0F, 45.0F, 80, true, -1, false, 10, true, 30);

ImgProc.OverlayImage(SourceImage, overlayImg, transR, transG, transB, opacity, isFeather, featherRadius, tolerance, isGradual, MaskImage, IsMaskAllRegionSelected)

Description: Overlays another image with transparency and feathering

Syntax: const result = await ImgProc.OverlayImage(SourceImage, overlayImg, transR, transG, transB, opacity, isFeather, featherRadius, tolerance, isGradual, MaskImage, IsMaskAllRegionSelected);

Parameter Description
SourceImage (Bitmap) The base target image
overlayImg (Bitmap) The image to overlay
transR (Integer, Optional) Target transparent color Red channel
transG (Integer, Optional) Target transparent color Green channel
transB (Integer, Optional) Target transparent color Blue channel
opacity (Single, Optional) Overlay opacity factor (0.0 to 1.0)
isFeather (Boolean, Optional) Enable edge feathering
featherRadius (Integer, Optional) Feathering blur radius
tolerance (Integer, Optional) Tolerance level for transparent color matching (0 to 255)
isGradual (Boolean, Optional) Apply gradual alpha blending based on color difference within the tolerance range
MaskImage (Bitmap, Optional) Optional mask image to restrict the effect
IsMaskAllRegionSelected (Boolean, Optional) Flag indicating if the entire mask region is selected

Return Value: Bitmap

Example:

let outputImg ;= Action.OverlayImage(srcImg, overlayImg, 255, 255, 255, 0.8F, true, 15, 30, true, null, true);

3. Region (ScriptRegionHelper)

Basic Visibility & Selection Actions

Region.Unselect()

Description: Clears the current selection

Syntax: await Region.Unselect();

Return Value: None

Example:

Region.Unselect();

Region.Show()

Description: Displays the last drawn selection shape

Syntax: await Region.Show();

Return Value: None

Example:

Region.Show();

Region.Invalidate()

Description: Refreshes the drawing canvas to update the display

Syntax: await Region.Invalidate();

Return Value: None

Example:

Region.Invalidate();

Region.Hide()

Description: Hides the current selection shape from view

Syntax: await Region.Hide();

Return Value: None

Example:

Region.Hide();

Selection Shape Inspection

Region.IsNone()

Description: Checks if no selection shape is currently active

Syntax: const result = await Region.IsNone();

Return Value: Boolean

Example:

let hasNoSelection ;= Region.IsNone();

Region.IsLine()

Description: Checks if current selection shape is a line

Syntax: const result = await Region.IsLine();

Return Value: Boolean

Example:

let isLineShape ;= Region.IsLine();

Region.IsRectangle()

Description: Checks if current selection shape is a rectangle

Syntax: const result = await Region.IsRectangle();

Return Value: Boolean

Example:

let isRectShape ;= Region.IsRectangle();

Region.IsCircle()

Description: Checks if current selection shape is a circle

Syntax: const result = await Region.IsCircle();

Return Value: Boolean

Example:

let isCircleShape ;= Region.IsCircle();

Region.IsPolygon()

Description: Checks if current selection shape is a polygon

Syntax: const result = await Region.IsPolygon();

Return Value: Boolean

Example:

let isPolyShape ;= Region.IsPolygon();

Region.IsPath()

Description: Checks if current selection shape is a freehand path

Syntax: const result = await Region.IsPath();

Return Value: Boolean

Example:

let isPathShape ;= Region.IsPath();

Region.IsBitmapMask()

Description: Checks if current selection is a bitmap mask

Syntax: const result = await Region.IsBitmapMask();

Return Value: Boolean

Example:

let isMask ;= Region.IsBitmapMask();

Region.GetShape()

Description: Returns the name of the current selection shape type

Syntax: const result = await Region.GetShape();

Return Value: String

Example:

let currentShape ;= Region.GetShape();

Shape Setup Actions

Region.SetLine(x1, y1, x2, y2)

Description: Creates a line selection between two points

Syntax: await Region.SetLine(x1, y1, x2, y2);

Parameter Description
x1 (Integer) Starting X coordinate
y1 (Integer) Starting Y coordinate
x2 (Integer) Ending X coordinate
y2 (Integer) Ending Y coordinate

Return Value: None

Example:

Region.SetLine(10, 10, 100, 100);

Region.SetRectangle(left, top, right, bottom)

Description: Creates a rectangular selection from left-top to right-bottom

Syntax: await Region.SetRectangle(left, top, right, bottom);

Parameter Description
left (Integer) Left bound X coordinate
top (Integer) Top bound Y coordinate
right (Integer) Right bound X coordinate
bottom (Integer) Bottom bound Y coordinate

Return Value: None

Example:

Region.SetRectangle(50, 50, 200, 200);

Region.SetCircle(left, top, right, bottom)

Description: Creates a circular selection from bounding rectangle

Syntax: await Region.SetCircle(left, top, right, bottom);

Parameter Description
left (Integer) Left bound X coordinate
top (Integer) Top bound Y coordinate
right (Integer) Right bound X coordinate
bottom (Integer) Bottom bound Y coordinate

Return Value: None

Example:

Region.SetCircle(50, 50, 200, 200);

Region.SetPolygon(coords)

Description: Creates a polygonal selection from coordinate array

Syntax: await Region.SetPolygon(coords);

Parameter Description
coords (Integer()) Array of point coordinates (X,Y pairs)

Return Value: None

Example:

let points;() As Integer = {10, 10, 50, 100, 90, 10};
Region.SetPolygon(points);

Region.SetPath(coords)

Description: Creates a freehand path selection from coordinate array

Syntax: await Region.SetPath(coords);

Parameter Description
coords (Integer()) Array of point coordinates (X,Y pairs)

Return Value: None

Example:

let pathPts;() As Integer = {0, 0, 20, 30, 40, 80};
Region.SetPath(pathPts);

Boundary Coordinates

Region.GetBoundaryLeft()

Description: Returns the left coordinate of selection boundary

Syntax: const result = await Region.GetBoundaryLeft();

Return Value: Integer

Example:

let leftX ;= Region.GetBoundaryLeft();

Region.GetBoundaryTop()

Description: Returns the top coordinate of selection boundary

Syntax: const result = await Region.GetBoundaryTop();

Return Value: Integer

Example:

let topY ;= Region.GetBoundaryTop();

Region.GetBoundaryRight()

Description: Returns the right coordinate of selection boundary

Syntax: const result = await Region.GetBoundaryRight();

Return Value: Integer

Example:

let rightX ;= Region.GetBoundaryRight();

Region.GetBoundaryBottom()

Description: Returns the bottom coordinate of selection boundary

Syntax: const result = await Region.GetBoundaryBottom();

Return Value: Integer

Example:

let bottomY ;= Region.GetBoundaryBottom();

Region.GetRectangleLeft()

Description: Returns the left coordinate of rectangle selection

Syntax: const result = await Region.GetRectangleLeft();

Return Value: Integer

Example:

let leftX ;= Region.GetRectangleLeft();

Region.GetRectangleTop()

Description: Returns the top coordinate of rectangle selection

Syntax: const result = await Region.GetRectangleTop();

Return Value: Integer

Example:

let topY ;= Region.GetRectangleTop();

Region.GetRectangleRight()

Description: Returns the right coordinate of rectangle selection

Syntax: const result = await Region.GetRectangleRight();

Return Value: Integer

Example:

let rightX ;= Region.GetRectangleRight();

Region.GetRectangleBottom()

Description: Returns the bottom coordinate of rectangle selection

Syntax: const result = await Region.GetRectangleBottom();

Return Value: Integer

Example:

let bottomY ;= Region.GetRectangleBottom();

Selection State & Mode Control

Region.IsAllRegionSelected()

Description: Checks if the entire region is selected

Syntax: const result = await Region.IsAllRegionSelected();

Return Value: Boolean

Example:

let isAll ;= Region.IsAllRegionSelected();

Region.GetSelectMode()

Description: Returns the current selection mode (None, Adding, or Subtracting)

Syntax: const result = await Region.GetSelectMode();

Return Value: String

Example:

let currentMode ;= Region.GetSelectMode();

Region.SetSelectMode(modeName)

Description: Sets the selection mode (None, Adding, or Subtracting)

Syntax: await Region.SetSelectMode(modeName);

Parameter Description
modeName (String) Mode string ("none", "add", "subtract")

Return Value: None

Example:

Region.SetSelectMode("add");

Mask Image Operations

Region.GetBinaryMaskImage()

Description: Extracts the current selection as a binary mask image

Syntax: const result = await Region.GetBinaryMaskImage();

Return Value: Bitmap

Example:

let maskBmp As Bitmap ;= Region.GetBinaryMaskImage();

Region.SetBinaryMaskImage(maskBmp)

Description: Sets a binary mask image as the current selection

Syntax: await Region.SetBinaryMaskImage(maskBmp);

Parameter Description
maskBmp (Bitmap) RGB24 binary mask image

Return Value: None

Example:

Region.SetBinaryMaskImage(myMaskBmp);

Region.AddMaskImage(appendBmp, offsetX, offsetY)

Description: Adds pixels to mask using binary image addition

Syntax: await Region.AddMaskImage(appendBmp, offsetX, offsetY);

Parameter Description
appendBmp (Bitmap) Binary image containing region to add
offsetX (Integer, Optional) Horizontal pixel offset
offsetY (Integer, Optional) Vertical pixel offset

Return Value: None

Example:

Region.AddMaskImage(addBmp, 10, 10);

Region.SubtractMaskImage(subtractBmp, offsetX, offsetY)

Description: Removes pixels from mask using binary image subtraction

Syntax: await Region.SubtractMaskImage(subtractBmp, offsetX, offsetY);

Parameter Description
subtractBmp (Bitmap) Binary image containing region to remove
offsetX (Integer, Optional) Horizontal pixel offset
offsetY (Integer, Optional) Vertical pixel offset

Return Value: None

Example:

Region.SubtractMaskImage(subBmp, 0, 0);

Mask Shape Addition & Subtraction

Region.AddRectangle(left, top, right, bottom)

Description: =======================================================================

Syntax: await Region.AddRectangle(left, top, right, bottom);

Parameter Description
left (Integer) Left bound X coordinate
top (Integer) Top bound Y coordinate
right (Integer) Right bound X coordinate
bottom (Integer) Bottom bound Y coordinate

Return Value: None

Example:

Region.AddRectangle(10, 10, 100, 100);

Region.AddCircle(left, top, right, bottom)

Description: Adds a circular region to the current multi-ROI selection

Syntax: await Region.AddCircle(left, top, right, bottom);

Parameter Description
left (Integer) Left bound X coordinate
top (Integer) Top bound Y coordinate
right (Integer) Right bound X coordinate
bottom (Integer) Bottom bound Y coordinate

Return Value: None

Example:

Region.AddCircle(50, 50, 150, 150);

Region.AddPolygon(coords)

Description: Adds a polygonal region to the current multi-ROI selection

Syntax: await Region.AddPolygon(coords);

Parameter Description
coords (Integer()) Array of polygon vertices (X,Y pairs)

Return Value: None

Example:

let pts;() As Integer = {0, 0, 100, 0, 50, 100};
Region.AddPolygon(pts);

Region.RemoveRectangle(left, top, right, bottom)

Description: Removes a rectangular region from the current multi-ROI selection

Syntax: await Region.RemoveRectangle(left, top, right, bottom);

Parameter Description
left (Integer) Left bound X coordinate
top (Integer) Top bound Y coordinate
right (Integer) Right bound X coordinate
bottom (Integer) Bottom bound Y coordinate

Return Value: None

Example:

Region.RemoveRectangle(20, 20, 80, 80);

Region.RemoveCircle(left, top, right, bottom)

Description: Removes a circular region from the current multi-ROI selection

Syntax: await Region.RemoveCircle(left, top, right, bottom);

Parameter Description
left (Integer) Left bound X coordinate
top (Integer) Top bound Y coordinate
right (Integer) Right bound X coordinate
bottom (Integer) Bottom bound Y coordinate

Return Value: None

Example:

Region.RemoveCircle(60, 60, 140, 140);

Region.RemovePolygon(coords)

Description: Removes a polygonal region from the current multi-ROI selection

Syntax: await Region.RemovePolygon(coords);

Parameter Description
coords (Integer()) Array of polygon vertices (X,Y pairs)

Return Value: None

Example:

let pts;() As Integer = {10, 10, 50, 10, 30, 50};
Region.RemovePolygon(pts);

4. UI (ScriptUIHelper)

Execution & Event Control

UI.IsCancelled()

Description: Gets a boolean value indicating whether script execution cancellation has been requested.

Syntax: const result = await UI.IsCancelled();

Return Value: Boolean

Example:

If UI.IsCancelled Then Exit Sub;

UI.YieldEvents()

Description: Yields execution to allow Windows Forms message processing and prevents the UI from freezing during long-running script loops.

Syntax: await UI.YieldEvents();

Return Value: None

Example:

UI.YieldEvents();

Dialogs & Clipboard Actions

UI.MsgBox(prompt, buttons, title)

Description: Displays a modal message box dialog with customizable buttons and title bar text, returning the user button selection.

Syntax: const result = await UI.MsgBox(prompt, buttons, title);

Parameter Description
prompt (Object) Message prompt text or object to display
buttons (Object, Optional) MsgBoxStyle button and icon options
title (Object, Optional) Title bar text for the message box dialog

Return Value: Integer

Example:

let btnResult ;= UI.MsgBox("Do you want to continue?", 36, "Confirmation");

UI.CopyToClipboard(text)

Description: Copies the given text to the Windows system clipboard safely from any thread.

Syntax: await UI.CopyToClipboard(text);

Parameter Description
text (Object) Text or object content to copy to clipboard

Return Value: None

Example:

UI.CopyToClipboard("Result Data String");