PhenoCapture Scripting API Reference (VBScript / Visual Basic)
Welcome to the complete PhenoCapture Scripting API Reference (VBScript / Visual Basic). Click on any of the class headers below to reveal its function list, and click on any function name to view its full syntax, parameter type table, return value, and code examples.
1. Action Object (ScriptActionHelper)
The Action object provides programmatic access to all core image processing filters, AI neural operations, color channel manipulations, workspace file operations, hardware capture triggers, and batch analysis functions in PhenoCapture.
System & Workspace Actions
Action.ActivateUndoEngine() – Activates the undo history engine on the active workspace canvas
Description: Activates the undo history engine on the active workspace canvas.
Syntax: Call Action.ActivateUndoEngine()
Parameters: None
Return Value: None
VBScript / Visual Basic Example:
Call Action.ActivateUndoEngine()
Action.DeactivateUndoEngine() – Deactivates the undo history engine on the active workspace canvas
Description: Deactivates the undo history engine on the active workspace canvas.
Syntax: Call Action.DeactivateUndoEngine()
Parameters: None
Return Value: None
VBScript / Visual Basic Example:
Call Action.DeactivateUndoEngine()
Action.SaveWorkspaceAs() – Opens a dialog to save the entire current workspace
Description: Opens a dialog to save the entire current workspace.
Syntax: Call Action.SaveWorkspaceAs()
Parameters: None
Return Value: None
VBScript / Visual Basic Example:
Call Action.SaveWorkspaceAs()
Action.SaveWorkspaceSelectionAs() – Opens a dialog to save the currently selected area of the workspace
Description: Opens a dialog to save the currently selected area of the workspace.
Syntax: Call Action.SaveWorkspaceSelectionAs()
Parameters: None
Return Value: None
VBScript / Visual Basic Example:
Call Action.SaveWorkspaceSelectionAs()
Action.SaveImage(sourceBitmap, destFileName, jpegQuality) – Writes a GDI+ bitmap object directly to a specified file path on disk with custom JPEG quality settings
Description: Writes a GDI+ bitmap object directly to a specified file path on disk with custom JPEG quality settings.
Syntax: errMsg = 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
VBScript / Visual Basic Example:
Dim img, errStr
img = Action.GetImage(0)
errStr = Action.SaveImage(img, "C:\Output\Result.jpg", 95)
Action.SaveImageDialog(targetBitmap, selectedExtension, selectedQuality) – Opens a save image dialog with the specified bitmap, extension, and quality
Description: Opens a save image dialog with the specified bitmap, extension, and quality.
Syntax: Call 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
VBScript / Visual Basic Example:
Call Action.SaveImageDialog(img, "jpg", 90)
Action.SaveImageAction(outputFolder, prefix, suffix, formatType, quality) – Executes a save image action based on specified folder, prefix, suffix, and formatting options
Description: Executes a save image action based on specified folder, prefix, suffix, and formatting options.
Syntax: result = 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
VBScript / Visual Basic Example:
Dim success = Action.SaveImageAction("C:\Data", "Exp1_", "_Out", 2, 100)
Edit & Selection Actions
Action.ExpandSelection(expandByPixels) – Expands the current selection by a specified number of pixels
Description: Expands the current selection by a specified number of pixels.
Syntax: result = Action.ExpandSelection([expandByPixels])
| Parameter | Description |
|---|---|
expandByPixels (Integer, Optional) |
Number of pixels to expand |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.ExpandSelection(10)
Action.ShrinkSelection(shrinkByPixels) – Shrinks the current selection by a specified number of pixels
Description: Shrinks the current selection by a specified number of pixels.
Syntax: result = Action.ShrinkSelection([shrinkByPixels])
| Parameter | Description |
|---|---|
shrinkByPixels (Integer, Optional) |
Number of pixels to shrink |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.ShrinkSelection(10)
Action.PutToImageBuffer(targetLocation) – Puts the current image to a specified buffer location
Description: Puts the current image to a specified buffer location.
Syntax: result = Action.PutToImageBuffer([targetLocation])
| Parameter | Description |
|---|---|
targetLocation (Integer, Optional) |
Buffer location index |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.PutToImageBuffer(2)
Action.GetFromImageBuffer(sourceLocation) – Retrieves an image from a specified buffer location
Description: Retrieves an image from a specified buffer location.
Syntax: result = Action.GetFromImageBuffer([sourceLocation])
| Parameter | Description |
|---|---|
sourceLocation (Integer, Optional) |
Buffer location index |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.GetFromImageBuffer(2)
Action.Copy() – Copies the current selection to the clipboard
Description: Copies the current selection to the clipboard.
Syntax: result = Action.Copy()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.Copy()
Action.Paste() – Pastes the contents of the clipboard into the workspace
Description: Pastes the contents of the clipboard into the workspace.
Syntax: result = Action.Paste()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.Paste()
Action.Unselect() – Clears the active selection
Description: Clears the active selection.
Syntax: result = Action.Unselect()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.Unselect()
Image Transforms & Filters
Action.BoxAveraging(kernelSize) – Applies a box averaging blur filter
Description: Applies a box averaging blur filter.
Syntax: result = Action.BoxAveraging([kernelSize])
| Parameter | Description |
|---|---|
kernelSize (Integer, Optional) |
Size of the filter kernel |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.BoxAveraging(5)
Action.GaussianFilter(kernelSize) – Applies a Gaussian blur filter
Description: Applies a Gaussian blur filter.
Syntax: result = Action.GaussianFilter([kernelSize])
| Parameter | Description |
|---|---|
kernelSize (Integer, Optional) |
Size of the Gaussian kernel |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.GaussianFilter(5)
Action.FlipVertically() – Flips the image vertically
Description: Flips the image vertically.
Syntax: result = Action.FlipVertically()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.FlipVertically()
Action.FlipHorizontally() – Flips the image horizontally
Description: Flips the image horizontally.
Syntax: result = Action.FlipHorizontally()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.FlipHorizontally()
Action.Sharpen3x3() – Applies a basic 3×3 sharpening filter
Description: Applies a basic 3×3 sharpening filter.
Syntax: result = Action.Sharpen3x3()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.Sharpen3x3()
Action.Sharpen5x5HighQuality(sharpenStrengthPercentage) – Applies a high-quality 5×5 sharpening filter
Description: Applies a high-quality 5×5 sharpening filter.
Syntax: result = Action.Sharpen5x5HighQuality([sharpenStrengthPercentage])
| Parameter | Description |
|---|---|
sharpenStrengthPercentage (Integer, Optional) |
Strength of sharpening (percentage) |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.Sharpen5x5HighQuality(20)
Action.AdvancedSharpening(sharpenAmountPercentage) – Applies an advanced sharpening algorithm
Description: Applies an advanced sharpening algorithm.
Syntax: result = Action.AdvancedSharpening([sharpenAmountPercentage])
| Parameter | Description |
|---|---|
sharpenAmountPercentage (Integer, Optional) |
Amount of sharpening (percentage) |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.AdvancedSharpening(150)
Action.SmartDenoise(radius, threshold) – Reduces noise in the image while preserving edges
Description: Reduces noise in the image while preserving edges.
Syntax: result = Action.SmartDenoise([radius], [threshold])
| Parameter | Description |
|---|---|
radius (Integer, Optional) |
Radius for noise reduction |
threshold (Integer, Optional) |
Threshold for noise detection |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.SmartDenoise(7, 40)
Action.Emboss(angle, distance, strength, bias) – Applies an embossing effect to the image
Description: Applies an embossing effect to the image.
Syntax: result = 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
VBScript / Visual Basic Example:
Dim success = Action.Emboss(45.0F, 2, 150, 128)
Action.Dithering(ditheringAlgorithmType) – Applies a dithering algorithm to reduce color banding
Description: Applies a dithering algorithm to reduce color banding.
Syntax: result = Action.Dithering([ditheringAlgorithmType])
| Parameter | Description |
|---|---|
ditheringAlgorithmType (Integer, Optional) |
Type of dithering algorithm |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.Dithering(1)
Action.MosaicFilter(mosaicModeType, value) – Applies a mosaic/pixelation filter to the image
Description: Applies a mosaic/pixelation filter to the image.
Syntax: result = Action.MosaicFilter([mosaicModeType], [value])
| Parameter | Description |
|---|---|
mosaicModeType (Integer, Optional) |
Mosaic mode selection |
value (Integer, Optional) |
Block size or intensity |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.MosaicFilter(0, 15)
Action.RotationalAlignmentByLine(backgroundColorRed, backgroundColorGreen, backgroundColorBlue) – Automatically aligns rotation based on detected lines
Description: Automatically aligns rotation based on detected lines.
Syntax: result = 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
VBScript / Visual Basic Example:
Dim success = Action.RotationalAlignmentByLine(0, 0, 0)
Action.Resize(resizeUnitType, maintainAspectRatio, baseDimensionType, targetWidth, targetHeight, interpolationAlgorithmType) – Resizes the image using specified dimensions and interpolation
Description: Resizes the image using specified dimensions and interpolation.
Syntax: result = 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
VBScript / Visual Basic Example:
Dim success = Action.Resize(0, True, 0, 1024, 768, 4)
Action.Rotate(rotationAngleDegrees, rotationDirectionType, backgroundColorRed, backgroundColorGreen, backgroundColorBlue) – Rotates the image by a specific angle
Description: Rotates the image by a specific angle.
Syntax: result = 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
VBScript / Visual Basic Example:
Dim success = Action.Rotate(45.5F, 1, 255, 255, 255)
Action.Crop(cropWidthPixels, cropHeightPixels, startXCoordinate, startYCoordinate) – Crops the image to a defined rectangle
Description: Crops the image to a defined rectangle.
Syntax: result = 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
VBScript / Visual Basic Example:
Dim success = Action.Crop(200, 200, 50, 50)
Action.ResizeCanvas(resizeUnitType, maintainAspectRatio, baseDimensionType, targetWidth, targetHeight, canvasAlignmentType, backgroundColorRed, backgroundColorGreen, backgroundColorBlue) – Resizes the canvas without scaling the image content
Description: Resizes the canvas without scaling the image content.
Syntax: result = 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
VBScript / Visual Basic Example:
Dim success = Action.ResizeCanvas(0, False, 0, 1920, 1080, 4, 0, 0, 0)
Action.OverlayImage(sourceLocation1, sourceLocation2, targetColorRed, targetColorGreen, targetColorBlue, opacity, enableFeathering, featheringRadius) – Overlays one image on top of another with opacity and feathering controls
Description: Overlays one image on top of another with opacity and feathering controls.
Syntax: result = Action.OverlayImage([sourceLocation1], [sourceLocation2], [targetColorRed], [targetColorGreen], [targetColorBlue], [opacity], [enableFeathering], [featheringRadius])
| 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 |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.OverlayImage(1, 0, 255, 255, 255, 50, True, 15)
Action.ChromaKeyOverlay(sourceLocation1, targetColorRed, targetColorGreen, targetColorBlue, sourceLocation2, opacity, enableFeathering, featheringRadius) – Applies a chroma key effect to blend two images based on a target color
Description: Applies a chroma key effect to blend two images based on a target color.
Syntax: result = 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
VBScript / Visual Basic Example:
Dim success = Action.ChromaKeyOverlay(1, 0, 255, 0, 0, 100, True, 20)
Color & Channel Actions
Action.SplitRGB(rgbSplitChannelType) – Splits the image and keeps the specified RGB channel
Description: Splits the image and keeps the specified RGB channel.
Syntax: result = Action.SplitRGB([rgbSplitChannelType])
| Parameter | Description |
|---|---|
rgbSplitChannelType (Integer, Optional) |
RGB channel to isolate |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.SplitRGB(1)
Action.DeleteChannel(channelToDeleteType) – Removes a specific color channel from the image
Description: Removes a specific color channel from the image.
Syntax: result = Action.DeleteChannel([channelToDeleteType])
| Parameter | Description |
|---|---|
channelToDeleteType (Integer, Optional) |
Color channel to remove |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.DeleteChannel(2)
Action.GrayFrom(sourceChannelType) – Creates a grayscale image based on a specific color channel
Description: Creates a grayscale image based on a specific color channel.
Syntax: result = Action.GrayFrom([sourceChannelType])
| Parameter | Description |
|---|---|
sourceChannelType (Integer, Optional) |
Source color channel |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.GrayFrom(1)
Action.Invert() – Inverts the colors of the image
Description: Inverts the colors of the image.
Syntax: result = Action.Invert()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.Invert()
Action.GrayScaling() – Converts the image to standard grayscale
Description: Converts the image to standard grayscale.
Syntax: result = Action.GrayScaling()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.GrayScaling()
Action.ConvertToRgChrom() – Converts the image to rg chromaticity space
Description: Converts the image to rg chromaticity space.
Syntax: result = Action.ConvertToRgChrom()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.ConvertToRgChrom()
Action.GrayToColor(mapType, isReversed) – Applies a pseudocolor map to a grayscale image
Description: Applies a pseudocolor map to a grayscale image.
Syntax: result = Action.GrayToColor([mapType], [isReversed])
| Parameter | Description |
|---|---|
mapType (Integer, Optional) |
Type of color map |
isReversed (Boolean, Optional) |
Reverse the color map |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.GrayToColor(3, True)
Action.AutoTone(clipPercentage) – Automatically adjusts the tonal range of the image
Description: Automatically adjusts the tonal range of the image.
Syntax: result = Action.AutoTone([clipPercentage])
| Parameter | Description |
|---|---|
clipPercentage (Single, Optional) |
Percentage of pixels to clip |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.AutoTone(0.1F)
Action.AutoContrast(clipPercentage) – Automatically adjusts the contrast of the image
Description: Automatically adjusts the contrast of the image.
Syntax: result = Action.AutoContrast([clipPercentage])
| Parameter | Description |
|---|---|
clipPercentage (Single, Optional) |
Percentage of pixels to clip |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.AutoContrast(0.2F)
Action.AutoEqualize() – Applies automatic histogram equalization
Description: Applies automatic histogram equalization.
Syntax: result = Action.AutoEqualize()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.AutoEqualize()
Action.AutoGamma() – Automatically corrects the gamma curve of the image
Description: Automatically corrects the gamma curve of the image.
Syntax: result = Action.AutoGamma()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.AutoGamma()
Action.AutoWhiteBalance() – Automatically adjusts the white balance to correct color casts
Description: Automatically adjusts the white balance to correct color casts.
Syntax: result = Action.AutoWhiteBalance()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.AutoWhiteBalance()
Action.AutoShadowsHighlights(shadowCorrectionStrengthPercentage, highlightCorrectionStrengthPercentage) – Adjusts shadow and highlight details automatically
Description: Adjusts shadow and highlight details automatically.
Syntax: result = Action.AutoShadowsHighlights([shadowCorrectionStrengthPercentage], [highlightCorrectionStrengthPercentage])
| Parameter | Description |
|---|---|
shadowCorrectionStrengthPercentage (Single, Optional) |
Strength of shadow recovery |
highlightCorrectionStrengthPercentage (Single, Optional) |
Strength of highlight recovery |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.AutoShadowsHighlights(60.0F, 20.0F)
Action.AdaptiveContrast(contrastStrengthPercentage, gridTilesX, gridTilesY, contrastClipLimit) – Applies local adaptive contrast enhancement
Description: Applies local adaptive contrast enhancement.
Syntax: result = 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
VBScript / Visual Basic Example:
Dim success = Action.AdaptiveContrast(30, 4, 4, 2.0F)
Action.CorrectUnevenIllumination(illuminationGridSize) – Corrects uneven background illumination
Description: Corrects uneven background illumination.
Syntax: result = Action.CorrectUnevenIllumination([illuminationGridSize])
| Parameter | Description |
|---|---|
illuminationGridSize (Integer, Optional) |
Grid size for illumination estimation |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.CorrectUnevenIllumination(16)
Action.RollingBallBackgroundSubtraction(rollingBallBoxSize, isObjectColorAutomatic, manualObjectColorType) – Subtracts background using a rolling ball algorithm
Description: Subtracts background using a rolling ball algorithm.
Syntax: result = 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
VBScript / Visual Basic Example:
Dim success = Action.RollingBallBackgroundSubtraction(100, False, 1)
Action.BrightContrast(brightnessLevel, contrastLevel, autoBrightness) – Adjusts brightness and contrast levels manually or automatically
Description: Adjusts brightness and contrast levels manually or automatically.
Syntax: result = 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
VBScript / Visual Basic Example:
Dim success = Action.BrightContrast(10, 20, False)
Action.ChangeColor(sourceColorRed, sourceColorGreen, sourceColorBlue, targetColorRed, targetColorGreen, targetColorBlue) – Replaces a specific source color with a target color
Description: Replaces a specific source color with a target color.
Syntax: result = 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
VBScript / Visual Basic Example:
Dim success = Action.ChangeColor(255, 0, 0, 0, 255, 0)
Action.CIELab(lightnessShift, aAxisShift, bAxisShift) – Adjusts colors in the CIE L*a*b* color space
Description: Adjusts colors in the CIE L*a*b* color space.
Syntax: result = 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
VBScript / Visual Basic Example:
Dim success = Action.CIELab(10, -5, 5)
Action.MultibandColor(rSat, rInt, ySat, yInt, gSat, gInt, cyanSat, cyanInt, bSat, bInt, mSat, mInt) – Adjusts saturation and intensity across multiple color bands
Description: Adjusts saturation and intensity across multiple color bands.
Syntax: result = 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
VBScript / Visual Basic Example:
Dim success = Action.MultibandColor(10, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Action.HueSaturationIntensity(hue, saturation, intensity) – Adjusts global hue, saturation, and intensity
Description: Adjusts global hue, saturation, and intensity.
Syntax: result = 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
VBScript / Visual Basic Example:
Dim success = Action.HueSaturationIntensity(15, 20, 10)
Action.MergeChannels(colorSpaceType, image1Source, image2Source, image3Source) – Merges separate image sources into a single color space representation
Description: Merges separate image sources into a single color space representation.
Syntax: result = 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
VBScript / Visual Basic Example:
Dim success = Action.MergeChannels(0, 1, 2, 3)
Processing & Morphological Actions
Action.FillRegion(fillRegionType, fillColorRed, fillColorGreen, fillColorBlue, fillOpacityPercentage) – Fills a specified region with color and opacity
Description: Fills a specified region with color and opacity.
Syntax: result = 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
VBScript / Visual Basic Example:
Dim success = Action.FillRegion(1, 255, 0, 0, 50)
Action.DrawSelectionBorder(borderColorRed, borderColorGreen, borderColorBlue, borderThicknessPixels, borderOpacityPercentage, applyToMultipleROIs) – Draws a border around the current selection
Description: Draws a border around the current selection.
Syntax: result = 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
VBScript / Visual Basic Example:
Dim success = Action.DrawSelectionBorder(255, 255, 0, 2, 100, True)
Action.HideOutlines(targetColorRed, targetColorGreen, targetColorBlue, useMostFrequentColor) – Hides drawn outlines by blending them with a target color or most frequent color
Description: Hides drawn outlines by blending them with a target color or most frequent color.
Syntax: result = 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
VBScript / Visual Basic Example:
Dim success = Action.HideOutlines(0, 0, 0, False)
Action.ChangeNonBlackToWhite() – Converts all non-black pixels in the image to white
Description: Converts all non-black pixels in the image to white.
Syntax: result = Action.ChangeNonBlackToWhite()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.ChangeNonBlackToWhite()
Action.Erode(morphologyKernelSize) – Applies morphological erosion
Description: Applies morphological erosion.
Syntax: result = Action.Erode([morphologyKernelSize])
| Parameter | Description |
|---|---|
morphologyKernelSize (Integer, Optional) |
Size of morphology kernel |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.Erode(5)
Action.Dilate(morphologyKernelSize) – Applies morphological dilation
Description: Applies morphological dilation.
Syntax: result = Action.Dilate([morphologyKernelSize])
| Parameter | Description |
|---|---|
morphologyKernelSize (Integer, Optional) |
Size of morphology kernel |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.Dilate(5)
Action.EdgeDetection(edgeDetectionAlgorithmType) – Detects edges using specified standard algorithms
Description: Detects edges using specified standard algorithms.
Syntax: result = Action.EdgeDetection([edgeDetectionAlgorithmType])
| Parameter | Description |
|---|---|
edgeDetectionAlgorithmType (Integer, Optional) |
Edge detection algorithm mode |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.EdgeDetection(1)
Action.CannyEdge(cannyHighThreshold) – Detects edges using the Canny edge detection method
Description: Detects edges using the Canny edge detection method.
Syntax: result = Action.CannyEdge([cannyHighThreshold])
| Parameter | Description |
|---|---|
cannyHighThreshold (Integer, Optional) |
High threshold for Canny detection |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.CannyEdge(150)
Action.Skeletonize() – Applies morphological skeletonization (thinning)
Description: Applies morphological skeletonization (thinning).
Syntax: result = Action.Skeletonize()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.Skeletonize()
Action.SkeletonizeExtended() – Applies extended morphological skeletonization
Description: Applies extended morphological skeletonization.
Syntax: result = Action.SkeletonizeExtended()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.SkeletonizeExtended()
Action.BoundaryDetection(boundaryOverlayModeType) – Detects boundaries of objects based on overlay modes
Description: Detects boundaries of objects based on overlay modes.
Syntax: result = Action.BoundaryDetection([boundaryOverlayModeType])
| Parameter | Description |
|---|---|
boundaryOverlayModeType (Integer, Optional) |
Mode for boundary processing |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.BoundaryDetection(1)
Action.RemoveBlackDots(maxDotSize) – Removes isolated black dots (noise) below a certain size
Description: Removes isolated black dots (noise) below a certain size.
Syntax: result = Action.RemoveBlackDots([maxDotSize])
| Parameter | Description |
|---|---|
maxDotSize (Integer, Optional) |
Maximum size of dots to remove |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.RemoveBlackDots(3)
Action.RemoveWhiteDots(maxDotSize) – Removes isolated white dots (noise) below a certain size
Description: Removes isolated white dots (noise) below a certain size.
Syntax: result = Action.RemoveWhiteDots([maxDotSize])
| Parameter | Description |
|---|---|
maxDotSize (Integer, Optional) |
Maximum size of dots to remove |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.RemoveWhiteDots(3)
Action.Outline() – Extracts the outlines of binary objects
Description: Extracts the outlines of binary objects.
Syntax: result = Action.Outline()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.Outline()
Action.ErodeOutline() – Erodes only the outlined regions
Description: Erodes only the outlined regions.
Syntax: result = Action.ErodeOutline()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.ErodeOutline()
Action.DilateOutline() – Dilates only the outlined regions
Description: Dilates only the outlined regions.
Syntax: result = Action.DilateOutline()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.DilateOutline()
Action.ManualThresholding(binarizationThresholdValue) – Applies binarization using a manually defined threshold
Description: Applies binarization using a manually defined threshold.
Syntax: result = Action.ManualThresholding([binarizationThresholdValue])
| Parameter | Description |
|---|---|
binarizationThresholdValue (Integer, Optional) |
Threshold value (0-255) |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.ManualThresholding(150)
Action.MultiStepThresholding(redChannelLevels, greenChannelLevels, blueChannelLevels) – Applies multi-level thresholding across RGB channels
Description: Applies multi-level thresholding across RGB channels.
Syntax: result = 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
VBScript / Visual Basic Example:
Dim success = Action.MultiStepThresholding(3, 3, 3)
Action.DifferentialImage(firstImageSourceLocation, secondImageSourceLocation) – Calculates the difference between two images
Description: Calculates the difference between two images.
Syntax: result = 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
VBScript / Visual Basic Example:
Dim success = Action.DifferentialImage(1, 2)
Action.WatershedSegmentation(minDistanceThreshold, smoothingRadius, boundaryThickness, boundaryColorRed, boundaryColorGreen, boundaryColorBlue) – Applies watershed segmentation algorithm
Description: Applies watershed segmentation algorithm.
Syntax: result = 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
VBScript / Visual Basic Example:
Dim success = Action.WatershedSegmentation(15, 5, 2, 0, 255, 0)
Action.BinaryOperation(logicalOperationType, firstImageSourceLocation, secondImageSourceLocation) – Performs logical operations between two binary images
Description: Performs logical operations between two binary images.
Syntax: result = 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
VBScript / Visual Basic Example:
Dim success = Action.BinaryOperation(1, 0, 2)
Action.AdaptiveThresholding(adaptiveBoxSize, adaptiveThresholdLevel, isObjectColorAutomatic, manualObjectColorType) – Applies local adaptive thresholding for binarization
Description: Applies local adaptive thresholding for binarization.
Syntax: result = 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
VBScript / Visual Basic Example:
Dim success = Action.AdaptiveThresholding(100, 90, False, 1)
Action.RegionColoring(connectivity) – Colors separated contiguous regions differently
Description: Colors separated contiguous regions differently.
Syntax: result = Action.RegionColoring([connectivity])
| Parameter | Description |
|---|---|
connectivity (Integer, Optional) |
Pixel connectivity (4 or 8) |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.RegionColoring(4)
Action.SuperPixelSegmentation(numSuperpixels, compactness, fillWithWhite) – Segments the image into superpixels
Description: Segments the image into superpixels.
Syntax: result = 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
VBScript / Visual Basic Example:
Dim success = Action.SuperPixelSegmentation(500, 20.0F, True)
Hardware & Capture Actions
Action.Capture() – Triggers hardware capture mechanism
Description: Triggers hardware capture mechanism.
Syntax: result = Action.Capture()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.Capture()
Action.AcquireImagefromScanner(useSilentMode) – Acquires an image from a connected scanner hardware
Description: Acquires an image from a connected scanner hardware.
Syntax: result = Action.AcquireImagefromScanner([useSilentMode])
| Parameter | Description |
|---|---|
useSilentMode (Boolean, Optional) |
Operate without showing scanner UI |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.AcquireImagefromScanner(False)
Neural & AI Processing Actions
Action.AIDepthEstimation(autoResizeLargeImages) – Estimates depth maps using AI
Description: Estimates depth maps using AI.
Syntax: result = Action.AIDepthEstimation([autoResizeLargeImages])
| Parameter | Description |
|---|---|
autoResizeLargeImages (Boolean, Optional) |
Automatically resize large inputs |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.AIDepthEstimation(False)
Action.AIDocumentUnwarping() – Unwarps distorted document images using AI
Description: Unwarps distorted document images using AI.
Syntax: result = Action.AIDocumentUnwarping()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.AIDocumentUnwarping()
Action.AIBinarizationSegmentation() – Segments text or structures via AI-based binarization
Description: Segments text or structures via AI-based binarization.
Syntax: result = Action.AIBinarizationSegmentation()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.AIBinarizationSegmentation()
Action.AIInpainting() – Inpaints missing or masked areas via AI
Description: Inpaints missing or masked areas via AI.
Syntax: result = Action.AIInpainting()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.AIInpainting()
Action.AIBackgroundRemovalSelfie(virtualBackgroundColorRed, virtualBackgroundColorGreen, virtualBackgroundColorBlue) – Removes backgrounds in selfie images and replaces with a color
Description: Removes backgrounds in selfie images and replaces with a color.
Syntax: result = 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
VBScript / Visual Basic Example:
Dim success = Action.AIBackgroundRemovalSelfie(0, 255, 0)
Action.AIImageSharpening(sharpenBoostFactor) – Sharpens images utilizing an AI model
Description: Sharpens images utilizing an AI model.
Syntax: result = Action.AIImageSharpening([sharpenBoostFactor])
| Parameter | Description |
|---|---|
sharpenBoostFactor (Single, Optional) |
Sharpening intensity factor |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.AIImageSharpening(3.0F)
Action.AIImageQualityRestorationFast(restorationBoostFactor) – Fast AI-based image quality restoration
Description: Fast AI-based image quality restoration.
Syntax: result = Action.AIImageQualityRestorationFast([restorationBoostFactor])
| Parameter | Description |
|---|---|
restorationBoostFactor (Single, Optional) |
Restoration boost multiplier |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.AIImageQualityRestorationFast(1.5F)
Action.AIImageQualityRestorationSlow() – Standard AI-based image quality restoration (slower)
Description: Standard AI-based image quality restoration (slower).
Syntax: result = Action.AIImageQualityRestorationSlow()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.AIImageQualityRestorationSlow()
Action.AIImageQualityRestorationSlowest() – High-quality, very slow AI-based restoration
Description: High-quality, very slow AI-based restoration.
Syntax: result = Action.AIImageQualityRestorationSlowest()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.AIImageQualityRestorationSlowest()
Action.AIImageQualityRestorationFastest() – Lowest-quality, extremely fast AI-based restoration
Description: Lowest-quality, extremely fast AI-based restoration.
Syntax: result = Action.AIImageQualityRestorationFastest()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.AIImageQualityRestorationFastest()
Action.AIBackgroundRemovalGeneral(virtualBackgroundColorRed, virtualBackgroundColorGreen, virtualBackgroundColorBlue) – General purpose AI background removal
Description: General purpose AI background removal.
Syntax: result = 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
VBScript / Visual Basic Example:
Dim success = Action.AIBackgroundRemovalGeneral(0, 0, 0)
Action.AIBackgroundRemovalPortrait(virtualBackgroundColorRed, virtualBackgroundColorGreen, virtualBackgroundColorBlue) – Portrait-optimized AI background removal
Description: Portrait-optimized AI background removal.
Syntax: result = 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
VBScript / Visual Basic Example:
Dim success = Action.AIBackgroundRemovalPortrait(0, 0, 0)
Action.AISmartSelection() – Selects main subjects intelligently using AI
Description: Selects main subjects intelligently using AI.
Syntax: result = Action.AISmartSelection()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.AISmartSelection()
Action.AIAutoSubjectSelectionGeneral() – Automatically outlines general subjects
Description: Automatically outlines general subjects.
Syntax: result = Action.AIAutoSubjectSelectionGeneral()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.AIAutoSubjectSelectionGeneral()
Action.AIAutoSubjectSelectionPortrait() – Automatically outlines portrait subjects
Description: Automatically outlines portrait subjects.
Syntax: result = Action.AIAutoSubjectSelectionPortrait()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.AIAutoSubjectSelectionPortrait()
Action.AIImageUpscaleRealESRGAN(upscaleMagnificationType) – Upscales images using Real-ESRGAN
Description: Upscales images using Real-ESRGAN.
Syntax: result = Action.AIImageUpscaleRealESRGAN([upscaleMagnificationType])
| Parameter | Description |
|---|---|
upscaleMagnificationType (Integer, Optional) |
Scale factor multiplier |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.AIImageUpscaleRealESRGAN(2)
Action.AIImageUpscaleRealESRFast() – Upscales images rapidly using a faster Real-ESR model
Description: Upscales images rapidly using a faster Real-ESR model.
Syntax: result = Action.AIImageUpscaleRealESRFast()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.AIImageUpscaleRealESRFast()
Data Extraction & Analysis Actions
Action.AverageColorValue(analysisTargetChannelType) – Calculates and returns the average color data from a specific channel
Description: Calculates and returns the average color data from a specific channel.
Syntax: dataStr = Action.AverageColorValue([analysisTargetChannelType])
| Parameter | Description |
|---|---|
analysisTargetChannelType (Integer, Optional) |
Target channel to analyze |
Return Value: String
VBScript / Visual Basic Example:
Dim val = Action.AverageColorValue(1)
Action.PixelCounter(targetColorRed, targetColorGreen, targetColorBlue, resultOutputFormatType) – Counts pixels matching a specific color threshold
Description: Counts pixels matching a specific color threshold.
Syntax: dataStr = 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
VBScript / Visual Basic Example:
Dim result = Action.PixelCounter(0, 0, 0, 1)
Action.MultiCellAnalysis(gridColumnsX, gridRowsY, cellShapeType, cellDiameterPixels, analysisModeType, analysisTargetChannelType, targetColorPresetName) – Performs grid-based cell counting or intensity analysis
Description: Performs grid-based cell counting or intensity analysis.
Syntax: dataStr = 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
VBScript / Visual Basic Example:
Dim result = Action.MultiCellAnalysis(10, 10, 1, 15, 0, 0, "Black")
Action.OCRTextExtraction() – Extracts text from the image using OCR (Optical Character Recognition)
Description: Extracts text from the image using OCR (Optical Character Recognition).
Syntax: extractedText = Action.OCRTextExtraction()
Parameters: None
Return Value: String
VBScript / Visual Basic Example:
Dim textData = Action.OCRTextExtraction()
Image Transfer Functions between Script Engine and PhenoCapture
Action.GetImage(sourceLocation) – Retrieves an image from the workspace or buffer array to the script engine
Description: Retrieves an image from the workspace or buffer array to the script engine.
Syntax: imgObj = Action.GetImage([sourceLocation])
| Parameter | Description |
|---|---|
sourceLocation (Integer, Optional) |
Image location index (0 = workspace) |
Return Value: Bitmap
VBScript / Visual Basic Example:
Dim myImg = Action.GetImage(0)
Action.SetImage(newImage, targetLocation) – Sends an image from the script engine to the workspace or buffer array
Description: Sends an image from the script engine to the workspace or buffer array.
Syntax: result = Action.SetImage(newImage, [targetLocation])
| Parameter | Description |
|---|---|
newImage (Bitmap) |
Source bitmap to send |
targetLocation (Integer, Optional) |
Target destination index (0 = workspace) |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim success = Action.SetImage(myImg, 0)
2. ImgProc Object (ScriptImgProcHelper)
The ImgProc object provides core image processing, segmentation, color space manipulation, filtering, and pixel-level matrix transformation capabilities in PhenoCapture.
Core Image & Buffer Pipeline
ImgProc.CloneImage(SourceImage) – Creates a deep copy duplicate of the source bitmap image
Description: Creates a deep copy duplicate of the source bitmap image.
Syntax: clonedImg = ImgProc.CloneImage(SourceImage)
| Parameter | Description |
|---|---|
SourceImage (Bitmap) |
Source bitmap image |
Return Value: Bitmap
VBScript / Visual Basic Example:
Dim copyBmp As Bitmap = ImgProc.CloneImage(srcBmp)
ImgProc.RemoveTransparency(SourceImage) – Removes alpha transparency channel from a bitmap, rendering it fully opaque
Description: Removes alpha transparency channel from a bitmap, rendering it fully opaque.
Syntax: opaqueImg = ImgProc.RemoveTransparency(SourceImage)
| Parameter | Description |
|---|---|
SourceImage (Bitmap) |
Source image with potential transparency |
Return Value: Bitmap
VBScript / Visual Basic Example:
Dim nonTransBmp As Bitmap = ImgProc.RemoveTransparency(srcBmp)
ImgProc.Generate_Canvas(nWidth, nHeight, BackColor) – Creates a blank canvas bitmap of specified dimensions filled with a background color
Description: Creates a blank canvas bitmap of specified dimensions filled with a background color.
Syntax: canvasImg = 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
VBScript / Visual Basic Example:
Dim canvas As Bitmap = ImgProc.Generate_Canvas(800, 600, Color.White)
Segmentation & Region Extraction
ImgProc.SuperPixelSegmentation(SourceImage, numSuperpixels, compactness, fillWithWhite, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Executes parallel superpixel segmentation (SLIC algorithm) on the source image
Description: Executes parallel superpixel segmentation (SLIC algorithm) on the source image.
Syntax: segmentedImg = 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
VBScript / Visual Basic Example:
Dim spImg As Bitmap = ImgProc.SuperPixelSegmentation(srcBmp, 500, 50.0F)
ImgProc.RegionExtract_FloodFill4(SourceImage, LabelIDMap, RegionColorTable, BkColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Extracts connected regions using 4-connectivity flood fill algorithm and builds label ID maps
Description: Extracts connected regions using 4-connectivity flood fill algorithm and builds label ID maps.
Syntax: labeledImg = 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
VBScript / Visual Basic Example:
Dim idMap(,) As Integer
Dim colorTable(,) As Byte
Dim resBmp = ImgProc.RegionExtract_FloodFill4(srcBmp, idMap, colorTable)
ImgProc.RegionExtract_FloodFill8(SourceImage, LabelIDMap, RegionColorTable, BkColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Extracts connected regions using 8-connectivity flood fill algorithm and builds label ID maps
Description: Extracts connected regions using 8-connectivity flood fill algorithm and builds label ID maps.
Syntax: labeledImg = 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
VBScript / Visual Basic Example:
Dim idMap(,) As Integer
Dim colorTable(,) As Byte
Dim resBmp = ImgProc.RegionExtract_FloodFill8(srcBmp, idMap, colorTable)
ImgProc.RegionExtract_ColorFloodFill4(SourceImage, LabelIDMap, RegionColorTable, BoundaryColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Extracts regions based on color boundaries using 4-connectivity flood fill
Description: Extracts regions based on color boundaries using 4-connectivity flood fill.
Syntax: labeledImg = 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
VBScript / Visual Basic Example:
Dim resBmp = ImgProc.RegionExtract_ColorFloodFill4(srcBmp, idMap, colorTable, 16776960)
ImgProc.RegionExtract_ColorFloodFill8(SourceImage, LabelIDMap, RegionColorTable, BoundaryColor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Extracts regions based on color boundaries using 8-connectivity flood fill
Description: Extracts regions based on color boundaries using 8-connectivity flood fill.
Syntax: labeledImg = 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
VBScript / Visual Basic Example:
Dim resBmp = ImgProc.RegionExtract_ColorFloodFill8(srcBmp, idMap, colorTable, 16776960)
Color Model & Channel Adjustments
ImgProc.ShadowsHighlights(original, shadowAmt, highlightAmt, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Adjusts shadow and highlight exposure levels independently using multi-threaded parallel execution
Description: Adjusts shadow and highlight exposure levels independently using multi-threaded parallel execution.
Syntax: adjustedImg = ImgProc.ShadowsHighlights(original, shadowAmt, highlightAmt, [MaskImage], [MaskRegionBoundary], [IsMaskAllRegionSelected])
| Parameter | Description |
|---|---|
original (Bitmap) |
Original input bitmap |
shadowAmt (Single) |
Shadow adjustment amount (0.0 to 100.0) |
highlightAmt (Single) |
Highlight adjustment amount (0.0 to 100.0) |
MaskImage (Image, Optional) |
Optional mask image |
MaskRegionBoundary (Rectangle, Optional) |
ROI boundary box |
IsMaskAllRegionSelected (Boolean, Optional) |
Flag for full selection mode |
Return Value: Bitmap
VBScript / Visual Basic Example:
Dim 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) – Performs multi-band selective color adjustment across 6 primary color bands (RGB, CMY)
Description: Performs multi-band selective color adjustment across 6 primary color bands (RGB, CMY).
Syntax: adjustedImg = 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
VBScript / Visual Basic Example:
Dim 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) – Adjusts Lightness (L) and chromaticity channels (a, b) in CIELAB color space
Description: Adjusts Lightness (L) and chromaticity channels (a, b) in CIELAB color space.
Syntax: labImg = 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
VBScript / Visual Basic Example:
Dim res = ImgProc.CIELab(srcBmp, 15, -10, 5)
ImgProc.HueSaturationIntensity(original, hueShift, satShift, intShift, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Shifts Hue, Saturation, and Intensity channels in HSI color space
Description: Shifts Hue, Saturation, and Intensity channels in HSI color space.
Syntax: hsiImg = 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
VBScript / Visual Basic Example:
Dim res = ImgProc.HueSaturationIntensity(srcBmp, 30, 20, -10)
ImgProc.ColorRangeSelection(SourceImage, ColorCode, IsFastAlgorithm, Tolerance, MaintainOrgColor, ColorSpaceName, IsShowProgressBar, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Selects and filters specific color ranges across configured color spaces with tolerance parameters
Description: Selects and filters specific color ranges across configured color spaces with tolerance parameters.
Syntax: selectedImg = 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
VBScript / Visual Basic Example:
Dim res = ImgProc.ColorRangeSelection(srcBmp, 255, True, 15, True, "RGB")
ImgProc.GrayScaling(SourceImage, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Converts RGB color image to 24-bit grayscale image using parallel processing
Description: Converts RGB color image to 24-bit grayscale image using parallel processing.
Syntax: grayImg = 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
VBScript / Visual Basic Example:
Dim grayBmp As Bitmap = ImgProc.GrayScaling(srcBmp)
ImgProc.Emboss(SourceImage, Angle, Distance, Strength, Bias, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Applies a fast parallel 3D embossed filter effect with configurable lighting angle, distance, strength, and bias
Description: Applies a fast parallel 3D embossed filter effect with configurable lighting angle, distance, strength, and bias.
Syntax: embossedImg = 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
VBScript / Visual Basic Example:
Dim embBmp As Bitmap = ImgProc.Emboss(srcBmp, 45.0F, 2, 1.5F, 128)
ImgProc.Outline(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Generates outline boundary contours of image objects in parallel
Description: Generates outline boundary contours of image objects in parallel.
Syntax: outlinedImg = 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
VBScript / Visual Basic Example:
Dim outlineBmp As Bitmap = ImgProc.Outline(srcBmp)
ImgProc.ChangeNonBlackToWhite(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Converts all non-black pixels in the image to pure white
Description: Converts all non-black pixels in the image to pure white.
Syntax: bwImg = 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
VBScript / Visual Basic Example:
Dim res = ImgProc.ChangeNonBlackToWhite(srcBmp)
Color Conversion & Utilities
ImgProc.ColorToColorHEX(SourceColor) – Converts System
Description: Converts System.Drawing.Color structure into a standard HEX color string (e.g. "#FF0000").
Syntax: hexStr = ImgProc.ColorToColorHEX(SourceColor)
| Parameter | Description |
|---|---|
SourceColor (Color) |
System.Drawing.Color object |
Return Value: String
VBScript / Visual Basic Example:
Dim hexVal As String = ImgProc.ColorToColorHEX(Color.Red)
ImgProc.ColorIntegerToRGB(PixelValue) – Parses an integer color value into internal RGB components
Description: Parses an integer color value into internal RGB components.
Syntax: Call ImgProc.ColorIntegerToRGB(PixelValue)
| Parameter | Description |
|---|---|
PixelValue (Integer) |
Packed RGB integer value |
Return Value: None
VBScript / Visual Basic Example:
Call ImgProc.ColorIntegerToRGB(16711680)
ImgProc.ColorIntegerToARGB(PixelValue) – Parses an integer color value into internal ARGB components
Description: Parses an integer color value into internal ARGB components.
Syntax: Call ImgProc.ColorIntegerToARGB(PixelValue)
| Parameter | Description |
|---|---|
PixelValue (Integer) |
Packed ARGB integer value |
Return Value: None
VBScript / Visual Basic Example:
Call ImgProc.ColorIntegerToARGB(-65536)
ImgProc.RGBToARGBInteger(red, green, blue) – Combines Red, Green, and Blue component bytes into a single packed ARGB 32-bit integer
Description: Combines Red, Green, and Blue component bytes into a single packed ARGB 32-bit integer.
Syntax: argbInt = 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
VBScript / Visual Basic Example:
Dim colorInt As Integer = ImgProc.RGBToARGBInteger(255, 0, 0)
ImgProc.RGBToColor(RedInByte, GreenInByte, BlueInByte) – Constructs a System
Description: Constructs a System.Drawing.Color object from individual Red, Green, and Blue integer channel values.
Syntax: clrObj = 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
VBScript / Visual Basic Example:
Dim myColor As Color = ImgProc.RGBToColor(100, 150, 200)
Pixel & Image Format Inspection
ImgProc.IsBWPixel(red, green, blue) – Evaluates whether given RGB byte channels represent a pure black or white pixel
Description: Evaluates whether given RGB byte channels represent a pure black or white pixel.
Syntax: result = ImgProc.IsBWPixel(red, green, blue)
| Parameter | Description |
|---|---|
red (Byte) |
Red component |
green (Byte) |
Green component |
blue (Byte) |
Blue component |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim isMonochrome As Boolean = ImgProc.IsBWPixel(255, 255, 255)
ImgProc.IsGrayImage(SourceImage) – Inspects source bitmap to verify if all pixels have uniform RGB values (grayscale)
Description: Inspects source bitmap to verify if all pixels have uniform RGB values (grayscale).
Syntax: result = ImgProc.IsGrayImage(SourceImage)
| Parameter | Description |
|---|---|
SourceImage (Bitmap) |
Source bitmap image |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim isGray As Boolean = ImgProc.IsGrayImage(srcBmp)
ImgProc.IsBinaryImage(SourceImage) – Inspects source bitmap to determine if it contains strictly binary (0 or 255) pixel values
Description: Inspects source bitmap to determine if it contains strictly binary (0 or 255) pixel values.
Syntax: result = ImgProc.IsBinaryImage(SourceImage)
| Parameter | Description |
|---|---|
SourceImage (Bitmap) |
Source bitmap image |
Return Value: Boolean
VBScript / Visual Basic Example:
Dim isBinary As Boolean = ImgProc.IsBinaryImage(srcBmp)
Halftoning & Dithering Filters
ImgProc.BW_Dithering_FS(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Applies Floyd-Steinberg error diffusion dithering algorithm to produce a high-quality binary image
Description: Applies Floyd-Steinberg error diffusion dithering algorithm to produce a high-quality binary image.
Syntax: ditheredImg = 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
VBScript / Visual Basic Example:
Dim ditherBmp As Bitmap = ImgProc.BW_Dithering_FS(srcBmp)
ImgProc.BW_Dithering_OrderedDither(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Applies matrix-based ordered dithering pattern to generate halftone binary images
Description: Applies matrix-based ordered dithering pattern to generate halftone binary images.
Syntax: ditheredImg = 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
VBScript / Visual Basic Example:
Dim ordDitherBmp As Bitmap = ImgProc.BW_Dithering_OrderedDither(srcBmp)
Matrix & Array Memory Conversions
ImgProc.Convert_GrayByteArray_To_RGBImage(SrcByteArray) – Converts a 2D Byte array representing grayscale intensities into an RGB24 Bitmap image
Description: Converts a 2D Byte array representing grayscale intensities into an RGB24 Bitmap image.
Syntax: bmpImg = ImgProc.Convert_GrayByteArray_To_RGBImage(SrcByteArray)
| Parameter | Description |
|---|---|
SrcByteArray (Byte(,)) |
2D byte array containing grayscale pixel values |
Return Value: Bitmap
VBScript / Visual Basic Example:
Dim myBmp As Bitmap = ImgProc.Convert_GrayByteArray_To_RGBImage(grayByteMatrix)
ImgProc.Convert_GrayByteArray_To_RGBImage_Int(SrcByteArray) – Converts a 2D Integer array representing grayscale intensities into an RGB24 Bitmap image
Description: Converts a 2D Integer array representing grayscale intensities into an RGB24 Bitmap image.
Syntax: bmpImg = ImgProc.Convert_GrayByteArray_To_RGBImage_Int(SrcByteArray)
| Parameter | Description |
|---|---|
SrcByteArray (Integer(,)) |
2D integer array containing pixel values |
Return Value: Bitmap
VBScript / Visual Basic Example:
Dim myBmp As Bitmap = ImgProc.Convert_GrayByteArray_To_RGBImage_Int(grayIntMatrix)
ImgProc.Convert_RGBByteArray_To_RGBImage(SrcByteArray) – Converts a 3D Byte array [height, width, channel] into a 24-bit RGB Bitmap image
Description: Converts a 3D Byte array [height, width, channel] into a 24-bit RGB Bitmap image.
Syntax: bmpImg = ImgProc.Convert_RGBByteArray_To_RGBImage(SrcByteArray)
| Parameter | Description |
|---|---|
SrcByteArray (Byte(,,)) |
3D byte array containing RGB color channels |
Return Value: Bitmap
VBScript / Visual Basic Example:
Dim myBmp As Bitmap = ImgProc.Convert_RGBByteArray_To_RGBImage(rgb3DMatrix)
ImgProc.Convert_GrayImage_To_GrayByteArray(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Extracts grayscale bitmap pixel values directly into a 2D Byte array [height, width]
Description: Extracts grayscale bitmap pixel values directly into a 2D Byte array [height, width].
Syntax: grayBytes = 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: Byte(,)
VBScript / Visual Basic Example:
Dim byteMatrix(,) As Byte = ImgProc.[...](asc_slot://start-slot-1)Convert_GrayImage_To_GrayByteArray(srcBmp)
ImgProc.Convert_RGBImage_To_RGBByteArray(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Extracts RGB color bitmap pixel values directly into a 3D Byte array
Description: Extracts RGB color bitmap pixel values directly into a 3D Byte array.
Syntax: rgbBytes = 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: Byte(,,)
VBScript / Visual Basic Example:
Dim rgbMatrix(,,) As Byte = ImgProc.Convert_RGBImage_To_RGBByteArray(srcBmp)
ImgProc.Convert_RGBImage_To_GrayByteArray(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Converts RGB image to grayscale and outputs pixel values to a 2D Byte matrix
Description: Converts RGB image to grayscale and outputs pixel values to a 2D Byte matrix.
Syntax: grayBytes = 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: Byte(,)
VBScript / Visual Basic Example:
Dim grayMatrix(,) As Byte = ImgProc.Convert_RGBImage_To_GrayByteArray(srcBmp)
ImgProc.Convert_RGBImage_To_GrayIntegerArray(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Converts RGB image to grayscale and outputs pixel values to a 2D Integer matrix
Description: Converts RGB image to grayscale and outputs pixel values to a 2D Integer matrix.
Syntax: grayInts = 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: Integer(,)
VBScript / Visual Basic Example:
Dim intMatrix(,) As Integer = ImgProc.Convert_RGBImage_To_GrayIntegerArray(srcBmp)
ImgProc.GrayScaling_PutTo_2DByte(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Performs grayscale conversion and fills output directly to 2D Byte matrix array
Description: Performs grayscale conversion and fills output directly to 2D Byte matrix array.
Syntax: grayBytes = 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: Byte(,)
VBScript / Visual Basic Example:
Dim resMatrix(,) As Byte = ImgProc.GrayScaling_PutTo_2DByte(srcBmp)
ImgProc.GrayScaling_PutTo_2DInt(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Performs grayscale conversion and fills output directly to 2D Integer matrix array
Description: Performs grayscale conversion and fills output directly to 2D Integer matrix array.
Syntax: grayInts = 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: Integer(,)
VBScript / Visual Basic Example:
Dim resIntMatrix(,) As Integer = ImgProc.GrayScaling_PutTo_2DInt(srcBmp)
ImgProc.GrayScaling_ReturnImg_From_2DInt(SourceImage, Gray2DInt, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Reconstructs Bitmap image from 2D Integer grayscale matrix data
Description: Reconstructs Bitmap image from 2D Integer grayscale matrix data.
Syntax: resBmp = 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
VBScript / Visual Basic Example:
Dim resBmp As Bitmap = ImgProc.GrayScaling_ReturnImg_From_2DInt(srcBmp, grayIntMatrix)
ImgProc.Overlay_GrayIntArray_On_Image(SourceImage, Gray2DInt, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Overlays a 2D Integer grayscale intensity matrix onto an existing image within masked ROI boundaries
Description: Overlays a 2D Integer grayscale intensity matrix onto an existing image within masked ROI boundaries.
Syntax: overlayBmp = 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
VBScript / Visual Basic Example:
Dim resBmp = ImgProc.Overlay_GrayIntArray_On_Image(srcBmp, grayMatrix, maskBmp, roiRect, False)
Geometric Transformations
ImgProc.ResizeByZoomFactor(SourceImage, ZoomFactor, InterpolationMode) – Resizes image relative to current dimensions using zoom scale factor
Description: Resizes image relative to current dimensions using zoom scale factor.
Syntax: resizedImg = 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 (InterpolationMode, Optional) |
Quality resampling mode |
Return Value: Bitmap
VBScript / Visual Basic Example:
Dim zoomedBmp As Bitmap = ImgProc.ResizeByZoomFactor(srcBmp, 2.0F)
ImgProc.Resize(SourceImage, nWidth, nHeight, InterpolationMode) – Resizes bitmap to target explicit width and height dimensions in pixels
Description: Resizes bitmap to target explicit width and height dimensions in pixels.
Syntax: resizedImg = 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 (InterpolationMode, Optional) |
Quality resampling mode |
Return Value: Bitmap
VBScript / Visual Basic Example:
Dim resizedBmp As Bitmap = ImgProc.Resize(srcBmp, 1024, 768)
ImgProc.Crop(SourceImage, nWidth, nHeight, TargetX, TargetY) – Crops a sub-region rectangle from source bitmap given origin coordinates and size
Description: Crops a sub-region rectangle from source bitmap given origin coordinates and size.
Syntax: croppedImg = 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
VBScript / Visual Basic Example:
Dim subBmp As Bitmap = ImgProc.Crop(srcBmp, 200, 200, 50, 50)
ImgProc.Rotate(SourceImage, CenterX, CenterY, AngleDegree, BackgroundColor) – Rotates image around a custom pivot center coordinate (CenterX, CenterY) by angle degrees
Description: Rotates image around a custom pivot center coordinate (CenterX, CenterY) by angle degrees.
Syntax: rotatedImg = 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
VBScript / Visual Basic Example:
Dim rotBmp As Bitmap = ImgProc.Rotate(srcBmp, 100, 100, 45.0F, Color.Black)
ImgProc.RotateAtCenter(SourceImage, AngleDegree) – Rotates image centered on its exact geometric midpoint by angle degrees
Description: Rotates image centered on its exact geometric midpoint by angle degrees.
Syntax: rotatedImg = ImgProc.RotateAtCenter(SourceImage, AngleDegree)
| Parameter | Description |
|---|---|
SourceImage (Bitmap) |
Source bitmap image |
AngleDegree (Single) |
Rotation angle in degrees |
Return Value: Bitmap
VBScript / Visual Basic Example:
Dim rotBmp As Bitmap = ImgProc.RotateAtCenter(srcBmp, 90.0F)
ImgProc.Flip_Vertical(SourceImage) – Flips bitmap vertically along the horizontal axis
Description: Flips bitmap vertically along the horizontal axis.
Syntax: flippedImg = ImgProc.Flip_Vertical(SourceImage)
| Parameter | Description |
|---|---|
SourceImage (Bitmap) |
Source bitmap image |
Return Value: Bitmap
VBScript / Visual Basic Example:
Dim flippedBmp As Bitmap = ImgProc.Flip_Vertical(srcBmp)
ImgProc.Flip_Horizontal(SourceImage) – Flips bitmap horizontally along the vertical axis
Description: Flips bitmap horizontally along the vertical axis.
Syntax: flippedImg = ImgProc.Flip_Horizontal(SourceImage)
| Parameter | Description |
|---|---|
SourceImage (Bitmap) |
Source bitmap image |
Return Value: Bitmap
VBScript / Visual Basic Example:
Dim flippedBmp As Bitmap = ImgProc.Flip_Horizontal(srcBmp)
ImgProc.RotateFlip(SourceImage, RotateFlipOption) – Performs combined rotation and flip transformation using System
Description: Performs combined rotation and flip transformation using System.Drawing.RotateFlipType options.
Syntax: transImg = ImgProc.RotateFlip(SourceImage, RotateFlipOption)
| Parameter | Description |
|---|---|
SourceImage (Bitmap) |
Source bitmap image |
RotateFlipOption (RotateFlipType) |
GDI+ RotateFlipType enumeration option |
Return Value: Bitmap
VBScript / Visual Basic Example:
Dim resBmp As Bitmap = ImgProc.RotateFlip(srcBmp, RotateFlipType.Rotate90FlipX)
Filtering & Enhancement
ImgProc.BoxAveraging(SourceImage, BoxSizeHalf, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Applies a fast parallel box averaging blur filter using a square neighborhood kernel
Description: Applies a fast parallel box averaging blur filter using a square neighborhood kernel.
Syntax: blurredImg = 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
VBScript / Visual Basic Example:
Dim blurBmp As Bitmap = ImgProc.BoxAveraging(srcBmp, 3)
ImgProc.GaussianFilter(SourceImage, FilterSize, WeightFactor, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Applies parallel Gaussian smoothing filter to reduce image noise and detail
Description: Applies parallel Gaussian smoothing filter to reduce image noise and detail.
Syntax: smoothImg = 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
VBScript / Visual Basic Example:
Dim gImg As Bitmap = ImgProc.GaussianFilter(srcBmp, 5, 0)
ImgProc.Sharpen_3x3(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Applies standard 3×3 kernel sharpening filter in parallel
Description: Applies standard 3×3 kernel sharpening filter in parallel.
Syntax: sharpImg = 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
VBScript / Visual Basic Example:
Dim res = ImgProc.Sharpen_3x3(srcBmp)
ImgProc.Sharpen_3x3_Improved(SourceImage, Strength, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Applies improved 3×3 parallel sharpening filter with adjustable strength multiplier
Description: Applies improved 3×3 parallel sharpening filter with adjustable strength multiplier.
Syntax: sharpImg = 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
VBScript / Visual Basic Example:
Dim res = ImgProc.Sharpen_3x3_Improved(srcBmp, 1.5F)
ImgProc.Sharpen_5x5_HighQuality_Fixed(SourceImage, Strength, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Applies high-quality 5×5 fixed kernel sharpening filter with strength control
Description: Applies high-quality 5×5 fixed kernel sharpening filter with strength control.
Syntax: sharpImg = 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
VBScript / Visual Basic Example:
Dim res = ImgProc.Sharpen_5x5_HighQuality_Fixed(srcBmp, 2.0F)
ImgProc.MosaicFilter(SourceImage, isPixelMode, value, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Applies pixelation or block mosaic effect over the image or selected ROI
Description: Applies pixelation or block mosaic effect over the image or selected ROI.
Syntax: mosaicImg = 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
VBScript / Visual Basic Example:
Dim mosaicBmp As Bitmap = ImgProc.MosaicFilter(srcBmp, True, 10)
Edge Detection & Morphology
ImgProc.Erode(SourceImage, BoxSizeHalf, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected, IsDoGrayScaling) – Applies morphological erosion filter using square box neighborhood
Description: Applies morphological erosion filter using square box neighborhood.
Syntax: erodedImg = 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
VBScript / Visual Basic Example:
Dim res = ImgProc.Erode(srcBmp, 2)
ImgProc.Dilate(SourceImage, BoxSizeHalf, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected, IsDoGrayScaling) – Applies morphological dilation filter using square box neighborhood
Description: Applies morphological dilation filter using square box neighborhood.
Syntax: dilatedImg = 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
VBScript / Visual Basic Example:
Dim res = ImgProc.Dilate(srcBmp, 2)
ImgProc.EdgeDetect_by_Sobel(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Detects image edges using Sobel operator masks
Description: Detects image edges using Sobel operator masks.
Syntax: sobelImg = 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
VBScript / Visual Basic Example:
Dim edgeImg As Bitmap = ImgProc.EdgeDetect_by_Sobel(srcBmp)
ImgProc.EdgeDetect_by_Homogenity(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Detects edges based on regional homogenity differential calculation
Description: Detects edges based on regional homogenity differential calculation.
Syntax: edgeImg = 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
VBScript / Visual Basic Example:
Dim edgeImg As Bitmap = ImgProc.EdgeDetect_by_Homogenity(srcBmp)
ImgProc.ErodeOutlines(SourceGrayImage, BackgroundGray, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Erodes region object boundaries in grayscale image by applying background gray adjustments
Description: Erodes region object boundaries in grayscale image by applying background gray adjustments.
Syntax: resImg = 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
VBScript / Visual Basic Example:
Dim res = ImgProc.ErodeOutlines(grayBmp, 255)
ImgProc.DilateOutlines(SourceGrayImage, BackgroundGray, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Dilates region object boundaries in grayscale image by applying foreground gray adjustments
Description: Dilates region object boundaries in grayscale image by applying foreground gray adjustments.
Syntax: resImg = 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
VBScript / Visual Basic Example:
Dim res = ImgProc.DilateOutlines(grayBmp, 0)
Color Channel Splitting & Extraction
ImgProc.Split_Red(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Extracts Red color channel into a color image with Green/Blue suppressed
Description: Extracts Red color channel into a color image with Green/Blue suppressed.
Syntax: redImg = 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
VBScript / Visual Basic Example:
Dim redCh = ImgProc.Split_Red(srcBmp)
ImgProc.Split_Green(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Extracts Green color channel into a color image with Red/Blue suppressed
Description: Extracts Green color channel into a color image with Red/Blue suppressed.
Syntax: greenImg = 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
VBScript / Visual Basic Example:
Dim greenCh = ImgProc.Split_Green(srcBmp)
ImgProc.Split_Blue(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Extracts Blue color channel into a color image with Red/Green suppressed
Description: Extracts Blue color channel into a color image with Red/Green suppressed.
Syntax: blueImg = 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
VBScript / Visual Basic Example:
Dim blueCh = ImgProc.Split_Blue(srcBmp)
ImgProc.GrayFrom_Red(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Extracts Red channel intensity directly into a 24-bit grayscale bitmap
Description: Extracts Red channel intensity directly into a 24-bit grayscale bitmap.
Syntax: grayRed = 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
VBScript / Visual Basic Example:
Dim redGrayBmp = ImgProc.GrayFrom_Red(srcBmp)
ImgProc.GrayFrom_Green(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Extracts Green channel intensity directly into a 24-bit grayscale bitmap
Description: Extracts Green channel intensity directly into a 24-bit grayscale bitmap.
Syntax: grayGreen = 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
VBScript / Visual Basic Example:
Dim greenGrayBmp = ImgProc.GrayFrom_Green(srcBmp)
ImgProc.GrayFrom_Blue(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Extracts Blue channel intensity directly into a 24-bit grayscale bitmap
Description: Extracts Blue channel intensity directly into a 24-bit grayscale bitmap.
Syntax: grayBlue = 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
VBScript / Visual Basic Example:
Dim blueGrayBmp = ImgProc.GrayFrom_Blue(srcBmp)
ImgProc.Split_Hue(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Extracts Hue channel component from HSI color space into a grayscale image
Description: Extracts Hue channel component from HSI color space into a grayscale image.
Syntax: hueImg = 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
VBScript / Visual Basic Example:
Dim hueBmp = ImgProc.Split_Hue(srcBmp)
ImgProc.Split_Saturation(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Extracts Saturation channel component from HSI color space into a grayscale image
Description: Extracts Saturation channel component from HSI color space into a grayscale image.
Syntax: satImg = 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
VBScript / Visual Basic Example:
Dim satBmp = ImgProc.Split_Saturation(srcBmp)
ImgProc.Split_Intensity(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Extracts Intensity channel component from HSI color space into a grayscale image
Description: Extracts Intensity channel component from HSI color space into a grayscale image.
Syntax: intImg = 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
VBScript / Visual Basic Example:
Dim intBmp = ImgProc.Split_Intensity(srcBmp)
Color Space Conversions (Point-wise)
ImgProc.RGBToCMYK(r, g, b, IsCompute_Cyan, IsCompute_Magenta, IsCompute_Yellow) – Converts RGB byte values to CMYK color channel components
Description: Converts RGB byte values to CMYK color channel components.
Syntax: Call 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
VBScript / Visual Basic Example:
Call ImgProc.RGBToCMYK(200, 100, 50, True, True, True)
ImgProc.RGBToLab(r, g, b) – Converts RGB byte values to CIELAB space byte components
Description: Converts RGB byte values to CIELAB space byte components.
Syntax: Call 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
VBScript / Visual Basic Example:
Call ImgProc.RGBToLab(128, 64, 32)
ImgProc.RGBToLab_OriginalValue(r, g, b, LabL, Laba, Labb) – Converts RGB byte values to double-precision CIELAB (L*, a*, b*) values
Description: Converts RGB byte values to double-precision CIELAB (L*, a*, b*) values.
Syntax: Call 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
VBScript / Visual Basic Example:
Dim L As Double, a As Double, b As Double
Call ImgProc.RGBToLab_OriginalValue(255, 0, 0, L, a, b)
ImgProc.RGBToHSI(r, g, b) – Converts RGB byte values to HSI space components
Description: Converts RGB byte values to HSI space components.
Syntax: Call 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
VBScript / Visual Basic Example:
Call ImgProc.RGBToHSI(100, 200, 150)
ImgProc.HSVtoRGB(h, s, v, r, g, b) – Converts HSV color components (Hue, Saturation, Value) to RGB byte components
Description: Converts HSV color components (Hue, Saturation, Value) to RGB byte components.
Syntax: Call 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
VBScript / Visual Basic Example:
Dim r As Byte, g As Byte, b As Byte
Call ImgProc.HSVtoRGB(120.0F, 0.5F, 0.8F, r, g, b)
ImgProc.HSITORGB(Hue, Saturation255, Intensity255, Red, Green, Blue) – Converts HSI channel inputs to Red, Green, and Blue integer color values
Description: Converts HSI channel inputs to Red, Green, and Blue integer color values.
Syntax: Call 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
VBScript / Visual Basic Example:
Dim r As Integer, g As Integer, b As Integer
Call ImgProc.HSITORGB(180, 128.0F, 200.0F, r, g, b)
Region Filling & Compositing
ImgProc.FillRegion(SourceImage, FillColorStr, IsFillInside, Opacity, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Fills interior or exterior of ROI mask with color string and opacity
Description: Fills interior or exterior of ROI mask with color string and opacity.
Syntax: filledImg = ImgProc.FillRegion(SourceImage, FillColorStr, IsFillInside, Opacity, [MaskImage], [MaskRegionBoundary], [IsMaskAllRegionSelected])
| Parameter | Description |
|---|---|
SourceImage (Bitmap) |
Source bitmap image |
FillColorStr (String) |
Color HEX or name string |
IsFillInside (Boolean) |
True to fill inside ROI mask, False for outside |
Opacity (Single) |
Fill opacity factor (0.0 to 1.0) |
MaskImage (Bitmap, Optional) |
Optional mask bitmap |
MaskRegionBoundary (Rectangle, Optional) |
ROI boundary box |
IsMaskAllRegionSelected (Boolean, Optional) |
Flag for full selection mode |
Return Value: Bitmap
VBScript / Visual Basic Example:
Dim res = ImgProc.FillRegion(srcBmp, "#FF0000", True, 0.5F)
ImgProc.ChromaKey(TargetCanvas, OverlayImage, ChromaR, ChromaG, ChromaB, Opacity, IsFeather, FeatherRadius, MaskImage, IsMaskAllRegionSelected) – Performs chroma key compositing overlaying image onto target canvas with alpha feathering
Description: Performs chroma key compositing overlaying image onto target canvas with alpha feathering.
Syntax: keyedImg = ImgProc.ChromaKey(TargetCanvas, OverlayImage, ChromaR, ChromaG, ChromaB, Opacity, IsFeather, FeatherRadius, [MaskImage], [IsMaskAllRegionSelected])
| Parameter | Description |
|---|---|
TargetCanvas (Bitmap) |
Target canvas bitmap |
OverlayImage (Bitmap) |
Overlay source image |
ChromaR (Byte) |
Chroma key color Red component |
ChromaG (Byte) |
Chroma key color Green component |
ChromaB (Byte) |
Chroma key color Blue component |
Opacity (Single) |
Overlay blend opacity (0.0 to 1.0) |
IsFeather (Boolean) |
Enable edge feathering |
FeatherRadius (Integer) |
Feathering blur radius in pixels |
MaskImage (Bitmap, Optional) |
Optional mask bitmap |
IsMaskAllRegionSelected (Boolean, Optional) |
Flag for full selection mode |
Return Value: Bitmap
VBScript / Visual Basic Example:
Dim 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) – Executes 4-connected flood fill starting at target coordinate with RGB color tolerance
Description: Executes 4-connected flood fill starting at target coordinate with RGB color tolerance.
Syntax: filledImg = 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
VBScript / Visual Basic Example:
Dim res = ImgProc.FloodFill(srcBmp, 100, 100, 255, 0, 0, 10, 10, 10)
ImgProc.Invert(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Inverts color values (negative effect) across all image channels
Description: Inverts color values (negative effect) across all image channels.
Syntax: invImg = 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
VBScript / Visual Basic Example:
Dim negBmp = ImgProc.Invert(srcBmp)
Binarization & Thresholding
ImgProc.ManualBinarization(SourceImage, ThresholdValue, SkipGrayScaling, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Converts image to binary mask using explicit cutoff threshold value
Description: Converts image to binary mask using explicit cutoff threshold value.
Syntax: binImg = 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
VBScript / Visual Basic Example:
Dim binBmp = ImgProc.ManualBinarization(srcBmp, 128)
ImgProc.AdaptiveBinarization(SourceImage, LocalBoxSizeValue, IsObjectWhite, ThresholdLevel, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Executes local adaptive threshold binarization based on local neighborhood box averages
Description: Executes local adaptive threshold binarization based on local neighborhood box averages.
Syntax: binImg = 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
VBScript / Visual Basic Example:
Dim res = ImgProc.AdaptiveBinarization(srcBmp, 15, True, 5)
ImgProc.MultiStepThresholding(SourceImage, LevelCount_Red, LevelCount_Green, LevelCount_Blue, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Applies multi-level thresholding across Red, Green, and Blue color channels independently
Description: Applies multi-level thresholding across Red, Green, and Blue color channels independently.
Syntax: threshImg = 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
VBScript / Visual Basic Example:
Dim res = ImgProc.MultiStepThresholding(srcBmp, 4, 4, 4)
Drawing & Text Overlays
ImgProc.Draw_Line(Pic_Target, X1, Y1, X2, Y2, LineColor) – Renders a solid colored line between two pixel coordinates onto target PictureBox image
Description: Renders a solid colored line between two pixel coordinates onto target PictureBox image.
Syntax: resBmp = 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
VBScript / Visual Basic Example:
Dim res = ImgProc.Draw_Line(picBox, 10, 10, 200, 200, Color.Red)
ImgProc.Draw_Text_Outlined_Bitmap(Pic_Target, x, y, TextString, TextFont, InnerColor, OuterColor) – Renders text with inner fill and outer outline stroke onto a Bitmap canvas
Description: Renders text with inner fill and outer outline stroke onto a Bitmap canvas.
Syntax: textBmp = 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
VBScript / Visual Basic Example:
Dim fnt As New Font("Arial", 12.0F)
Dim res = ImgProc.Draw_Text_Outlined_Bitmap(srcBmp, 20, 20, "Label", fnt, Color.Yellow, Color.Black)
ImgProc.Draw_Rectangles(Pic_Target, SourceRectangles, LineColor) – Draws an array of bounding rectangles onto bitmap using specified stroke color
Description: Draws an array of bounding rectangles onto bitmap using specified stroke color.
Syntax: resBmp = ImgProc.Draw_Rectangles(Pic_Target, SourceRectangles, LineColor)
| Parameter | Description |
|---|---|
Pic_Target (Bitmap) |
Target bitmap |
SourceRectangles (Rectangle()) |
Array of Rectangle structures |
LineColor (Color) |
Stroke color for rectangle boundaries |
Return Value: Bitmap
VBScript / Visual Basic Example:
Dim rects() As Rectangle = { New Rectangle(10,10,50,50) }
Dim res = ImgProc.Draw_Rectangles(srcBmp, rects, Color.Green)
Pixel Analysis & Measurements
ImgProc.Get_Histogram(SourceImage, TotalPixelCount, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Calculates pixel intensity frequency distribution histogram matrix for source image
Description: Calculates pixel intensity frequency distribution histogram matrix for source image.
Syntax: histData = 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: Single(,)
VBScript / Visual Basic Example:
Dim totCount As Integer
Dim hist(,) As Single = ImgProc.Get_Histogram(srcBmp, totCount)
ImgProc.Get_LineProfile(SourceImage, StartAt, EndAt, LineThickness, IsNormalizeBy255) – Extracts intensity or color channel profiles along a defined line segment [StartAt -> EndAt]
Description: Extracts intensity or color channel profiles along a defined line segment [StartAt -> EndAt].
Syntax: profileData = 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: Single(,)
VBScript / Visual Basic Example:
Dim 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) – Calculates average value for a specific named color channel across selected ROI
Description: Calculates average value for a specific named color channel across selected ROI.
Syntax: avgVal = 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
VBScript / Visual Basic Example:
Dim pxCount As Long
Dim avgRed As Single = ImgProc.Calculate_AverageColorValue(srcBmp, pxCount, 1, "Red")
ImgProc.Distance(X1, Y1, X2, Y2) – Calculates Euclidean distance between two 2D points (X1, Y1) and (X2, Y2)
Description: Calculates Euclidean distance between two 2D points (X1, Y1) and (X2, Y2).
Syntax: distVal = 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
VBScript / Visual Basic Example:
Dim d As Double = ImgProc.Distance(0.0, 0.0, 3.0, 4.0)
ImgProc.Count_ColorPixelOfInterest(SourceImage, ColorOfInterest_RGBInt, TotalPixelCount, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Counts total pixels matching specified RGB color integer value within ROI
Description: Counts total pixels matching specified RGB color integer value within ROI.
Syntax: matchCount = 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
VBScript / Visual Basic Example:
Dim totPx As Integer
Dim redCount As Integer = ImgProc.Count_ColorPixelOfInterest(srcBmp, 16711680, totPx)
Automated Image Enhancement & Restoration
ImgProc.RollingBoxBackgroundSubtraction(SourceImage, Radius, IsAutomatic, IsObjectWhite, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Subtractions non-uniform background illumination using parallel rolling box/ball algorithm
Description: Subtractions non-uniform background illumination using parallel rolling box/ball algorithm.
Syntax: bgSubImg = 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
VBScript / Visual Basic Example:
Dim resBmp = ImgProc.RollingBoxBackgroundSubtraction(srcBmp, 50, False, True)
ImgProc.CorrectUnevenIllumination(SourceImage, GridRows, GridCols, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Corrects uneven field shading and vignetting by estimating background surface grid in parallel
Description: Corrects uneven field shading and vignetting by estimating background surface grid in parallel.
Syntax: corrImg = 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
VBScript / Visual Basic Example:
Dim flatImg = ImgProc.CorrectUnevenIllumination(srcBmp, 16, 16)
ImgProc.SmartDenoise(SourceImage, Radius, Threshold, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Applies edge-preserving bilateral smart noise reduction filter
Description: Applies edge-preserving bilateral smart noise reduction filter.
Syntax: denoisedImg = 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
VBScript / Visual Basic Example:
Dim cleanImg = ImgProc.SmartDenoise(srcBmp, 5, 25)
ImgProc.AdaptiveContrast(SourceImage, Strength, TilesX, TilesY, ClipLimit, IsShowProgress, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Applies Contrast Limited Adaptive Histogram Equalization (CLAHE) in parallel
Description: Applies Contrast Limited Adaptive Histogram Equalization (CLAHE) in parallel.
Syntax: claheImg = 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
VBScript / Visual Basic Example:
Dim claheBmp = ImgProc.AdaptiveContrast(srcBmp, 0.8F, 8, 8, 2.0F)
ImgProc.AutoTone(SourceImage, ClipPercent, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Automatically balances tonal range across individual color channels by clipping histogram tails
Description: Automatically balances tonal range across individual color channels by clipping histogram tails.
Syntax: autoToneImg = 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
VBScript / Visual Basic Example:
Dim res = ImgProc.AutoTone(srcBmp, 0.5F)
ImgProc.AutoWhiteBalance(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Automatically corrects color temperature and casts using gray world assumption
Description: Automatically corrects color temperature and casts using gray world assumption.
Syntax: awbImg = 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
VBScript / Visual Basic Example:
Dim awbBmp = ImgProc.AutoWhiteBalance(srcBmp)
ImgProc.AutoGamma(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Automatically computes and applies optimal gamma correction curves
Description: Automatically computes and applies optimal gamma correction curves.
Syntax: gammaImg = 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
VBScript / Visual Basic Example:
Dim gammaBmp = ImgProc.AutoGamma(srcBmp)
ImgProc.Sharpen_UnsharpMask(SourceImage, FilterSize, AmountPercent, Threshold, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Applies high-grade Unsharp Masking (USM) filter with threshold control
Description: Applies high-grade Unsharp Masking (USM) filter with threshold control.
Syntax: usmImg = 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
VBScript / Visual Basic Example:
Dim usmBmp = ImgProc.Sharpen_UnsharpMask(srcBmp, 11, 150, 5)
ImgProc.RemoveBackground(SourceImage, MatteImage, MaskRegionBoundary, IsMaskAllRegionSelected, BgColor, NewBackgroundImage) – Removes image background using matte alpha keying and optional new background substitution
Description: Removes image background using matte alpha keying and optional new background substitution.
Syntax: nobgImg = 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
VBScript / Visual Basic Example:
Dim cutBmp = ImgProc.RemoveBackground(srcBmp, matteBmp)
Advanced Segmentation, Skeletonization & 3D Export
ImgProc.WatershedSegmentation(SourceImage, MinDistanceThreshold, SmoothRadius, BoundaryThickness, BoundR, BoundG, BoundB, ReturnOnlyBoundaries, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Executes distance-transform parallel Watershed segmentation to separate overlapping object boundaries
Description: Executes distance-transform parallel Watershed segmentation to separate overlapping object boundaries.
Syntax: watershedImg = 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
VBScript / Visual Basic Example:
Dim wsBmp = ImgProc.WatershedSegmentation(srcBmp, 15, 3, 2, 255, 0, 0)
ImgProc.SplitObjects_ConvexityDefects(SourceImage, MinDefectDepth, MaxCutLength, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Splits clustered binary objects by locating contour convexity defects
Description: Splits clustered binary objects by locating contour convexity defects.
Syntax: splitImg = 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
VBScript / Visual Basic Example:
Dim splitBmp = ImgProc.SplitObjects_ConvexityDefects(srcBmp, 5.0F, 40.0F)
ImgProc.Skeletonize(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Reduces binary object shapes to 1-pixel thin medial axis skeleton curves in parallel
Description: Reduces binary object shapes to 1-pixel thin medial axis skeleton curves in parallel.
Syntax: skelImg = 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
VBScript / Visual Basic Example:
Dim skelBmp = ImgProc.Skeletonize(srcBmp)
ImgProc.SkeletonizeExtended(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Applies extended topological skeletonization preserving critical branch junction topology
Description: Applies extended topological skeletonization preserving critical branch junction topology.
Syntax: skelImg = 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
VBScript / Visual Basic Example:
Dim extSkel = ImgProc.SkeletonizeExtended(srcBmp)
ImgProc.Extract_SkeletonPoints(SkeletonArray, foreground) – Extracts 2D coordinate points of all foreground skeleton pixels from matrix array
Description: Extracts 2D coordinate points of all foreground skeleton pixels from matrix array.
Syntax: points = ImgProc.Extract_SkeletonPoints(SkeletonArray, foreground)
| Parameter | Description |
|---|---|
SkeletonArray (Byte(,)) |
2D byte array storing skeleton matrix |
foreground (Byte) |
Foreground pixel intensity value (e.g. 255) |
Return Value: Point()
VBScript / Visual Basic Example:
Dim pts() As Point = ImgProc.Extract_SkeletonPoints(skelMatrix, 255)
ImgProc.Get_TrueSkeletonLength(SkeletonArray, foreground, umPerPixels, SplineVertexCount) – Calculates physical curve length of skeleton branches converted from physical pixel scale (um/pixel)
Description: Calculates physical curve length of skeleton branches converted from physical pixel scale (um/pixel).
Syntax: lengthVal = ImgProc.Get_TrueSkeletonLength(SkeletonArray, foreground, umPerPixels, SplineVertexCount)
| Parameter | Description |
|---|---|
SkeletonArray (Byte(,)) |
2D byte array containing skeleton |
foreground (Byte) |
Foreground intensity byte |
umPerPixels (Single) |
Physical calibration factor (micrometers per pixel) |
SplineVertexCount (Integer) |
Spline interpolation vertex sampling density |
Return Value: Single
VBScript / Visual Basic Example:
Dim realLen As Single = ImgProc.Get_TrueSkeletonLength(skelMatrix, 255, 0.45F, 100)
ImgProc.SaveDepthMapToSTL_GaussianFilter(SourceImage, FilePath, MaxSTLHeight, BaseThickness, SmoothingPasses, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Exports image 2D depth map to a 3D printable STL mesh file utilizing Gaussian surface smoothing
Description: Exports image 2D depth map to a 3D printable STL mesh file utilizing Gaussian surface smoothing.
Syntax: filePathOut = 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
VBScript / Visual Basic Example:
Dim outPath = ImgProc.SaveDepthMapToSTL_GaussianFilter(srcBmp, "C:\model.stl", 20.0F, 3.0F)
Channel Merging & Image Arithmetic
ImgProc.MergeChannels(ColorSpace, Image1, Image2, Image3, maskImage, maskRegionBoundary, isMaskAllRegionSelected) – Merges three independent single-channel grayscale bitmaps into a single 24-bit composite image across RGB, HSI, or LAB spaces
Description: Merges three independent single-channel grayscale bitmaps into a single 24-bit composite image across RGB, HSI, or LAB spaces.
Syntax: mergedBmp = ImgProc.MergeChannels(ColorSpace, Image1, Image2, Image3, [maskImage], [maskRegionBoundary], [isMaskAllRegionSelected])
| Parameter | Description |
|---|---|
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
VBScript / Visual Basic Example:
Dim rgbBmp = ImgProc.MergeChannels("RGB", rChBmp, gChBmp, bChBmp)
ImgProc.Convert_To_rgChromaticity(SourceImage, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Converts RGB image to normalized rg-Chromaticity space image [r = R/(R+G+B), g = G/(R+G+B)]
Description: Converts RGB image to normalized rg-Chromaticity space image [r = R/(R+G+B), g = G/(R+G+B)].
Syntax: rgBmp = 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
VBScript / Visual Basic Example:
Dim chromBmp = ImgProc.Convert_To_rgChromaticity(srcBmp)
ImgProc.BinaryOperation_AND(SourceGrayImage1, SourceGrayImage2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Performs bitwise boolean AND operation between two grayscale bitmaps
Description: Performs bitwise boolean AND operation between two grayscale bitmaps.
Syntax: resBmp = 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
VBScript / Visual Basic Example:
Dim res = ImgProc.BinaryOperation_AND(img1, img2)
ImgProc.BinaryOperation_OR(SourceGrayImage1, SourceGrayImage2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Performs bitwise boolean OR operation between two grayscale bitmaps
Description: Performs bitwise boolean OR operation between two grayscale bitmaps.
Syntax: resBmp = 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
VBScript / Visual Basic Example:
Dim res = ImgProc.BinaryOperation_OR(img1, img2)
ImgProc.BinaryOperation_XOR(SourceGrayImage1, SourceGrayImage2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Performs bitwise boolean XOR operation between two grayscale bitmaps
Description: Performs bitwise boolean XOR operation between two grayscale bitmaps.
Syntax: resBmp = 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
VBScript / Visual Basic Example:
Dim res = ImgProc.BinaryOperation_XOR(img1, img2)
ImgProc.Compute_DifferentialImage(SourceGrayImage1, SourceGrayImage2, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Calculates absolute pixel-wise difference image (|Image1 – Image2|)
Description: Calculates absolute pixel-wise difference image (|Image1 – Image2|).
Syntax: diffBmp = 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
VBScript / Visual Basic Example:
Dim diff = ImgProc.Compute_DifferentialImage(img1, img2)
Noise Cleaning & Edge Detection Advanced
ImgProc.RemoveBlackDots(SourceImage, MaxDotSize, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Removes isolated black noise dots (speckles) up to specified maximum dot size in parallel
Description: Removes isolated black noise dots (speckles) up to specified maximum dot size in parallel.
Syntax: cleanBmp = 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
VBScript / Visual Basic Example:
Dim clean = ImgProc.RemoveBlackDots(srcBmp, 2)
ImgProc.RemoveWhiteDots(SourceImage, PixelColor, MaxDotSize, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Removes isolated white noise dots (salt noise) up to specified maximum dot size in parallel
Description: Removes isolated white noise dots (salt noise) up to specified maximum dot size in parallel.
Syntax: cleanBmp = 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
VBScript / Visual Basic Example:
Dim clean = ImgProc.RemoveWhiteDots(srcBmp, 0, 2)
ImgProc.CannyEdgeDetecton(SourceImage, LocalBoxSize, SkipGrayScaling, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Executes multi-stage Canny Edge Detection filter
Description: Executes multi-stage Canny Edge Detection filter.
Syntax: cannyBmp = 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
VBScript / Visual Basic Example:
Dim cannyBmp = ImgProc.CannyEdgeDetecton(srcBmp, 3)
ImgProc.HoughTransform_For_Line(SourceImage, UserMaxCount, IsAbsoluteNormalization, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Applies Hough Transform to detect linear edge structures across the image
Description: Applies Hough Transform to detect linear edge structures across the image.
Syntax: houghBmp = 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
VBScript / Visual Basic Example:
Dim linesBmp = ImgProc.HoughTransform_For_Line(srcBmp, 100, True)
ImgProc.HoughTransform_For_Circle(SourceImage, Radius, AngleCount, IsAbsoluteNormalization, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Applies Hough Transform to detect circular shapes of specified target radius
Description: Applies Hough Transform to detect circular shapes of specified target radius.
Syntax: houghBmp = 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
VBScript / Visual Basic Example:
Dim circlesBmp = ImgProc.HoughTransform_For_Circle(srcBmp, 25.0F, 360, True)
Screen Capture & Environment Utilities
ImgProc.CaptureDesktopScreen(PrintCursor) – Captures current primary desktop screen to bitmap with optional mouse cursor printing
Description: Captures current primary desktop screen to bitmap with optional mouse cursor printing.
Syntax: screenBmp = ImgProc.CaptureDesktopScreen([PrintCursor])
| Parameter | Description |
|---|---|
PrintCursor (Boolean, Optional) |
Include cursor in screen capture |
Return Value: Bitmap
VBScript / Visual Basic Example:
Dim capBmp As Bitmap = ImgProc.CaptureDesktopScreen(True)
ImgProc.CaptureDesktopScreenByRegion(PrintCursor, IsAllRegion, X1, Y1, X2, Y2) – Captures specified sub-region coordinates of desktop screen
Description: Captures specified sub-region coordinates of desktop screen.
Syntax: screenBmp = 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
VBScript / Visual Basic Example:
Dim capBmp = ImgProc.CaptureDesktopScreenByRegion(True, False, 0, 0, 800, 600)
ImgProc.CaptureObject(pHwnd) – Captures window control content given native window handle handle pointer (pHwnd)
Description: Captures window control content given native window handle handle pointer (pHwnd).
Syntax: winBmp = ImgProc.CaptureObject(pHwnd)
| Parameter | Description |
|---|---|
pHwnd (IntPtr) |
Native Windows handle (HWND) |
Return Value: Bitmap
VBScript / Visual Basic Example:
Dim winBmp = ImgProc.CaptureObject(myControl.Handle)
ImgProc.Remap(SourceImage, mapX, mapY, MaskImage, MaskRegionBoundary, IsMaskAllRegionSelected) – Remaps image pixels using 2D floating-point lookup map transformation matrices (mapX, mapY)
Description: Remaps image pixels using 2D floating-point lookup map transformation matrices (mapX, mapY).
Syntax: mappedBmp = 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
VBScript / Visual Basic Example:
Dim remapBmp = ImgProc.Remap(srcBmp, mapXMatrix, mapYMatrix)
ImgProc.Get_CoreCount() – Gets number of active CPU logical hardware processor cores available for parallel execution
Description: Gets number of active CPU logical hardware processor cores available for parallel execution.
Syntax: cores = ImgProc.Get_CoreCount()
Parameters: None
Return Value: Integer
VBScript / Visual Basic Example:
Dim numCores As Integer = ImgProc.Get_CoreCount()
3. Region Object (ScriptRegionHelper)
The Region object provides programmatic access for defining, modifying, inspecting, and manipulating ROI (Region of Interest) selections, shape geometries, and binary masks in PhenoCapture.
Basic Visibility & Selection Actions
Region.Unselect() – Clears and resets the active region selection on the workspace canvas
Description: Clears and resets the active region selection on the workspace canvas.
Syntax: Call Region.Unselect()
Parameters: None
Return Value: None
VBScript / Visual Basic Example:
Call Region.Unselect()
Region.Show() – Displays the last defined selection shape on the workspace canvas
Description: Displays the last defined selection shape on the workspace canvas.
Syntax: Call Region.Show()
Parameters: None
Return Value: None
VBScript / Visual Basic Example:
Call Region.Show()
Region.Invalidate() – Refreshes the drawing canvas viewport to update visual region overlays
Description: Refreshes the drawing canvas viewport to update visual region overlays.
Syntax: Call Region.Invalidate()
Parameters: None
Return Value: None
VBScript / Visual Basic Example:
Call Region.Invalidate()
Region.Hide() – Hides the selection shape from the workspace canvas
Description: Hides the selection shape from the workspace canvas.
Syntax: Call Region.Hide()
Parameters: None
Return Value: None
VBScript / Visual Basic Example:
Call Region.Hide()
Selection Shape Inspection
Region.IsNone() – Checks whether no selection shape is currently active
Description: Checks whether no selection shape is currently active.
Syntax: result = Region.IsNone()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim hasNoSelection = Region.IsNone()
Region.IsLine() – Checks whether the active selection shape is a line
Description: Checks whether the active selection shape is a line.
Syntax: result = Region.IsLine()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim isLineShape = Region.IsLine()
Region.IsRectangle() – Checks whether the active selection shape is a rectangle
Description: Checks whether the active selection shape is a rectangle.
Syntax: result = Region.IsRectangle()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim isRectShape = Region.IsRectangle()
Region.IsCircle() – Checks whether the active selection shape is a circle or ellipse
Description: Checks whether the active selection shape is a circle or ellipse.
Syntax: result = Region.IsCircle()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim isCircleShape = Region.IsCircle()
Region.IsPolygon() – Checks whether the active selection shape is a polygon
Description: Checks whether the active selection shape is a polygon.
Syntax: result = Region.IsPolygon()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim isPolyShape = Region.IsPolygon()
Region.IsPath() – Checks whether the active selection shape is a multi-segment path
Description: Checks whether the active selection shape is a multi-segment path.
Syntax: result = Region.IsPath()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim isPathShape = Region.IsPath()
Region.IsBitmapMask() – Checks whether the active selection shape is a arbitrary bitmap mask
Description: Checks whether the active selection shape is a arbitrary bitmap mask.
Syntax: result = Region.IsBitmapMask()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim isMask = Region.IsBitmapMask()
Region.GetShape() – Returns the string name of the currently active selection shape
Description: Returns the string name of the currently active selection shape.
Syntax: shapeName = Region.GetShape()
Parameters: None
Return Value: String
VBScript / Visual Basic Example:
Dim currentShape = Region.GetShape()
Shape Setup Actions
Region.SetLine(x1, y1, x2, y2) – Defines a linear selection using start and end coordinates
Description: Defines a linear selection using start and end coordinates.
Syntax: Call 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
VBScript / Visual Basic Example:
Call Region.SetLine(10, 10, 100, 100)
Region.SetRectangle(left, top, right, bottom) – Defines a rectangular selection using bounding box coordinates
Description: Defines a rectangular selection using bounding box coordinates.
Syntax: Call 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
VBScript / Visual Basic Example:
Call Region.SetRectangle(50, 50, 200, 200)
Region.SetCircle(left, top, right, bottom) – Defines an elliptical or circular selection inside a bounding rectangle
Description: Defines an elliptical or circular selection inside a bounding rectangle.
Syntax: Call 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
VBScript / Visual Basic Example:
Call Region.SetCircle(50, 50, 200, 200)
Region.SetPolygon(coords) – Defines a polygonal selection from an array of vertex coordinates [x1, y1, x2, y2,
Description: Defines a polygonal selection from an array of vertex coordinates [x1, y1, x2, y2, …].
Syntax: Call Region.SetPolygon(coords)
| Parameter | Description |
|---|---|
coords (Integer()) |
Array of point coordinates (X,Y pairs) |
Return Value: None
VBScript / Visual Basic Example:
Dim points() As Integer = {10, 10, 50, 100, 90, 10}
Call Region.SetPolygon(points)
Region.SetPath(coords) – Defines a multi-segment path selection from an array of point coordinates [x1, y1, x2, y2,
Description: Defines a multi-segment path selection from an array of point coordinates [x1, y1, x2, y2, …].
Syntax: Call Region.SetPath(coords)
| Parameter | Description |
|---|---|
coords (Integer()) |
Array of point coordinates (X,Y pairs) |
Return Value: None
VBScript / Visual Basic Example:
Dim pathPts() As Integer = {0, 0, 20, 30, 40, 80}
Call Region.SetPath(pathPts)
Boundary Coordinates
Region.GetBoundaryLeft() – Gets the X coordinate of the left boundary of the selection shape or mask
Description: Gets the X coordinate of the left boundary of the selection shape or mask.
Syntax: xVal = Region.GetBoundaryLeft()
Parameters: None
Return Value: Integer
VBScript / Visual Basic Example:
Dim leftX = Region.GetBoundaryLeft()
Region.GetBoundaryTop() – Gets the Y coordinate of the top boundary of the selection shape or mask
Description: Gets the Y coordinate of the top boundary of the selection shape or mask.
Syntax: yVal = Region.GetBoundaryTop()
Parameters: None
Return Value: Integer
VBScript / Visual Basic Example:
Dim topY = Region.GetBoundaryTop()
Region.GetBoundaryRight() – Gets the X coordinate of the right boundary of the selection shape or mask
Description: Gets the X coordinate of the right boundary of the selection shape or mask.
Syntax: xVal = Region.GetBoundaryRight()
Parameters: None
Return Value: Integer
VBScript / Visual Basic Example:
Dim rightX = Region.GetBoundaryRight()
Region.GetBoundaryBottom() – Gets the Y coordinate of the bottom boundary of the selection shape or mask
Description: Gets the Y coordinate of the bottom boundary of the selection shape or mask.
Syntax: yVal = Region.GetBoundaryBottom()
Parameters: None
Return Value: Integer
VBScript / Visual Basic Example:
Dim bottomY = Region.GetBoundaryBottom()
Region.GetRectangleLeft() – Alias for GetBoundaryLeft; gets the left coordinate of the bounding rectangle
Description: Alias for GetBoundaryLeft; gets the left coordinate of the bounding rectangle.
Syntax: xVal = Region.GetRectangleLeft()
Parameters: None
Return Value: Integer
VBScript / Visual Basic Example:
Dim leftX = Region.GetRectangleLeft()
Region.GetRectangleTop() – Alias for GetBoundaryTop; gets the top coordinate of the bounding rectangle
Description: Alias for GetBoundaryTop; gets the top coordinate of the bounding rectangle.
Syntax: yVal = Region.GetRectangleTop()
Parameters: None
Return Value: Integer
VBScript / Visual Basic Example:
Dim topY = Region.GetRectangleTop()
Region.GetRectangleRight() – Alias for GetBoundaryRight; gets the right coordinate of the bounding rectangle
Description: Alias for GetBoundaryRight; gets the right coordinate of the bounding rectangle.
Syntax: xVal = Region.GetRectangleRight()
Parameters: None
Return Value: Integer
VBScript / Visual Basic Example:
Dim rightX = Region.GetRectangleRight()
Region.GetRectangleBottom() – Alias for GetBoundaryBottom; gets the bottom coordinate of the bounding rectangle
Description: Alias for GetBoundaryBottom; gets the bottom coordinate of the bounding rectangle.
Syntax: yVal = Region.GetRectangleBottom()
Parameters: None
Return Value: Integer
VBScript / Visual Basic Example:
Dim bottomY = Region.GetRectangleBottom()
Selection State & Mode Control
Region.IsAllRegionSelected() – Checks if the selection encompasses the entire image area
Description: Checks if the selection encompasses the entire image area.
Syntax: result = Region.IsAllRegionSelected()
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
Dim isAll = Region.IsAllRegionSelected()
Region.GetSelectMode() – Gets the current selection interaction mode (e
Description: Gets the current selection interaction mode (e.g., None, Adding, Subtracting).
Syntax: modeStr = Region.GetSelectMode()
Parameters: None
Return Value: String
VBScript / Visual Basic Example:
Dim currentMode = Region.GetSelectMode()
Region.SetSelectMode(modeName) – Sets the selection mode by name ("none", "adding"/"add", or "subtracting"/"subtract")
Description: Sets the selection mode by name ("none", "adding"/"add", or "subtracting"/"subtract").
Syntax: Call Region.SetSelectMode(modeName)
| Parameter | Description |
|---|---|
modeName (String) |
Mode string ("none", "add", "subtract") |
Return Value: None
VBScript / Visual Basic Example:
Call Region.SetSelectMode("add")
Mask Image Operations
Region.GetBinaryMaskImage() – Extracts the current region selection as an RGB24 binary mask bitmap (0 = unselected, 255 = selected)
Description: Extracts the current region selection as an RGB24 binary mask bitmap (0 = unselected, 255 = selected).
Syntax: maskBmp = Region.GetBinaryMaskImage()
Parameters: None
Return Value: Bitmap
VBScript / Visual Basic Example:
Dim maskBmp As Bitmap = Region.GetBinaryMaskImage()
Region.SetBinaryMaskImage(maskBmp) – Applies a binary RGB24 bitmap as the active region mask and updates marching ants
Description: Applies a binary RGB24 bitmap as the active region mask and updates marching ants.
Syntax: Call Region.SetBinaryMaskImage(maskBmp)
| Parameter | Description |
|---|---|
maskBmp (Bitmap) |
RGB24 binary mask image |
Return Value: None
VBScript / Visual Basic Example:
Call Region.SetBinaryMaskImage(myMaskBmp)
Region.AddMaskImage(appendBmp, offsetX, offsetY) – Performs a fast LockBits union operation to add white pixels from a binary image to the active mask
Description: Performs a fast LockBits union operation to add white pixels from a binary image to the active mask.
Syntax: Call 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
VBScript / Visual Basic Example:
Call Region.AddMaskImage(addBmp, 10, 10)
Region.SubtractMaskImage(subtractBmp, offsetX, offsetY) – Performs a fast LockBits exclusion operation to subtract white pixels of a binary image from the active mask
Description: Performs a fast LockBits exclusion operation to subtract white pixels of a binary image from the active mask.
Syntax: Call 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
VBScript / Visual Basic Example:
Call Region.SubtractMaskImage(subBmp, 0, 0)
Mask Shape Addition & Subtraction
Region.AddRectangle(left, top, right, bottom) – Adds a rectangular region (Union) to the current selection mask
Description: Adds a rectangular region (Union) to the current selection mask.
Syntax: Call 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
VBScript / Visual Basic Example:
Call Region.AddRectangle(10, 10, 100, 100)
Region.AddCircle(left, top, right, bottom) – Adds an elliptical/circular region (Union) to the current selection mask
Description: Adds an elliptical/circular region (Union) to the current selection mask.
Syntax: Call 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
VBScript / Visual Basic Example:
Call Region.AddCircle(50, 50, 150, 150)
Region.AddPolygon(coords) – Adds a polygonal region (Union) to the current selection mask
Description: Adds a polygonal region (Union) to the current selection mask.
Syntax: Call Region.AddPolygon(coords)
| Parameter | Description |
|---|---|
coords (Integer()) |
Array of polygon vertices (X,Y pairs) |
Return Value: None
VBScript / Visual Basic Example:
Dim pts() As Integer = {0, 0, 100, 0, 50, 100}
Call Region.AddPolygon(pts)
Region.RemoveRectangle(left, top, right, bottom) – Subtracts a rectangular region (Exclude) from the current selection mask
Description: Subtracts a rectangular region (Exclude) from the current selection mask.
Syntax: Call 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
VBScript / Visual Basic Example:
Call Region.RemoveRectangle(20, 20, 80, 80)
Region.RemoveCircle(left, top, right, bottom) – Subtracts an elliptical/circular region (Exclude) from the current selection mask
Description: Subtracts an elliptical/circular region (Exclude) from the current selection mask.
Syntax: Call 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
VBScript / Visual Basic Example:
Call Region.RemoveCircle(60, 60, 140, 140)
Region.RemovePolygon(coords) – Subtracts a polygonal region (Exclude) from the current selection mask
Description: Subtracts a polygonal region (Exclude) from the current selection mask.
Syntax: Call Region.RemovePolygon(coords)
| Parameter | Description |
|---|---|
coords (Integer()) |
Array of polygon vertices (X,Y pairs) |
Return Value: None
VBScript / Visual Basic Example:
Dim pts() As Integer = {10, 10, 50, 10, 30, 50}
Call Region.RemovePolygon(pts)
4. UI Object (ScriptUIHelper)
The UI object provides access to user interface interaction, message box dialogs, event queue yielding, script cancellation tracking, and Windows clipboard operations in PhenoCapture.
Execution & Event Control
UI.IsCancelled() – Gets a boolean value indicating whether script execution cancellation has been requested
Description: Gets a boolean value indicating whether script execution cancellation has been requested.
Syntax: result = UI.IsCancelled
Parameters: None
Return Value: Boolean
VBScript / Visual Basic Example:
If UI.IsCancelled Then Exit Sub
UI.YieldEvents() – Yields execution to allow Windows Forms message processing and prevents the UI from freezing during long-running script loops
Description: Yields execution to allow Windows Forms message processing and prevents the UI from freezing during long-running script loops.
Syntax: Call UI.YieldEvents()
Parameters: None
Return Value: None
VBScript / Visual Basic Example:
Call UI.YieldEvents()
Dialogs & Clipboard Actions
UI.MsgBox(prompt, buttons, title) – Displays a modal message box dialog with customizable buttons and title bar text, returning the user button selection
Description: Displays a modal message box dialog with customizable buttons and title bar text, returning the user button selection.
Syntax: result = 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
VBScript / Visual Basic Example:
Dim btnResult = UI.MsgBox("Do you want to continue?", 36, "Confirmation")
UI.CopyToClipboard(text) – Copies the given text to the Windows system clipboard safely from any thread
Description: Copies the given text to the Windows system clipboard safely from any thread.
Syntax: Call UI.CopyToClipboard(text)
| Parameter | Description |
|---|---|
text (Object) |
Text or object content to copy to clipboard |
Return Value: None
VBScript / Visual Basic Example:
Call UI.CopyToClipboard("Result Data String")