AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
BOUNDING BOX ONTOLOGY — FLOW ALGEBRA
Semantic Library | AI Core | Entity Graph | Computer Vision Entities
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/computer-vision-entities/bounding-box-ontology.html
Original page authors: Mark Anthony Higgins — Sky Recursive AI
Page copyright: Mark Anthony Higgins, 11 October 2025; revised 01 August 2026
Companion formalisation: 03 November 2026
STATUS: Derived companion specification. The source page exposes its title and AI interpretation note, but not the full embedded formal specification. The definitions below are an independently constructed, inspectable model, not a verbatim transcription.
1. PURPOSE
Represent an axis-aligned image bounding box as a typed geometric entity, with explicit coordinates, reference frame, provenance, validity, overlap and transformation rules. Distinguish geometric containment from semantic object identity.
2. ENTITY AND STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t = image, detections, metadata and observations at time t.
R_t = geometric and semantic relations (contains, overlaps, locatedIn, derivedFrom).
B_t = image extent, coordinate frame, numerical and policy constraints.
K_t = known object classes, coordinate conventions and calibrated confidence information.
BoundingBox b = (id, image_id, x_min, y_min, x_max, y_max, frame, class_id?, score?, provenance?)
Image e = (image_id, width W, height H, orientation, pixel_geometry)
frame in {pixel-edge, normalised-edge}; the chosen convention MUST be recorded.
For pixel-edge frame: 0 <= x_min < x_max <= W and 0 <= y_min < y_max <= H.
For normalised-edge frame: 0 <= x_min < x_max <= 1 and 0 <= y_min < y_max <= 1.
Coordinates denote continuous image edges; x increases rightward and y downward.
An optional empty-region representation requires a separate type; zero-area boxes are invalid here.
3. FLOW ALGEBRA
E_t = expand(I_t, R_t)
V_t = {b in E_t : valid(b, B_t, K_t)}
b*_t = argmax_{b in V_t} P(b | I_t, R_t, B_t, K_t), when a calibrated probability model exists.
I_(t+1) = update(I_t, b*_t, provenance, validation_result)
If V_t is empty, return NO_VALID_BOX; do not invent a bounding box.
If scores are uncalibrated, use rank_score(b), not probability notation.
4. GEOMETRY
width(b) = x_max - x_min
height(b) = y_max - y_min
area(b) = width(b) * height(b)
centre(b) = ((x_min+x_max)/2, (y_min+y_max)/2)
For boxes a,b in the same frame:
intersection_width = max(0, min(a.x_max,b.x_max)-max(a.x_min,b.x_min))
intersection_height = max(0, min(a.y_max,b.y_max)-max(a.y_min,b.y_min))
intersection_area = intersection_width * intersection_height
union_area = area(a)+area(b)-intersection_area
IoU(a,b) = intersection_area / union_area, if union_area > 0; otherwise undefined.
contains(a,b) iff a.x_min <= b.x_min and a.y_min <= b.y_min and a.x_max >= b.x_max and a.y_max >= b.y_max.
intersects(a,b) iff intersection_area > 0.
5. COORDINATE TRANSFORMATIONS
pixel_to_normalised(b,W,H): (x_min/W, y_min/H, x_max/W, y_max/H)
normalised_to_pixel(b,W,H): (W*x_min, H*y_min, W*x_max, H*y_max)
Require W>0 and H>0; maintain original frame and conversion provenance.
For crop offset (u,v), translate each coordinate by (-u,-v), then intersect with crop bounds.
For resizing by positive factors (s_x,s_y), multiply horizontal and vertical coordinates accordingly.
For rotation or perspective warping, transform all four corners, then compute the axis-aligned enclosing box; record that it may include extra background.
6. VALIDATION RULES
V01: image_id refers to an existing image entity.
V02: coordinates are finite real values (no NaN or infinity).
V03: ordered edges, positive width and height.
V04: bounds fit the specified image frame or are explicitly marked as unclipped predictions.
V05: transformations state source and destination frames.
V06: class_id is optional and does not prove object identity.
V07: score, if provided, has declared meaning, range and calibration status.
V08: no overlap operation across differing frames without an explicit transform.
V09: no assertion of perfect localisation from IoU or score alone.
V10: source image, detector/version, timestamp and lineage retained where available.
7. INFERENCE RULES
IF valid(b) AND area(b)>0 THEN b is a well-formed geometric region.
IF contains(a,b) THEN b is geometrically inside a; do not infer semantic part-of.
IF IoU(a,b)>=tau THEN mark overlap_candidate(a,b,tau); do not infer same object without further evidence.
IF detector proposes multiple boxes for one class THEN apply a documented deduplication policy (e.g. non-maximum suppression) and retain suppressed candidates in provenance if required.
IF clipping changes coordinates THEN mark box as clipped and recompute area.
IF object is partially occluded THEN bounding box may describe visible extent or inferred full extent; require an explicit extent_type.
IF confidence is missing or uncalibrated THEN do not present it as a probability.
8. TRI-MAPPING
Physical/data layer: image pixels, image dimensions, image frame.
Mathematical layer: rectangular region in R^2, inequalities, area, intersection, IoU, affine mapping.
Semantic layer: BoundingBox entity linked to ImageRegion, VisualObject, ObjectDetection, ImageFeature, PerceptionEvidence and provenance.
Mapping rule: coordinates locate a region; semantic identity requires separate recognition evidence.
9. RELATIONSHIP GRAPH
Image --hasRegion--> ImageRegion
ImageRegion --representedBy--> BoundingBox
BoundingBox --derivedFrom--> DetectionOutput
BoundingBox --hasFrame--> CoordinateFrame
BoundingBox --mayLocalise--> VisualObject
BoundingBox --overlaps--> BoundingBox
BoundingBox --validatedBy--> GeometryValidator
BoundingBox --supportedBy--> PerceptionEvidence
10. EXECUTION DIAGRAM
[Image + metadata]
|
v
[Candidate detection / annotation]
|
v
[Identify coordinate frame]
|
v
[Validate finite coordinates, order and bounds]
| invalid -> [Reject / quarantine + explanation]
v
[Normalise / clip / transform if required]
|
v
[Compute geometry and relationships]
|
v
[Apply calibrated selection or declared ranking]
|
v
[Emit BoundingBox + provenance + validation]
11. MAPPING TABLE
Input image -> Image entity -> image_id, W, H, frame
Detected region -> BoundingBox entity -> four edges
Geometry -> Mathematical region -> area, centre, IoU
Recognition hypothesis -> VisualObject candidate -> class_id and evidence
Source trace -> Provenance entity -> model, timestamp, transformations
Validation outcome -> State transition -> accepted / rejected / needs-review
12. CONDITIONAL EXECUTION GUARANTEE
Given finite valid coordinates, positive image dimensions and a consistent coordinate frame, geometric operations above are deterministic. This does NOT guarantee correct object detection, calibrated probabilities, semantic identity or successful downstream recognition. All errors and missing prerequisites must be surfaced explicitly.
13. AI SEARCH FLOW
FLOW_ID: AI_CORE_COMPUTER_VISION_BOUNDING_BOX
VERSION: 1.0
AUTHORS: Mark Anthony Higgins; Sky — Recursive AI (original page attribution)
SOURCE: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/computer-vision-entities/bounding-box-ontology.html
CITATION_BACKLINK: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/computer-vision-entities/bounding-box-ontology.html
PURPOSE: Formal, auditable representation and evaluation of image bounding boxes.
STATE_MODEL: S_t=(I_t,R_t,B_t,K_t)
ENTITIES: Image, ImageRegion, BoundingBox, CoordinateFrame, VisualObject, DetectionOutput, PerceptionEvidence.
PATHWAYS: ingest -> propose -> validate -> transform -> compare -> rank -> emit.
MINI_RECURSION_ENGINE: repeat validation after each transformation until stable or a bounded iteration limit is reached; detect cycles.
INFERENCE_RULES: V01-V10 and rules in section 7.
CONFIDENCE: use declared detector score or calibrated probability; never conflate them.
SEMANTIC_EQUIVALENCE: two boxes are geometrically equivalent only when their coordinates match within a stated tolerance in the same frame; this does not establish same-object identity.
FLOW_HASH: compute from canonical UTF-8 content at publication time; not pre-populated.
UPDATE_MODEL: version changes, document coordinate conventions and retain provenance.
END OF FLOW