SegmentImage_Color


Segments an image basing on distance to model colors.

Applications:Detection of objects of undefined shape, but characterized by uniform color and good contrast to the background.

Syntax

C++
C#
Python
 
def SegmentImage_Color(
	inImage: Image,
	inReferenceColors: list[Pixel],
	/,
	*,
	inRoi: Region | None = None,
	inMaxDifference: float = 5.0,
	inDifferenceMultipliers: list[float] | None = None,
	inChromaAmount: float = 0.7,
	inForceDisjointRegions: bool = False
)
-> outRegions: list[Region]

Parameters

Name Type Range Default Description
Input value inImage Image Input image
Input value inRoi Region | None None Range of pixels to be processed
Input value inReferenceColors list[Pixel] Colors to compare pixels to
Input value inMaxDifference float 0.0 - 5.0 Maximal difference between pixel and reference color to be accepted
Input value inDifferenceMultipliers list[float] | None None Scales for maximum differences for each color
Input value inChromaAmount float 0.0 - 1.0 0.7 Proportion of chromatic information in distance computation
Input value inForceDisjointRegions bool False Force output regions to be disjoint
Output value outRegions list[Region] Regions of pixels closest to colors

Hardware Acceleration

This operation supports automatic parallelization for multicore and multiprocessor systems.