Expand description
SPARQL-MM spatial+temporal query over vision OBSERVATION quins (D4.03).
Composes the vision-native semantic engine — it does NOT reimplement region / frame filtering. Two existing primitives are joined on the instance hash:
crate::semantic::query_by_frame_range— temporal filter overVisualObservationquins (frame index packed in metadata bits 16..48); each surviving quin carriesobject = instance_hash.crate::semantic::query_instances_in_region— spatial filter overhasBoundingBoxquins (box packed in the object payload); each surviving hit yieldssubject = instance_hash.
An observation is “in the window” iff its instance appears in BOTH result sets.
§Why the vision-native route (not SparqlMmHandler)
qualia_core_db::sparql_library::sparql_mm::SparqlMmHandler already recognises
the hasBoundingBox / hasTrackId predicate hashes this layer emits, and a
&[VisionQuin] could be reinterpreted as &[NQuin] (both are 6×u64 #[repr(C)]).
Its TEMPORAL dimension, however, keys off ma-ont#mediaTimeMs / hasStartTime
payloads in the object field — whereas vision observations carry the frame
index in metadata. Routing the temporal half through SparqlMmHandler would
therefore silently match nothing (or require inventing media-time edges we do
not have). The vision-native primitives model the frame semantics exactly, so
they are the route that composes correctly AND compiles cleanly. Documented per
the task’s “prefer the one that compiles cleanly” instruction.
§Template-leak safety
VisionQuin holds OBSERVATIONS, never biometric templates. This query returns
only instance/subject IDENTITY hashes (u64 node identifiers) and a count — it
never emits an object payload (which is where a packed box, or in other quin
families a template digest, would live). Callers cannot recover template bytes
through this surface.
Structs§
- ObsQuery
Result - Result of a spatial+temporal observation query: a count plus the instance (subject) hashes that fall inside the window. Never contains object payloads.
Functions§
- faces_
in_ zone_ time - Count + identify observation instances whose bounding box intersects the zone
[x0,y0,x1,y1]AND whoseVisualObservationframe is in[frame_start, frame_end].