hoangsonww / hoangsonww/AegisVision-Computer-Vision-System
Feature: Camera calibration and zone-geometry versioning workflow
- Dominant language
- Go
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
## Summary
Add first-class camera calibration and zone-geometry versioning so line-cross, dwell, count, and zone-enter rules can be maintained safely as cameras move or scenes change.
## Problem / Opportunity
The platform supports rule predicates and stream/pipeline revisions, but operational CV systems often fail because physical camera changes silently invalidate zone polygons, line definitions, or perspective assumptions. AegisVision needs a workflow that treats geometry as versioned operational configuration with validation, preview, audit history, and rollout semantics.
## Proposed Feature
Introduce a geometry profile resource per stream that stores calibration metadata, regions of interest, lines, masks, perspective transforms, and version history. Pipeline rules should reference immutable geometry profile revisions, and operators should be able to preview a geometry change against recent frames before activating it.
## Scope
- Define geometry profile and revision APIs.
- Support polygons, lines, masks, labels, coordinate system metadata, and optional homography/perspective data.
- Add validation for malformed, self-intersecting, or out-of-frame geometry.
- Wire rule-engine/pipeline compilation to reference geometry revision IDs.
- Add console editing and preview against sampled frames from claim-check/media.
- Audit create/update/activate events and expose geometry revision history.
## Acceptance Criteria
- [ ] A stream can have multiple geometry profile revisions with exactly one active revision.
- [ ] Rules can bind to a specific geometry profile revision rather than mutable inline coordinates.
- [ ] Invalid polygons, lines, and masks are rejected with RFC 9457 problem details.
- [ ] The console provides a visual geometry editor and preview mode over recent frames.
- [ ] Geometry activation is audited and visible in stream/pipeline history.
- [ ] Docs explain how geometry revisions interact with pipeline revisions and retention.
## Non-Goals
- Full camera intrinsic calibration from checkerboard captures in the first release.
- Rewriting the existing rule predicate model.
- Automatic scene understanding or semantic zone generation.
## Dependencies / Risks
- Requires consistent coordinate conventions across console, API, and dataplane operators.
- Needs a migration path from existing inline rule geometry.
- Preview must respect raw-media access and redaction policies.
## Open Questions
- Should geometry profiles live under stream-manager, pipeline-service, or a small dedicated service?
- Should activating a geometry revision require an approval gate for regulated tenants?
Contributor guide
Assessment
This issue has not been assessed yet.