Class PolygonZoneSettings
- Namespace
- VisioForge.Core.Types.X.AI
- Assembly
- VisioForge.Core.dll
Settings for a polygon zone used for occupancy counting.
public class PolygonZoneSettingsInheritance
Inherited Members
Remarks
By default coordinates are in source-frame pixels. Set VisioForge.Core.Types.X.AI.PolygonZoneSettings.UseNormalizedCoordinates
to true when passing 0..1 coordinates so they are resolved to frame-pixel coordinates
at runtime.
A point on an edge or vertex counts as inside the polygon.
Validate checks required fields (Id, point count, finite coordinates).
Self-intersection and zero-area checks are deferred to PolygonZone construction
because they require geometric computation.
Properties
Anchor
Gets or sets which point of the detection bounding box is used as the reference anchor for occupancy evaluation. Defaults to VisioForge.Core.Types.X.AI.DetectionAnchor.BottomCenter.
public DetectionAnchor Anchor { get; set; }Property Value
Color
Gets or sets the color used to draw this polygon and its counter. Defaults to SkiaSharp.SKColors.Cyan.
public SKColor Color { get; set; }Property Value
Id
Gets or sets the unique identifier for this polygon zone. Required.
public string Id { get; set; }Property Value
Points
Gets or sets the polygon vertices. Must contain at least three distinct points
forming a non-zero-area, non-self-intersecting polygon. By default these are in
source-frame pixels; set VisioForge.Core.Types.X.AI.PolygonZoneSettings.UseNormalizedCoordinates to true when
passing 0..1 coordinates.
public SKPoint[] Points { get; set; }Property Value
- SKPoint[]
UseNormalizedCoordinates
Gets or sets a value indicating whether VisioForge.Core.Types.X.AI.PolygonZoneSettings.Points are expressed in normalized (0..1)
coordinates. When true, coordinates are resolved to frame-pixel coordinates at runtime.
Defaults to false (pixel coordinates).
public bool UseNormalizedCoordinates { get; set; }Property Value
Methods
Validate()
Validates the settings and throws ArgumentException if any value is invalid.
public void Validate()