Skip to main content

Crate sightloom_core

Crate sightloom_core 

Source
Expand description

Portable, allocation-conscious primitives for SightLoom vision pipelines.

This crate is the compact foundation: geometry, detections, overlap, NMS, and basic zone events. Rich observations, masks, tracking, smoothing, and memory live in higher crates.

Structs§

AnomalyId
A unique anomaly identifier produced by analysis.
AppearanceId
A unique appearance identifier (one continuous sighting of a subject).
ClassId
A model-specific class identifier.
Detection
A validated object detection with optional typed metadata.
DetectionBatch
A detection batch backed by mutable storage owned by the caller.
EmbeddingRef
An opaque handle to an embedding vector stored out-of-line.
EventEnvelope
Versioned, queryable event record for a VisionIndex.
EventId
A unique event identifier inside a VisionIndex document.
EvidenceRef
An opaque handle to stored evidence (frame crop, reel, sidecar blob).
FrameStamp
Temporal and source identity of a single frame sample.
KeypointSetRef
An opaque handle to a keypoint set stored out-of-line.
LineSegment
A finite, directed line segment with distinct endpoints.
LineZoneMonitor
Tracks crossings of a finite directed line segment for at most N tracks.
MaskRef
An opaque handle to a compact mask stored out-of-line.
MediaTime
Presentation timestamp as rational media time.
NmsConfig
Immutable settings for a non-maximum suppression pass.
ObservationId
A unique observation identifier within a processing context.
PatternId
A unique pattern identifier produced by analysis.
Point
A finite point in two-dimensional pixel space.
Polygon
A polygon borrowing its caller-owned vertex slice.
PolygonZoneMonitor
Tracks polygon membership transitions for at most N tracks.
Rect
A validated axis-aligned rectangle using half-open pixel coordinates.
SourceId
A media source (camera, file, stream) identifier.
SubjectId
A stable subject / identity identifier linked across tracks.
TrackId
A track identifier local to a single media source / tracker instance.
TrackKey
Composite key uniquely identifying a local track within one source.
TrackUid
Globally unique track identifier across all sources in a session.
VisitId
A unique visit identifier (subject presence in a scene or zone window).
ZoneId
An application-specific zone identifier.

Enums§

CoreError
An error produced by a core processing operation.
Direction
The direction in which a track crossed a directed line segment.
EventKind
Coarse kind tag for an indexed event.
EventPayload
Compact payload attached to an EventEnvelope.
GeometryError
An error produced while constructing validated geometry.
LineSide
The algebraic side of a point relative to a directed line.
NmsMode
The class-comparison policy used during suppression.
OverlapMetric
The rectangle-overlap metric used to suppress detections.
VisionEvent
A membership or crossing transition observed for a track and zone.

Functions§

crosses_segment
Returns whether two closed finite segments intersect.
intersection_area
Returns the area shared by two rectangles.
ios
Returns intersection over the smaller area (IoS) for two rectangles.
iou
Returns intersection over union (IoU) for two rectangles.
line_side
Returns the algebraic side of a point relative to a directed segment.
nms_in_place
Suppresses overlapping detections without allocating.

Type Aliases§

LocalTrackId
Local track id alias for multi-source APIs.