Note 44 · iOS development
Your iOS scanner may be rejecting its own results
Check the shape you measured.

Separate the detector’s output from your acceptance filter and preview. Convert normalized coordinates using the processed image’s dimensions, and test ordinary placement before teaching users a workaround.
The card was there. The app rejected it.
A business card held straight would not trigger Boothcard’s scanner outline. Tilt it, and the outline appeared. In a 28 November 2026 debugging account, indie iOS developer Kou traced the behavior to several geometry mistakes, including an orientation filter that compared normalized widths and heights as if they were pixels.
The useful lesson for a small camera-app team is where to investigate. A failed scan can mean the detector returned nothing, your own filter rejected an observation, or the preview drew it incorrectly. Those are different failures. Before changing detection thresholds, record which stage lost the card.
This is a developer’s account of an existing app bug, not a new Vision feature or an independently reproduced device test. Apple’s documentation supports the coordinate conventions below; it does not establish Boothcard’s reported results.
An aspect ratio needs a definition.
Apple defines maximumAspectRatio as the shorter dimension divided by the longer one, with supported values from 0 to 1. A 2:1 rectangle therefore has a ratio of 0.5 for this setting. Entering 2 does not express “allow a card twice as wide as it is tall.” Stay within the documented range; do not rely on how an unsupported value happens to behave.
That detector setting is separate from a width-to-height calculation used to classify an observation. Apple says boundingBox coordinates are normalized to the processed image. A unit along x spans the image’s width; a unit along y spans its height. They are not interchangeable pixel distances.
One card. Two coordinate scales.
Normalized values
0.5 wide × 0.225 high
0.5 ÷ 0.225 ≈ 2.22Plotting both axes on a square stretches the shape.Image pixel dimensions
600 px wide × 360 px high
600 ÷ 360 ≈ 1.67Use the processed image’s 1200 × 1600 dimensions.For this unrotated example, multiply 0.5 by 1200 and 0.225 by 1600 before dividing. The resulting 1.67 is the region’s pixel width-to-height ratio. Use dimensions that match the orientation of the image Vision processed, rather than blindly taking the raw camera buffer’s width and height.
Keep the shape separate from its surrounding box.
Correct units solve only one problem. An axis-aligned bounding box also changes shape when its card rotates within the image. It measures the surrounding envelope, not the card’s edges. Apple’s VNRectangleObservation provides four corner points; convert them into a common pixel coordinate system before measuring edges. Perspective still changes apparent lengths, so this alone does not recover a card’s physical proportions.
Try a bounded iOS exercise: save one consented, non-sensitive test image and its returned observations. First check whether Vision found a rectangle. Then inspect your acceptance decision. Finally compare the overlay with the image. Keep those results separate so a preview error does not send you back to tuning detection.
Repeat with the card off-center, rotated within the frame, and in an image imported from Photos with a different aspect ratio. A centered example can conceal a wrong coordinate transform. These are proposed test cases, not a claim that every scanner uses the same transformation or thresholds.
If you delegate the repair, give the coding agent that saved input and the expected acceptance rule. Ask it to preserve evidence from the specific failing test, then check the actual iPhone preview. The product decision is simple: make ordinary card placement work before asking people to learn an accidental tilt gesture.
Sources & further reading
- Kou — Boothcard debugging account, published 28 November 2026; device results not independently reproduced
- Apple — rectangle detection and returned observations; reviewed 29 November 2026
- Apple — maximumAspectRatio definition and supported range; reviewed 29 November 2026
- Apple — boundingBox normalization to the processed image; reviewed 29 November 2026
- Apple — rectangle observation corner points; reviewed 29 November 2026
Examples are hypothetical unless explicitly attributed to a real product. Hypothetical examples illustrate the method and do not represent Piiko results or industry benchmarks.