Measuring from one picture

One picture of a ball

The outline of a ball in a photograph fixes the cone of rays that graze it, so the cone's axis is the direction of the ball's centre and its half-angle is the arcsine of radius over distance — both exactly, and neither of them separately. A ball a hundred and thirty-seven times larger, a hundred and thirty-seven times further away, draws the identical conic. And the drawn ellipse's own centre is not the image of the ball's.

Worth reading first: The ball at the edge of the frame · The one thing a single view cannot give · The ball a drawing does not draw round.

Every quadric has one outline computes the drawn conic from the object: three matrix products, C=adj(Padj(Q)PT)C = \operatorname{adj}(P \operatorname{adj}(Q) P^{\mathsf T}), and the ellipse lands on the traced contour generator to nineteen decimal places.

This essay runs it backwards. Given the conic — read off a photograph, with nothing else — what is known about the ball?

One picture of a ball, and the family it cannot separateThe room from above. The outline in the picture fixes the cone of rays that graze the ball: its axis is the direction of the ball's centre, to 8.5e-7°, and its half-angle is asin(r/d) — 6.1640° here, against 6.1640° from the ball itself. Neither the radius nor the distance appears separately anywhere in that. The three balls drawn are 1, 2, 4 times as far away and 1, 2, 4 times as large, and their outlines are the same conic to 9.7e-12 px. This is the site's one-view scale ambiguity, on an object where it is usually assumed away — and beside it a trap, because the drawn ellipse's own centre is 2.25 px from the image of the ball's centre and reading one for the other is a real error.the eyecorrect from 9 cm, at 160 mm wideoutlines agree to 1e-11 px
Fig. 1 The room from above. The outline fixes the cone of rays that graze the ball, and three balls of different sizes at different distances sit inside the same cone and draw the same conic.

The outline is a cone, and the cone is what is known

Every point of the outline is where a ray from the eye grazes the ball. So the set of grazing rays is a cone with its apex at the eye, and the outline is that cone’s section by the picture plane.

Given the camera’s calibration, the conic in the picture and the cone in space are the same object written two ways: the cone’s matrix is KTCKK^{\mathsf T} C K, and its axis and half-angle come out of that matrix’s eigenstructure — one eigenvalue of one sign against two of the other, the odd one out being the axis.

So one photograph of a ball gives:

The direction of the ball’s centre, exactly.

The ratio r/dr/d, as the sine of the cone’s half-angle, exactly.

And neither rr nor dd separately, at all.

One picture of a ball, and the family it cannot separateThe room from above. The outline in the picture fixes the cone of rays that graze the ball: its axis is the direction of the ball's centre, to 8.5e-7°, and its half-angle is asin(r/d) — 6.1640° here, against 6.1640° from the ball itself. Neither the radius nor the distance appears separately anywhere in that. The three balls drawn are 1, 1, 2 times as far away and 1, 1, 2 times as large, and their outlines are the same conic to 4.6e-12 px. This is the site's one-view scale ambiguity, on an object where it is usually assumed away — and beside it a trap, because the drawn ellipse's own centre is 2.25 px from the image of the ball's centre and reading one for the other is a real error.the eyecorrect from 9 cm, at 160 mm wideoutlines agree to 5e-12 px
Fig. 2 The family drawn closer together. Every member is at a stated multiple of the distance with its radius scaled to match, and every one of them fills the cone exactly.

Where the sign pattern comes from

The eigenvalue condition is easy to state and worth a moment, because it is the whole of the routine’s domain check.

Write the cone as a quadratic form on directions. In the cone’s own frame it is x2+y2tan2θz2=0x^2 + y^2 - \tan^2\theta\, z^2 = 0 — two positive entries across the cone and one negative along its axis — so the three eigenvalues are two of one sign and one of the other, and tan2θ\tan^2\theta is minus the odd one over the average of the pair.

