PanoTools mailing list archive
|Date/Time:||Sat, 06 Jan 2001 13:27:44 +0100|
|Subject:||Re: Number of Control Points, was Re:|
Richard Moore wrote:
> > No. Each control point represents one equation.
> It seems to me a single control point could represent two equations.
> If the error function to be optimized is the Cartesian distance between the
> two mapped locations of the control point, then yes, the cost is
> by a single equation.
> However, if you are minimizing that distance with respect to two variables
> get two partial derivatives that we want to find the zeros of. This should
> if you hold r and v constant and optimize y and p -- the transformations
> are linear.
This is exactly how the Levenberg-Marquardt-solver in PTools works: There is a cost
function which is the cartesian distance of the control point coordinates
in the final panorama (corrected for edge effects). This is one function
(equation) for each control point. The solver generates for each
iteration as many linear equations from this function (by calculating
the first and second partial derivatives), as there are variables to optimize,
and then finds the next iteration by solving these equations. It
is a refinement and extension of the Newton method for finding
You are right that for some combinations of 2 variables (eg yaw and pitch)
one control point is sufficient to find the solution, for other
combinations, however, this is not true (eg yaw and roll, or yaw and
One more general remark about control points:
The cost function as it is now uses the pixel distance in
the target panorama. This is not optimum and overemphasizes
points at large pitch angles (up or down). You should avoid
using control points above 70° pitch and below -70°.
This is also one of the problems with adding cap shots
to panos. I will probably change the cost function
to use the angular distance of control points instead.