Two pictures of a ball
Worth reading first: One picture of a ball · Two rays that do not meet · The one thing a single view cannot give.
One picture of a ball gives a direction and a ratio: the tangent cone’s axis is the direction of the centre, exactly, and its half-angle is the arcsine of radius over distance, exactly. Neither the radius nor the distance separately.
A second picture removes that, and the arithmetic is three lines.
Two cones, two axes, one point
Each picture fixes a cone through its own eye. Each cone’s axis is a line through that eye toward the ball’s centre. Two lines through two known points, both passing through the same unknown point: the intersection is the centre.
Then the radius comes from either half-angle — , with now known — and the two pictures should agree about it, which is a check rather than an average.
The centre comes back at the arithmetic floor and the radius to nine decimal places. There is nothing clever in it; the cleverness was all in the previous rung’s step from a conic to a cone.
There is no correspondence problem, and that is unusual
An ordinary two-view reconstruction spends most of its effort on matching: finding the same feature in both pictures. A wrong match is not a small error — it puts a point somewhere else entirely — and every practical system is mostly machinery for not making one.
Here there is nothing to match. A ball’s outline in one picture and its outline in another are outlines of the same ball by construction; the two cones are two constraints on one object, and no point of either outline has to be paired with any point of the other.
That is a real advantage and it is worth understanding where it comes from. It is not that the object is easy to detect; it is that the object is the feature. A sphere is determined by four numbers and the recovery works on the object rather than on points of it, so the correspondence question never arises.
depth field. A single wrong pairing in a point-based reconstruction produces a point with nothing wrong-looking about it.The same property is why the wall under the paint works with one extra view: there the correspondence is given by the design, here it is dissolved by the object having no parts. Two different ways of not having a matching problem, and both of them are why those recoveries are exact where a general one is statistical.
The conditioning is one angle and it is the baseline
Two lines meet well when they cross squarely and badly when they are nearly parallel. Everything about how well this recovery behaves is in that one angle.
At a baseline of a few metres against a ball a couple of metres away, the axes cross at a comfortable angle. Bring the eyes together and the angle collapses toward nothing.
Which is exactly the depth field’s own result in a different costume: depth from two views is a reciprocal, so the uncertainty along the line of sight grows as the square of the distance and falls as the baseline. Nothing about the object being a ball changes that.
What does change is where the angular error comes from. In a point-based reconstruction it is the accuracy of a pixel; here it is the accuracy of a fitted conic, which uses hundreds of edge pixels at once and is correspondingly better. So a ball is a well-conditioned target for a given baseline, and badly conditioned for a short one, in the ordinary way.
The other route, and why it is not taken
There is a second way to fix the ball from two views and comparing them says what the cone route is for.
The other way is to use the two outlines’ extreme points. A ball’s outline has a leftmost and a rightmost point in each picture; take those four rays and solve for a sphere tangent to all of them. It is a determined problem and it works.
It also throws away almost everything. Each outline has hundreds of edge pixels and the conic fit uses all of them; picking four extreme points uses four, and picks the four whose position is least well determined, since an outline’s extremes are where the edge runs parallel to the direction being measured and the gradient across it is weakest.
So the cone route is not chosen for elegance. It is chosen because the conic is the sufficient statistic — every edge pixel of the outline contributes to it, and nothing about the ball that the picture knows survives outside it.
That is a small instance of a general preference this site has and it is worth naming. Fit the object the data is about, not a handful of features on it. The four-point predictor in the light field does the opposite deliberately, to separate a fit from a prediction; here there is nothing to separate, and using everything is right.
foundations field: five marks fix it and a sixth is predicted. An outline supplies hundreds, which is why the fit is a measurement rather than a construction.The degeneracy, and the refusal
Put the two eyes and the ball in a line. Both cones then have the same axis — the line joining everything — and two coincident lines determine no point.
The solver refuses. closestPointToRays asserts that the bundle spans enough directions to pin a point, and a pair of parallel rays fails that assertion rather than returning the nearest thing to an answer.
twoviews field: a point on the line joining the two eyes has an epipolar line that collapses, and the constraint that usually locates it says nothing.That refusal is worth having explicitly rather than as a numerical accident. A least-squares solver handed two nearly-parallel rays returns a point — some point, far away, with an enormous covariance nobody looked at — and a solver handed exactly parallel rays either returns a NaN or divides by something small and returns a very large number. Both of those are worse than refusing, because both of them are answers.
And the degenerate arrangement is not exotic. Two photographs taken from the same spot at different times, or a stereo pair pointed at something on its own baseline, are both this. It is the arrangement a photographer produces by accident.
depth field: a turn of the head is not a step sideways, so a rotated pair has no baseline and no depth at all.What two pictures still do not give
They do not give any point of the ball’s surface.
That sounds like pedantry and it is the thing that stops this generalising. Two outlines are two curves: the contour generator in one view is a different curve on the object from the contour generator in the other, meeting it at exactly two points. So the recovery above never learns where on the ball anything is.
For a sphere that costs nothing, because a sphere has a centre and a radius and no other shape. For any other surface it is the whole difficulty, and it is what the visual hull is about — a reconstruction from outlines converges to something that is not the object, and the part it never reaches does not shrink with the number of views.
So the two rungs together say something narrow and exact. A ball is completely recovered by two views — four numbers, four constraints, no ambiguity but the ordinary conditioning — and the reason is that a ball has no shape beyond its size and place. Everything harder than a ball needs more than outlines.
Why this arrangement is used to calibrate cameras
The recovery has a practical relative worth naming, because it explains why spheres turn up in calibration rigs at all.
Run the problem the other way. Put a ball of known radius in front of two cameras whose poses are unknown, photograph it in several places, and the outlines constrain the cameras rather than the ball. Each outline is a conic with five degrees of freedom; each ball position adds three unknowns and each view of it gives five constraints, so the count comes out in the calibration’s favour quickly.
What makes a sphere attractive for that is exactly what makes it useless as a measurement in one view: it has no orientation. A checkerboard has to be seen well enough for its corners to be located and its plane’s pose recovered, and it fails at oblique angles and near the edges of a wide frame. A ball looks the same from everywhere, so it can be moved anywhere in the field of view — including the corners, where a lens’s distortion is largest and where a plumb-line fit most needs data.
So the object’s poverty is its usefulness. A sphere carries no information about its own orientation, which means every picture of it carries the same kind of information, which means the pictures can be combined without any of the pose bookkeeping a planar target needs.
lens field: a distortion recovered from straightness alone, which needs marks near the frame’s edges and gets them badly from a flat target.And the scale is not free either
There is a caveat that the arithmetic hides and it is the site’s usual one.
The centre and the radius come out in whatever units the baseline is given in. Two pictures with an unknown baseline give the ball’s shape — which for a sphere is nothing at all, since every sphere is similar to every other — and its position relative to the two eyes, up to one overall factor.
Which is two views give shape and no size, arriving on an object where the “shape” half is vacuous. So a ball is the extreme case: two uncalibrated views of one give literally nothing but a direction pair, and the whole content of the recovery is bought with the baseline.
twoviews field. A ball’s version of it is stark, because a sphere’s shape carries no information and everything is in the scale.Why the check is that the two half-angles agree
The recovery uses one half-angle to get the radius and has a second one spare. That spare is a check and it is the right kind.
Both cones are computed from their own pictures, with no reference to each other. The centre is found from the axes alone. So the radius from camera A’s half-angle and the radius from camera B’s are two independent estimates of one quantity, and their agreement is a statement about the whole chain — the conic fits, the calibrations, the two cone decompositions, and the intersection.
A recovery that used both half-angles to fit the radius would have thrown that away. Using one and checking the other is the same discipline the four-point predictor applies to a shadow: determine with exactly as much data as the problem needs, and spend the surplus on a test.
The four numbers, counted
A count is worth writing out because it is what makes “two views finish it” a statement rather than an observation.
A sphere in space has four degrees of freedom: three for the centre and one for the radius.
One picture of it, from a calibrated camera at a known place, gives a tangent cone. A cone through a fixed apex has three: two for the axis’s direction and one for the half-angle. So one view leaves one degree of freedom, which is the slide along the ray with the radius scaled to match — the family the previous rung draws.
A second view gives three more constraints on a problem with one unknown left. Two of them fix it and the third is surplus, which is the radius check.
That arithmetic is the reason a ball saturates so early, and it is also why the check exists at all: a determined problem with no surplus has nothing to verify itself against, and this one has exactly one spare number. Using it as a test rather than folding it into a fit is the choice that turns the surplus into information about the machinery.
manyviews field: seven directions no quantity of pictures fixes, found by walking along them rather than by arguing about them.What a third picture adds
Nothing, for a ball, and that is worth saying because it is unusual.
Four numbers determine a sphere. Two views supply four constraints — two axes, each of which is two numbers’ worth of direction — with one surplus already. A third view adds three more constraints to a problem with no unknowns left, so what it buys is noise reduction and a check, not identifiability.
That is a different situation from a point cloud, where every extra view buys accuracy on every point, and from a camera track, where more views buy the track as well as the scene. A ball saturates at two.
manyviews field, where more pictures determine more. A sphere is the case that stops needing them.What this does not settle
It does not treat a ball resting on a known plane, which is a different and better-posed problem: the plane supplies the scale, and one view is then enough — which is the same trade a height from one photograph makes.
It does not treat two views of a ball that is moving. Then the two outlines are of the same object in two places and the recovery is over-determined in the wrong way.
It does not treat uncalibrated cameras, which give conics and no cones, so nothing above starts.
And it does not treat the ball whose outline is partly hidden. A conic needs five points and an occluded arc may or may not supply them, which is a question the foundations field asks about marks rather than about arcs.
A second view is worth exactly what the first one was missing, and no more. On a ball that is the scale, so two views finish the problem; on anything with a shape, outlines never do, however many there are.
twoviews field: each eye appears in the other’s picture, and everything degenerate happens on the line joining them.What links here
Computed from the collection, not written here: the essays that point at this one.
Shares its objects with
Essays that name at least two of the same things, and that neither author linked.
- A rig is right on one surface — both name baseline, demonstration, depth from disparity
- A shadow across a second object — both name conditioning, least-squares intersection, triangulation
- The curvature a shadow reports — both name conditioning, demonstration, reconstruction
- The lamp is the second eye — both name baseline, epipolar geometry, triangulation
- The marks name the place, not the height — both name conditioning, demonstration, scale ambiguity
- Two pictures on one screen — both name baseline, demonstration, triangulation
Named objects
A flat tag is an object no other essay names yet.
Angular sizeBaselineCalibrationConditioningDemonstrationDepth from disparityEpipolar geometryleast-squares intersectionQuadricReconstructionscale ambiguityTangent coneTriangulation