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 | |
|---|---|---|---|---|---|
![]() |
inImage | Image | Input image | ||
![]() |
inRoi | Region | None | None | Range of pixels to be processed | |
![]() |
inReferenceColors | list[Pixel] | Colors to compare pixels to | ||
![]() |
inMaxDifference | float | 0.0 - ![]() |
5.0 | Maximal difference between pixel and reference color to be accepted |
![]() |
inDifferenceMultipliers | list[float] | None | None | Scales for maximum differences for each color | |
![]() |
inChromaAmount | float | 0.0 - 1.0 | 0.7 | Proportion of chromatic information in distance computation |
![]() |
inForceDisjointRegions | bool | False | Force output regions to be disjoint | |
![]() |
outRegions | list[Region] | Regions of pixels closest to colors |
Hardware Acceleration
This operation supports automatic parallelization for multicore and multiprocessor systems.



