AnyTool
Your files never leave your device. All processing happens locally in your browser.

How do you measure an object’s real size from a photo or webcam, and is it private?

AnyTool Object Ruler estimates real-world sizes from a webcam still or an uploaded photo using a reference object of known size — entirely inside your browser. You freeze a webcam frame (or upload an image), then calibrate by drawing a line exactly across a reference whose real length you know, such as a credit/ID card (85.6 mm), a coin, A4 paper, a banknote, or a custom size. The tool computes pixels-per-millimetre from that line (pxPerMm = reference pixels ÷ reference millimetres) and then converts any line you draw into a real length in mm, cm or inches, with a rectangle area mode too. The camera frame is captured to an in-memory canvas and uploaded files are read with a local object URL — nothing is uploaded, recorded or sent to any server. It is an estimate, not a calibrated instrument: it is accurate only when the measured object sits in the same plane and at the same distance from the camera as the reference, with the camera square-on.

  • Calibrate by drawing across a known reference (ID-1 card = 85.6 mm, coin, A4, banknote, or custom)
  • pxPerMm = reference pixels ÷ reference mm, then real length = line pixels ÷ pxPerMm
  • Webcam freeze-frame or photo upload — both stay in the browser, nothing is uploaded
  • Draggable endpoints, a measurement list, mm / cm / inch units and a rectangle area mode
  • An estimate, not an instrument — object must be in the same plane/distance as the reference; perspective and lens distortion add error

What is

Object ruler (reference-object photo measurement)

An object ruler is a tool that estimates the real-world size of things in an image by using a reference object of known dimensions to convert pixels into physical units. After the reference is measured in pixels, a pixels-per-millimetre scale is established and applied to any other line drawn in the same image. Because a photo is a flat projection of a 3-D scene, the technique is reliable only when the subject lies in the same plane and at the same camera distance as the reference, shot square-on; perspective and lens distortion otherwise introduce error. AnyTool implements this 100% client-side from a webcam still or an uploaded photo.

Calculators

Related terms

Reference objectPixels per metricScale calibrationPerspective distortionPhotogrammetry

Frequently Asked Questions

No. The webcam frame is captured to an in-memory canvas and uploaded photos are read locally — nothing is uploaded, recorded or sent to any server.

Everything runs in your browser tab. A webcam still is drawn to an in-memory canvas, and an uploaded image is read with a local object URL that is revoked after use. The pixel-to-millimetre maths happens on-device — no frame or file is transmitted, stored or sent to a cloud service, and the camera is released the moment you freeze a frame or leave the page.

Freeze or upload a photo with the card in it, choose “Credit / ID card (85.6 mm)”, and draw a line exactly along that edge to set the scale.

Put the reference object flat in the same plane as what you want to measure and capture the shot square-on. Select the matching reference — a standard credit or ID card is ISO/IEC 7810 ID-1 at 85.60 mm on the long edge — then drag a line precisely from one edge of the card to the other. The tool divides the card’s pixel length by 85.6 to get pixels-per-millimetre, and from then on any line you draw is shown as a real length. Use a coin, A4 paper, a banknote or a custom size if you prefer.

It is a good estimate, often within a few percent on a careful flat, straight-on shot — but it is not a precision instrument.

Accuracy depends entirely on geometry. The object you measure must be in the same plane and at the same distance from the camera as the reference, because anything closer to the lens looks larger and anything farther looks smaller (perspective). Shoot straight-on with the camera square to the surface, fill the frame, use even light, and keep the reference flat beside the object. Wide-angle and phone lenses add barrel distortion near the edges, and a few pixels of slop when placing endpoints scales straight into the result. Treat the numbers as an estimate, not a calibrated measurement.

Yes. Switch between mm, cm and inches at any time, and use Area mode to multiply two perpendicular sides into a rectangle area.

After calibrating, the Length mode converts each line you draw into a real length, and the unit toggle instantly re-displays every measurement in millimetres, centimetres or inches. Area mode lets you draw two perpendicular sides of a rectangle and reports the product as an area in mm², cm² or in². All measurements are kept in a list you can delete from individually or clear entirely.

Detailed Explanation

Methodology

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
Privacy & Security

Privacy: The Camera and Photos Never Leave the Device

All capture and computation are client-side. A webcam still is drawn to an in-memory canvas and an uploaded image is read with a local object URL that is revoked after decoding — no frame or file is recorded, stored, uploaded or sent to any server, and there is no cloud AI. While the live preview runs, the only video shown is a local mirror; the moment the user freezes a frame or leaves the page, the MediaStream tracks are stopped and the camera is released, and the animation loop is cancelled on unmount. Because everything runs in the tab, the tool works offline after first load.

  • Webcam frame captured to an in-memory canvas — never uploaded
  • Uploaded image read via a local object URL, then revoked
  • No server round-trip and no cloud AI
  • Camera released on freeze and on page unmount
  • Works offline after first load
Limitations

An Estimate, Not a Calibrated Instrument — Known Limits

The reference-object method assumes the measured object lies in the same plane and at the same distance from the camera as the reference. Because a photograph is a flat projection of a 3-D scene, anything closer to the lens appears larger and anything farther appears smaller (perspective), so a reference on a different plane scales the result incorrectly. Oblique angles, wide-angle/phone-lens barrel distortion near the frame edges, and imprecise endpoint placement all add error — a few pixels of slop scale directly into the answer. Best results come from shooting straight-on with the camera square to a flat surface, filling the frame, using even lighting, and placing the reference flat beside the object. The output is a good estimate, often within a few percent on a careful flat shot, not a precision measurement.

  • Object must be in the same plane and distance as the reference
  • Perspective makes nearer objects look larger, farther ones smaller
  • Shoot straight-on (camera square to the surface), reference flat beside the object
  • Wide-angle/phone lenses add barrel distortion near the edges
  • A few pixels of endpoint slop scale directly into the result
Photo measurement: AnyTool in-browser object ruler vs typical approaches
AspectAnyTool Object RulerTypical measure-from-photo apps
Where it runsIn your browser tab, no installInstalled app or server upload
MethodReference-object pixels-per-mm calibrationReference object or AR/LiDAR depth
Image / cameraLocal only — webcam still or upload, nothing uploadedOften uploaded or cloud-processed
InputsWebcam freeze-frame or photo uploadPhoto, sometimes live AR
Unitsmm, cm, inch + rectangle areaVaries
EditingDraggable endpoints, deletable listVaries
AccuracyEstimate — best on a flat, straight-on shotVaries; AR/LiDAR can be higher
Cost / signupFree, no signupOften paid / account required

AnyTool computes every measurement locally and uploads nothing; it is an estimate, not a calibrated instrument.