compare_view
Compare a 3D model against a reference image to verify size and outline alignment, catching scale or shape mismatches.
Instructions
Compare the model with a reference image in one flat view: the main metric of a build from references.
The reference is placed in the world: its bottom on the model bottom, horizontal centres equal.
Scale: height_m is the real size of the subject along the VERTICAL of the (turned) picture, width_m along
its horizontal; give one, and a model that is too big or too small is caught. With none the reference is fitted
to the model height and only the outline shape is compared. iou_outline is always that shape-only match.
Views (the model front faces -Y, Z up) and the picture each expects. front: +X to the right. back: -X to the
right. right (side is the same): camera on +X, the front points LEFT. left: the front points right. top: +X to
the right, the front at the BOTTOM. bottom: the front at the top. flip ('x' left-right, 'y' top-bottom) and
rotate (degrees clockwise; flip first) turn the reference for this call.
names is the model (empty: everything visible but a huge floor or backdrop, listed in excluded).
Returns iou_registered, both sizes, a table per band along the vertical (widths, delta, shift, verdict; worst
first) and inner_detail: edge_agreement 0..1 between the reference inner edges and the creases and depth steps
of the model (the IoU does not see slots and holes inside the outline). Under IoU 0.3 a hint says if a mirrored or turned reference fits far better. The image: reference,
model, overlay (red reference outline, green model outline, yellow and blue inner edges), difference; out also
saves it. colors=N adds the match of N colour classes of the reference. For a perspective photo use
match_camera and overlay_reference.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| out | No | ||
| flip | No | ||
| size | No | ||
| view | No | front | |
| bands | No | ||
| names | No | ||
| colors | No | ||
| rotate | No | ||
| width_m | No | ||
| height_m | No | ||
| reference | Yes | ||
| threshold | No |