That pattern is what makes a real cone a real cone. Three eigenvalues of the same sign is an imaginary cone, which is what a conic with no real points produces; one zero eigenvalue is a degenerate pair of planes.

So the routine finds the odd eigenvalue out, takes the ratio, and asserts it is positive. If it is not, the input was not the outline of anything and the answer would have been a number computed from a quantity that has no arccosine.

One projection, two routes: divide by depth, or multiply and divide laterThe same box through the site's pinhole and through a 4×4 projection matrix with the divide postponed until after clip space. The worst disagreement over all twelve edges is 4.0e-14 px, which is the noise floor of double precision rather than an approximation.x/z, y/z — the pinholeM·p, then divide by wworst disagreement 4.0e-14 px over 8 verticescorrect from 13 cm, at 160 mm wide62° across · near 0.1 m, far 1000 m
Fig. 3 The calibration this depends on, from the pipeline field: a camera written as a matrix and checked against the camera’s own projection, so that the sandwich the cone comes out of is built on something verified.

The scale ambiguity, demonstrated rather than asserted

That third statement is the site’s oldest limit and it is worth showing rather than saying.

Take the ball. Move it a hundred and thirty-seven times further from the eye and make it a hundred and thirty-seven times larger. Compute its outline from scratch, through the same three matrix products.

The two conics agree entry for entry to the arithmetic floor. Not nearly the same ellipse; the same conic, because the two balls are inscribed in the same cone and the cone is all the picture has.

Two scenes 251× apart, and the one picture they both makeEverything in the second plan — the room, the eye's distance, the eye's own height — is 251 times the first. Every projected vertex agrees to 1e-13 px. A single photograph has no scale, and this is what that means.a room 2.8 m across, eye 1.6 m up1 mthe same plan, 251× bigger251 midenticalpicturesthe picture — both scenes, drawn twice, one on top of the otherlargest disagreement 1e-13 px over 8 verticesone length has to come from outside the picture
Fig. 4 The general form, from the field’s own first rung: a world a hundred and thirty-seven times larger, projected from a hundred and thirty-seven times further away, giving an identical picture.

The demonstration is better than an assertion for the usual reason on this site: “one view cannot supply scale” is a sentence that could be true of a method rather than of the geometry, and the identical conic says it is the geometry.

It is also the reason a photograph of a ball is such a poor measurement and such a good calibration target. Poor, because it says nothing about the ball’s size or distance. Good, because everything it does say — a direction and an angular radius — is exact, and neither depends on the ball being at any particular place.

A ball 36 degrees off the axisOne ball of radius 0.40 m, 4.60 m from the eye, carried across the picture on a circle about the eye so that its distance never changes. At 36.5° off the axis its outline is 1.246 times longer along the radius from the centre of the picture than across it, and the centre of that outline is 2.91 px from the image of the ball's own centre — 6.5% of the outline's own semi-axis. Both numbers are zero on the axis and neither is a lens: the outline is computed as C = adj(P adj(Q) Pᵀ) from an exact pinhole.2.91 px apartcorrect from 8 cm, at 160 mm widestretch 1.246 · centres 2.91 px
Fig. 5 The same ball drawn off the axis, where its outline is an ellipse. The cone recovery is unaffected by the elongation, because the elongation is a property of the section rather than of the cone.

The trap: the drawn ellipse’s centre

There is a shortcut a reader will reach for and it is wrong by a measurable amount.

The drawn outline is an ellipse. An ellipse has a centre. Surely that centre is the image of the ball’s centre?

No. The foundations field measured the gap: at twenty-three degrees off axis the two are over two pixels apart on a 690-pixel canvas, and the gap grows with the field angle. A centre is defined by midpoints of chords, and a projection through a point does not keep midpoints, so the centre of the image is not the image of the centre.

