Skip to main content

Semantic PTZ attention

Semantic PTZ attention keeps a camera focused on a relevant event instead of following every person, bicycle, or vehicle that passes through the image. It consumes an explicit event lifecycle, resolves a composition target through the selected source panorama, holds attention while the event remains active, and returns to an explicit mapped point after the event closes. Zoom stays fixed.

Start in shadow mode. The software implementation does not certify hardware: physical attention remains blocked until arrival and return have been qualified for the exact source identity, composition, panorama geometry and mapping revision.

PTZ attention is not a crime classifier. A relation such as people remaining near a vehicle can justify a closer view, but it does not prove theft or malicious intent.

What it does​

For each physical PTZ device, the attention runtime can:

  • accept semantic event OPEN, UPDATE, and CLOSE packets;
  • confirm a candidate before moving;
  • reject anchors and complete event envelopes outside the profile region;
  • acquire exclusive automated control of the physical camera;
  • navigate visually under the existing attention control lease;
  • keep the selected target through ordinary event updates;
  • wait through a short grace period after the event closes;
  • return to the configured mapped point;
  • record selected, suppressed, shadow, movement, return, and fault decisions.

This is different from camera firmware autotracking. Firmware autotracking reacts to motion inside the camera. PTZ attention reacts to semantic events produced by Toposync pipelines and uses their complete lifecycle.

Safety model​

The physical camera remains the protected resource:

  • one Camera device represents one physical head; wide and zoom lenses are sources of that same device;
  • manual control has higher priority than automation;
  • after manual takeover, automation does not move or return the camera;
  • shadow mode records decisions but sends no motor command;
  • live panorama mode requires current mapping and separate arrival/return qualification;
  • stale commands are rejected through the camera control lease and fencing contract;
  • movement is limited per minute;
  • a fault stops the automated session instead of guessing a recovery movement.

Disable camera firmware autotracking, monitor-point movement, and automatic return before enabling live PTZ attention, then confirm exclusive automation control in Cameras settings. Firmware movement happens outside the Toposync ownership model and can invalidate the expected pose.

Do not use PTZ attention as the only view of a safety-sensitive area. Preserve a wide recording or another fixed observer whenever possible.

Prerequisites​

Before creating a profile:

  1. Add the camera and select its enabled PTZ video source.
  2. Save a compatible source panorama and activate its validated mapping in a composition.
  3. Define a simple attention polygon and a return point strictly inside it. Keep the entire permitted region inside the mapping support.
  4. Produce events with stable identifiers, complete lifecycles and composition coordinates.
  5. Review decisions in shadow mode. Physical qualification is a separate stage; selecting live mode cannot bypass it.

See Camera mapping and Pipelines.

Dual-lens and TrackMix cameras​

Wide and zoom sources on a dual-lens camera may share one physical head. Model them as sources of one Camera device. The camera identifier is also the canonical physical actuator identifier, so separate Camera devices cannot accidentally share geometry state or a control lease.

If the observer source moves with the PTZ head, movement changes the scene that produced the event. Mapping is temporarily unavailable while moving and settling, and tracking may need to reacquire the subject afterward. Keep this configuration in shadow mode until same-head transition and reacquisition have been validated. A separate fixed observer avoids this feedback loop. Live profiles whose observer and actuator use the same Camera require a persisted acknowledgement in the profile; choosing a different source on that Camera does not bypass the gate because both sources still share the physical head. A later pipeline change to a same-head observer is blocked until that acknowledgement is saved.

Framing is verified on the source selected by the profile. A successful wide-lens arrival does not certify the zoom-lens image. A secondary lens needs its own compatible source identity and geometry before it can be used as the framing reference. ONVIF command acknowledgement alone proves neither framing nor return.

Configure a profile​

Open Settings > PTZ Attention and create a profile. The wizard has four steps.

1. Events​

