PanoTools mailing list archive
|Date/Time:||Fri, 05 Jan 2001 21:48:56 +0100|
|Subject:||Number of Control Points, was Re:|
John Blommers wrote:
> Haw! Your are right. Each control point represents two variables to be
No. Each control point represents one equation.
The number of variables to solve is set in the 'v'-line
of the script.
If the equations to solve were linear equations of the
variables, then you would need as many equations (ie
control points) as variables (most of the time).
Unfortunately, this is (a) a set of highly nonlinear
equations, and (b) this is an optimisation, ie we're
not solving the equations, because an exact solution
doesn't exist, but only seeking the best approximation.
You can visualize the problem by looking at an example:
Suppose you want to stitch two images without any remapping,
and optimize yaw, roll and pitch. Setting control
points is like pinning a needle through both images
at that point. Obviously, two needles fix the
relative position. However, the optimizer will find an
exact solution only if the distance between the
two control points is the same in both images,
otherwise the problem is unsolvable, and you get
just an approximate solution. Mathematically, setting
a third point doesn't help, or might make things worse,
but practically, the solution will improve. Setting
just one point always yields an exact solution, but
it is worthless. Things get more complicated if you
include more variables, remapping etc.
Using at least as many control points as variables to optimize
is a rule of thumb, and there may be cases where you need
more or where less are sufficient.