The centre offset against distance, for two circle sizesThe offset is largest for a near, large circle and never reaches zero until the circle's plane is parallel to the picture.02463456distance from the eye to the circle (m)offset between the two centres (% of the ellipse's width)r = 0.40 mr = 0.90 mmeasured from fitted ellipses7.3% at 2.5 m
Fig. 6 The gap between the two centres against field angle. It is zero on the axis and grows monotonically, which is what makes the shortcut right in exactly the one place nobody needs it.

So the cone route is not an elaborate way of doing something easy. Reading the ellipse’s centre gives a direction that is wrong by a real angle; taking the cone’s axis gives one that is right at the arithmetic floor.

And the trap is well camouflaged. On the axis the two agree exactly, which is where a method gets tested; the error grows toward the edges, which is where the object usually is.

The same ball, three drawings, one of them roundA ball of radius 0.40 m drawn three ways, each panel scaled about its own outline so that only the shape is being compared. Orthographic draws it as a circle — aspect 1.000000000000, which is an arithmetic one rather than a close one — wherever the ball is put. The cavalier, 45° at full scale draws it as an ellipse of aspect 1.414214, exactly 1/|n̂·d̂| from the projection's own direction, which is the number every drawing manual replaces with a circle template. And a camera at 37° off axis draws an ellipse of aspect 1.259 whose centre is 2.17 px from the image of the ball's own centre. The two parallel drawings put those centres 3.5e-13 px apart, which is what having no centre of projection buys.orthographicaspect 1.0000cavalieraspect 1.4142a camera, 37° off axisaspect 1.2593correct from 7 cm, at 160 mm widecentres 4e-14 / 3e-13 / 2.17 px
Fig. 7 And the case where the shortcut is exact: a parallel drawing puts the outline’s centre on the image of the ball’s centre, so the same reading that fails on a photograph is right on a drawing.

That contrast is worth carrying. The same measurement — read the drawn ellipse’s centre — is exact under a parallel projection and wrong under a camera, and the difference is the last row of the projection matrix.

What the half-angle is good for

The ratio r/dr/d is an angular radius, which is the thing an astronomer measures and calls apparent size. It is exact from one picture and it is the whole of what the picture says about the ball’s size.

Two things follow.

A ball of known radius gives its distance immediately: d=r/sinθd = r/\sin\theta. That is one photograph and one length, which is this site’s own recurring shape of measurement — a single view supplies a ratio and a known length turns it into a distance.

And a ball at a known distance gives its radius the same way, which is the arrangement a calibration rig uses.

A 3.4 m object measured from one picture, 24 m awayThe base, the horizon crossing, the top and the vertical vanishing point have a cross-ratio of 1.9101. With the eye at 1.62 m that gives 3.400 m, against a true 3.4 m. The camera is not consulted.horizon — the eye's own heightbase — 0 mhorizon crossing — 1.62 mtop — 3.40 m recoveredthe vertical vanishing point is 8586 px above this framerecovered 3.400 m · true 3.400 m4.0 cm per pixel of click error
Fig. 8 The field’s own first instance of the same trade: a height out of one photograph, which needs a known length somewhere in the scene to turn a ratio into metres.

Neither of those is a new result; what is new is that the ratio comes from an outline rather than from a pair of marks, so it needs no feature on the object and works on a ball with no texture at all.

Two facts about one photograph, and they are not the same fact

It is worth separating two statements that a reader is likely to run together, because they are about different objects and only one of them is the scale ambiguity.

The first: the picture does not say where on the ball each outline point came from. Two views of a curved surface draw two different curves on it, and one view draws one curve whose identity on the surface the picture never mentions. That is a fact about correspondence and it holds however many pictures there are.

The second: the picture does not say how big the ball is. That is the scale ambiguity, and it is repaired by a second view or by a known length.

The two are independent, and a reader who conflates them concludes that a second picture solves everything. It does not: two pictures fix the ball’s size and position exactly and still say nothing about which points of the surface either outline came from, because those points are different in the two views by construction.

