How the Object Ruler Measures from a Photo
AnyTool Object Ruler estimates real-world sizes from an image using the reference-object (pixels-per-metric) technique, entirely in the browser. The user either freezes a webcam frame to an in-memory canvas or uploads a photo (read with a local object URL), then calibrates by drawing a line exactly across a reference object whose real length is known — a built-in list includes an ISO/IEC 7810 ID-1 credit/ID card at 85.6 mm, US/Euro/India coins by diameter, A4 and US Letter edges, a US banknote and an AA battery, plus a custom-millimetre option. The tool measures that calibration line in pixels and computes a scale, pxPerMm = referencePixels ÷ referenceMillimetres. Every subsequent line the user draws has its pixel length divided by pxPerMm to yield a real length, shown in millimetres, centimetres or inches; a rectangle Area mode multiplies two perpendicular measured sides into an area.
- Reference-object method: pxPerMm = reference pixels ÷ reference mm
- Real length = drawn line pixels ÷ pxPerMm; area = side1 × side2
- Built-in references include ID-1 card (85.6 mm), coins, A4, banknote, plus custom mm
- Input is a webcam freeze-frame or an uploaded photo — both stay on-device
- Pointer/touch drawing with draggable endpoints; mm / cm / inch and area output