Choose only semantic event sources that expose:

  • a stable event identifier;
  • OPEN, UPDATE, and CLOSE lifecycle packets;
  • a world anchor or envelope in composition coordinates. Image-only boxes and preferred legacy views are rejected by panorama profiles;
  • enough persistence to distinguish a relevant event from ordinary passing traffic.

Examples include a person stopped in a mapped entrance area or one or more people remaining near a vehicle. The event detector decides relevance; PTZ attention only arbitrates already-qualified events.

2. Camera and mapping​

Choose the physical camera, its video source, and the current panorama mapping in the composition. Enter the return point as X/Z coordinates and the permitted region as at least three X/Z pairs, one vertex per line. Crossed, repeated or degenerate vertices are rejected. Events on the boundary or whose envelope extends outside the region are rejected.

Existing view profiles are retained for explicit review. Replace view destinations clears their destination choices in the editor and starts in shadow mode; nothing is persisted until you choose the mapping, region and return point and save. The system does not infer a return point from a preset.

3. Policy​

The table lists the API model defaults. The new-profile wizard deliberately starts more conservatively at 3 s candidate confirmation, 6 s close grace, 18 s stale timeout, and 2/min maximum movements to reduce mechanical churn. Tune only from recorded shadow decisions.

SettingDefaultPurpose
Candidate confirmation0.5 sPrevents a transient packet from moving the camera.
Minimum focus10 sKeeps a selected event stable instead of switching rapidly.
Maximum focus120 sForces a bounded return even when an event never closes.
Close grace5 sTolerates short gaps after the event closes.
Cooldown10 sPrevents an immediate return-and-refocus loop.
Stale timeout12 sEnds attention when updates disappear without a clean close.
Settle timeout8 sBounds the wait for movement and stabilization.
Control lease15 sRequires automation to keep ownership alive.
Maximum movements6/minLimits mechanical churn.
Minimum target confidence0Panorama resolution supplies no estimated physical confidence; keep zero for this contract.

4. Safety and mode​

Stored modeBehavior
disabledProfile remains configured but does not evaluate or move.
shadowEvaluates events and records decisions without motor commands.
live_panoramaVisual navigation and return, blocked without exact physical qualification.
live_presetPrevious view profile; requires explicit review and migration.
pausedHolds automation until resumed; remembers the previous resumable mode.

Use shadow first. Software validation never enables physical movement by itself.

Connect a pipeline​

Add ptz_attention.request after the operator that produces the qualified event. The operator runs on the main Toposync server because it creates an external device-control effect. Select the configured panorama profile in the operator; its event priorities, region and return govern the request.

semantic event with OPEN / UPDATE / CLOSE
-> ptz_attention.request
-> PTZ Attention profile
-> Cameras control lease
-> qualified visual panorama navigation

An OPEN packet must include a spatial target. UPDATE packets refresh the active session without changing an accepted destination by default. In shadow, an observed event whose initial target was unresolved can be reconsidered when an update supplies a valid target, including a complete envelope inside the region. An update without an observed open cannot start attention. Optional following in shadow confirms changed mapped targets from fresh captures over the configured interval; movement within the same panorama reference does not restart that interval at every frame. It never moves a motor. CLOSE releases the semantic event and starts the configured grace and return behavior. Graph edges must preserve OPEN and CLOSE; only intermediate updates may be compacted.

For people near a vehicle, a typical perception branch is:

camera.source
-> core.fps_reducer
-> vision.detect
-> camera.camera_mapping
-> vision.track
-> camera.velocity_estimation
-> vision.group_events
-> vision.spatial_relation_event
-> ptz_attention.request

Configure vision.group_events in proximity mode with person and vehicle categories and include_stationary_members=true. Set the request node's fixed event_type to person_vehicle_interaction; the profile policy must use the same value.

For a person stopped in front of the house, use core.stationary_event after tracking and velocity estimation. Prefer core.fps_reducer over a motion gate in these flows; a motion gate can starve the stationary evidence the event needs.