For a ball that costs nothing, since a sphere is determined by a centre and a radius and has no other shape to recover. For anything else it is what the visual hull is about, and it is the term that does not go away.

The front view and the top view draw two different curves on the ballThe two contour generators of one ball, drawn on the object in a third view so that both can be seen at once. The front view's outline is the great circle perpendicular to its own ray; so is the top view's; and they are perpendicular to each other, so they meet in exactly two points — the frontier points, marked. A transfer line between the two views joins the marked pair, which are 1.414 radii apart here and √2 apart at the worst. Turn the view by one degree and the curve on the ball turns by one degree with it; a box's silhouette does not move at all until the direction crosses a face's plane, and then it jumps to another set of the box's own edges.frontierthe transfer joins points 1.414 R apartone ball, two outlinesmeeting in exactly two points
Fig. 9 The correspondence question, from the parallel field: two outlines of one ball, which are images of two different curves and meet at exactly two points.

Why the cone’s axis and not the outline’s

The eigen-decomposition deserves a sentence, because it is where the exactness comes from.

A cone of rays through the eye is a quadratic form on directions. In its own frame that form is diagonal with two equal entries and one of the opposite sign — two across the cone, one along it — so the odd eigenvector is the axis and the ratio of the eigenvalues gives tan2θ\tan^2\theta.

That is a statement about the cone, and the cone is exactly what the outline determines. Everything about the picture plane’s position and orientation has already been divided out by the calibration, so no choice of picture plane can move the answer.

The ellipse’s centre, by contrast, is a property of the section — of the cone and the plane it was cut by — so it moves when the picture plane moves. Which is the same statement as the picture plane being a choice: a quantity that changes when the glass moves is a quantity about the glass.

The picture plane tilted 14°Pointing the camera up tilts the picture plane with it, and three things happen at once: the verticals converge — 3.59° between the outer two — the horizon drops 213 px below the middle of the frame, and the vertical vanishing point arrives at 3425 px from the principal point. They are one fact: the product of those two offsets is f².correct from 20 cm, at 160 mm wideverticals converge 3.59° · horizon 213 px off centre
Fig. 10 The result that says which quantities are safe: one eye and two picture planes give a homography of the picture, so anything that survives a homography belongs to the eye and anything that does not belongs to the plane.

What the calibration is doing, and what happens without it

The step from a conic in the picture to a cone in space is one matrix sandwich, KTCKK^{\mathsf T} C K, and it is worth being explicit about what that step consumes.

KK carries the focal length and the principal point. Without it there is a conic on a sheet of pixels and no way to say what angle any of it subtends — a wide lens and a long one draw ellipses of the same shape at different sizes, and a picture with no calibration cannot tell the difference between a large ball far away through a long lens and a small one near through a short one.

So the angular radius is bought with the calibration, and it is bought entirely with it: every other quantity in the recovery is projective and survives without one. The axis’s direction, in particular, needs KK too — the cone’s axis is a direction in camera coordinates, and turning pixels into directions is what KK is for.

That puts the essay’s result in the right place among the site’s stratification. What one picture of a plane determines walks the ladder from projective to affine to metric, and this sits on the metric rung: the outline gives a conic projectively, and only a calibrated camera turns it into an angle. An uncalibrated camera looking at a ball has a conic and knows that some quadric produced it, which is almost nothing.

Projective, affine, metric — what each stage buysThe photograph fixes the plane only up to a projectivity: the midpoint of a receding side lands 0.3970 of the way along. Supplying the plane's vanishing line buys the midpoint back exactly and nothing else. Supplying the image of one circle buys the last three numbers, at which point the right angle is 90.000° and two equal sides measure 1.000000. The cross-ratio is 1.333333 in all three, because it was never lost.projectiveaffinemetricmidpointtwo equal sidesa right anglecross-ratioprojective1.333333333affine0.5000001.333333333metric0.5000001.00000090.000°1.333333333— means the stage does not determine it at allcross-ratio 1.333333 throughout
Fig. 11 The ladder from a projective reading to a metric one, from the foundations field. A ball’s angular radius sits at the top of it and needs everything below.

