The length of a thing, from two photographs and an unmarked sheet of paper.
Put the thing on any sheet of paper. Photograph the sheet twice, from two different places, with the thing whole in both pictures. In each photograph tap the four corners of the paper, going round it without crossing, then the two ends of what you want measured. The page reads the shape of your paper from those corners, poses both cameras from the same corners, and returns the distance between your two points and how far they stand above the paper.
Nothing is printed and nothing is taped. The three pieces before this one posed each camera on eight corners of a target you had to print, fold and tape; a bare rectangle is weaker, and how much weaker is measured rather than assumed. Four corners still give the focal length and the rotation of each photograph, and the shape of the rectangle to a hundredth. They cannot give the size of the sheet, because it cancels out of the equations: every distance below is in short sides of your paper, and millimetres appear only when you declare the paper. That is the whole cost of leaving the printer out.
210 is A4 and 216 is US Letter. A sheet of unknown size still reads, in short sides, and the shape of it is then printed instead of assumed.
the whole sheet has to be in both pictures, and both ends of the thing with it.
nothing read yet
one waiting for a photograph
two waiting for a photograph
the reconstruction, from the side
the figure is drawn once the twelve taps are in. the sheet is the line at the bottom, the two points are where the page put them, and the verticals are how far each one stands above the paper.
what two photographs of a bare rectangle decide
Four corners give one homography per photograph, and a homography from a rectangle to an image carries the camera's rotation and its focal length. The constraints are the rectangle's own right angles: the two directions of the paper must come out perpendicular, and the two columns of the rotation must come out the same length. Both are dimensionless, so they can be added, and the pair of them is what a search minimises over the two unknowns, the focal length and the shape of the rectangle, shared by both photographs.
On the bench pair, whose answer is known because it is rendered by the same projection code the checker uses, the search returns a shape of 1.414315 for a true 1.414286 and a focal length of 900.01 pixels for a true 900. The camera centres come back at a ten thousandth of a short side, and the length at two hundredths of a millimetre. The same code refuses six things by name, and each refusal is measured: see the numbers below.
The size of the sheet is the one thing that does not come out. It multiplies every equation on both sides and cancels, so the page leaves it as a variable: declare 210 millimetres and the answer is in millimetres, declare nothing and it is in short sides. Doubling the declared sheet doubles every distance exactly and changes neither the focal length nor the shape, which is the check that this is a scale and not a guess.
Each of the two ends is then triangulated from the two cameras, and its height above the paper falls out of the same reconstruction. If both points come out on the paper, one photograph would have been enough and the page says so; if they stand above it, one photograph puts them on the paper and the length comes out too long, by eleven per cent on the bench pair.
what this cannot see
Four corners must be the corners of a rectangle and nothing else: a folded corner, a sheet cut by the edge of the picture, or a table mat that is not rectangular all fail the rectangle test. A photograph taken straight above the paper is worse than it looks. Both vanishing points run to infinity, no focal length can be read off them, and this page refuses once the sheet comes within eighteen degrees of square on, because the answer moves by 3.6 per cent with no other warning. Two pixels of shaking on each tap is the second guard, and it is the one that catches every other case in this family. A wide angle or a macro shot bends these numbers by an amount the pinhole model here does not carry. Both photographs must show the same two physical points, and the same sheet, which they do unless you moved the paper between them. Nothing leaves the browser either, so there is no link to share: the number stays on the screen it was read on.
the numbers this page is allowed to print
Every number below is printed by verify/check.js on scenes rendered by the same projection the page reads, so the answer is known before the reading is made. On the bench pair, whose true length is 142.800 millimetres of an A4 sheet: the shape comes back 1.414315 for a true 1.414286, the focal length 900.01 pixels for a true 900, the camera centres to a ten thousandth of a short side, the length to two hundredths of a millimetre, and two pixels of finger shaken over sixteen draws move it by 1.9 per cent. Twelve taps each moved two pixels, over twenty four pairs, give a median error of 0.90 millimetres and a worst of 2.60. A paper seen square on reads 147.9 millimetres where the truth is 142.8, which is 3.6 per cent, and its own shake is 138 per cent: the gate is at eight, and with the gate opened that same pair stops being refused. A grazing pair carries 90 per cent of shake, a quadrilateral with one corner sixty pixels off costs 7.3e-2 where the gate is 1e-2 and a pair tapped three pixels off costs 1.1e-4, and two points that are not the same point in both photographs push the rays 3.7e-2 apart where a good pair holds 3.6e-7. One photograph alone measures what lies on the paper exactly, to a millionth of a short side, and reads a standing object 158.2 millimetres long instead of 142.8, eleven per cent too long. Declaring the paper as wide as it is tall turns 142.8 into 111.6.
use it on something
Draw a shape on the paper, photograph it once, and you have measured a drawing. Stand a mug on the sheet, photograph it twice, tap the rim on both sides, and you have its diameter and the height of the rim. Put a foot on the paper, tap heel and toe in both photographs, and you have a foot length without a ruler. The two taps do not have to be on the same object: two distant marks on a wall with the sheet on the floor is a length of wall, as long as the sheet is in both pictures and both marks are whole.