Runtime states​

StateMeaning
IDLENo event owns attention; this state alone does not prove the physical pose.
CANDIDATEA possible event is waiting for confirmation.
ACQUIRINGControl and the visual target are being acquired.
FOCUSEDThe selected event owns attention at the resolved target.
GRACEThe event closed; the runtime is waiting through close grace.
RETURNINGThe camera is returning to the mapped point.
MANUAL_OVERRIDEManual control owns the physical camera.
FAULTAutomation stopped after a control or validation failure.

The settings panel exposes current state, active event, panorama target, whether a lease is active, movement count, recent decisions, readiness issues, and faults.

Manual control and operator actions​

  • Pause here stops automated decisions without forcing a movement.
  • Resume automation returns the profile to its previous enabled mode.
  • Return home requests the configured mapped return point. Pause first when the profile must remain paused after the return.
  • Opening manual PTZ control preempts automation. Closing the manual controls does not silently send the camera home.

When a return fails, inspect the fault and the live image before retrying. Do not repeat movement blindly when the camera, network, or physical scene is uncertain.

Troubleshooting​

The profile cannot enter live panorama mode​

Check the current mapping, source compatibility, exclusive automation control and any shared-observer acknowledgement. Physical qualification pending is expected until the exact mapping passes separate arrival and return trials. A model prediction, accepted command or ready panorama is not arrival evidence. The software accepts only fresh visual arrival within 12 pixels, return within 3 pixels, confirmed stop and the same control lease, fence and motion epoch.

The camera does not move​

Check whether the profile is disabled, shadow, or paused; whether manual control owns the camera; whether the user has camera-control permission; and whether the selected event reached candidate confirmation.

A target cannot be resolved​

Recent decisions distinguish a missing target, an envelope outside the permitted region, unavailable mapping, incompatible source binding, and pending physical qualification. The requested coordinates are retained with the decision for inspection. A repeated unresolved shadow update does not repeat the same warning; closing that observed event still closes its lifecycle.

Person–vehicle relations retain world coordinates when both participants have ready panorama geometry from the same mapping and revision. Visual localization must belong to each participant's own capture. This geometric evidence does not invent a confidence score or override an explicitly weak score. Unqualified coordinates still fall back to image-space proximity, which cannot direct a panorama attention profile.

Measure latency​

Decisions include elapsed time from the input event packet to the decision and from controller receipt to the decision. These are not the time since the first appearance of a subject. Physical focus acquisition additionally records command dispatch to verified arrival and the source where arrival was checked. Shadow decisions never report physical arrival latency. Keep detection, event confirmation, command transport, and visual arrival separate when diagnosing delay.

The camera moves too often​

Increase candidate confirmation, minimum focus, or close grace. Reduce the number of event sources and narrow the permitted region. Keep the movement-per-minute limit enabled.

The camera never returns home​

Check for a missing CLOSE, a stale event, manual takeover, or a FAULT state. After a process restart, an interrupted live session enters FAULT because the physical pose is unknown. Inspect the image, then use Return home explicitly; the runtime never guesses a recovery movement. Call it only after confirming that the configured return point is safe and qualified.

Mapping disappears during movement​

This is expected when observation and PTZ movement share one physical head. Use a fixed observer, or keep same-head operation in shadow until reacquisition is reliable.

Validate before live movement​

  1. Run the profile in shadow and review priority, suppression, timeout and return decisions.
  2. Confirm that fast passers and targets outside the region are rejected.
  3. Test changed capture generations, pause, manual takeover and revised mappings in simulation.
  4. Qualify physical arrival, return and cancellation separately before live use.
  5. Repeat physical qualification after a source, composition or geometry change; there is no automatic promotion.

Do not rely on this alpha feature for unattended security monitoring, access control, emergency response, or any automation where a missed event or unexpected movement could cause harm.