The refusal, and the ball that is not in the picture

coneFromOutline asserts that the eigenvalues have the sign pattern a proper cone has — one against two — and refuses otherwise.

That refusal has a meaning. A conic in the picture that is not the section of a real cone through the eye is not the outline of anything: a hyperbola, say, or a degenerate pair of lines. Handed one, the routine could return an axis and a half-angle by taking absolute values, and the numbers would be plausible and would refer to nothing.

Which is the same failure mode the shadow’s curvature exhibits one rung back, and the refusal here is what that fit lacks: a check that the input is the kind of thing the model can be about.

The eye's polar plane cuts a coneThe curve on the surface whose tangent plane passes through the eye — the contour generator — is exactly where the surface meets the polar plane of the eye, Q x. Here it is drawn as a plane and a curve rather than as a silhouette traced in the picture. A cone is a singular quadric, so the section is a pair of straight lines rather than a closed curve, and its two branches run off the ends of the clip.correct from 18 cm, at 160 mm widea singular quadric · a pair of lines
Fig. 12 The degenerate case from the foundations field, where the dual route loses an outline entirely. Every routine in this family has a domain and the ones that do not announce it are the dangerous ones.

Why a ball is the object this works cleanly on

The recovery above is unusually tidy and the tidiness is a property of the sphere rather than of the method, which is worth saying so that a reader does not over-generalise it.

A sphere has no orientation. Its tangent cone from any point is a right circular cone, so the cone has an axis and one angle and nothing else — three numbers for the direction and one for the size, against a sphere’s own four degrees of freedom, of which the picture fixes three.

An ellipsoid’s tangent cone is not circular. It has an axis, two half-angles and a roll, and none of those is straightforwardly the direction of the centre — the cone’s axis is pulled toward the ellipsoid’s long direction, so reading it as the direction of the centre is a second version of the drawn-ellipse trap, one level up.

So the clean statement — axis is direction, half-angle is angular radius — is a sphere’s own property. For anything else the outline still fixes the cone exactly, and unpacking the cone into facts about the object is where the work is.

That is worth keeping in view because the sphere is the case everybody tests on. A recovery validated on balls and deployed on fairings is a recovery whose cleanest assumption has quietly stopped holding, and nothing in the arithmetic announces it.

The eye's polar plane cuts an ellipsoidThe curve on the surface whose tangent plane passes through the eye — the contour generator — is exactly where the surface meets the polar plane of the eye, Q x. Here it is drawn as a plane and a curve rather than as a silhouette traced in the picture. Every point of it projects onto the conic the duals predict, to 1.2e-20 of the conic's own scale, over 242 points.correct from 18 cm, at 160 mm wideoutline from the duals · ellipse
Fig. 13 A quadric that is not a sphere, and its contour generator. The one-line outline formula is unchanged; what changes is what the outline can be unpacked into.

What a second picture adds

One picture gives a ray and a ratio. Two give the ball, and the arithmetic is short: two cone axes are two lines through two eyes, they meet at the centre, and the radius follows from either half-angle.

That is the next rung and it has its own conditioning and its own degeneracy, which are worth an essay because they are not the ordinary two-view ones — there is no correspondence problem here, since a ball’s outline in one picture and its outline in another are guaranteed to be the same ball.

Two pictures fix the ball, and the baseline is the conditioningTwo pictures of one ball give two tangent cones, and where their axes cross is the ball's centre — from which the radius follows from either half-angle. The angle the axes cross at is the whole of the conditioning, and it is what the baseline buys: 42.6° at 2.82 m here, against 2.38° at 0.15 m. At zero baseline the two axes are one line and the intersection is not a point at all — the solver refuses rather than returning something plausible, which is the behaviour a recovery should have at a degeneracy and usually does not.020406012345the baseline between the two eyes (metres)angle between the cone axes (°)40.3°two cones, one ballcentre to 9e-7°
Fig. 14 What the second picture buys, ahead of its own essay: the angle the two cone axes cross at, which is the whole of the conditioning and is set by the baseline.

What this does not settle

It does not treat an uncalibrated camera. The step from the picture conic to the cone needs KK, and without it the outline gives a conic and nothing angular at all.

It does not treat a general quadric. An ellipsoid’s tangent cone is not circular, so its axis is not the direction of its centre and the eigen-decomposition says something more complicated and less useful.

And it does not treat the outline’s own accuracy. Fitting a conic to a blurred edge is an estimation problem with its own literature, and everything here assumes the conic is given exactly — which is the same assumption every essay in this field makes and states.

A single picture of a smooth object gives the cone of rays that graze it, and that cone is the whole of what is known. Every quantity that is a property of the cone is exact; every quantity that needs the picture plane as well is a quantity about the glass.

One picture of a ball, and the family it cannot separateThe room from above. The outline in the picture fixes the cone of rays that graze the ball: its axis is the direction of the ball's centre, to 8.5e-7°, and its half-angle is asin(r/d) — 6.1640° here, against 6.1640° from the ball itself. Neither the radius nor the distance appears separately anywhere in that. The three balls drawn are 1, 3, 9 times as far away and 1, 3, 9 times as large, and their outlines are the same conic to 5.5e-12 px. This is the site's one-view scale ambiguity, on an object where it is usually assumed away — and beside it a trap, because the drawn ellipse's own centre is 2.25 px from the image of the ball's centre and reading one for the other is a real error.the eyecorrect from 9 cm, at 160 mm wideoutlines agree to 6e-12 px
Fig. 15 The family at its widest. Nothing in the picture distinguishes the near small ball from the far large one, and the site’s whole account of what one view gives is that sentence with different objects in it.
A 20.0 m circle on the ground, seen from inside itThe whole conic is drawn, including the part no camera can photograph. The nearest point of the circle is 1.00 m behind the plane through the eye, so the image is a hyperbola: one branch below the horizon, its partner above, and the two asymptotes are the images of the two points where the circle crosses that plane. B² − 4AC = 5.46e-1.horizonthe eye stands 8.78 m from the centrecorrect from 26 cm, at 160 mm widehyperbola · nearest point -1.00 m
Fig. 16 The neighbouring question in the foundations field: which conic a circle in the world becomes when it is photographed. A ball’s outline is the same machinery asked about a surface rather than a curve.
One picture of a ball, and the family it cannot separateThe room from above. The outline in the picture fixes the cone of rays that graze the ball: its axis is the direction of the ball's centre, to 8.5e-7°, and its half-angle is asin(r/d) — 6.1640° here, against 6.1640° from the ball itself. Neither the radius nor the distance appears separately anywhere in that. The three balls drawn are 1, 3, 7 times as far away and 1, 3, 7 times as large, and their outlines are the same conic to 1.1e-11 px. This is the site's one-view scale ambiguity, on an object where it is usually assumed away — and beside it a trap, because the drawn ellipse's own centre is 2.25 px from the image of the ball's centre and reading one for the other is a real error.the eyecorrect from 9 cm, at 160 mm wideoutlines agree to 1e-11 px
Fig. 17 The family at a smaller spacing. Nothing about the picture changes as the members move along the ray, which is the demonstration rather than the assertion.

What links here

Computed from the collection, not written here: the essays that point at this one.

Reads more easily once this is understood

Essays that name this one as worth reading first.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

A flat tag is an object no other essay names yet.

Angular sizeCalibrationcentre of projectionConicDemonstrationOutlineQuadricReconstructionscale ambiguityTangent cone