[ptx] Re: how to improve HFOV optimization?
Littlefields - Rik, Janis, Kyle & Peter
rj.littlefield at computer.org
Sat May 1 17:22:53 BST 2004
Hi Pablo,
On Fri Apr 30 09:00:26 BST 2004 Pablo d'Angelo wrote:
> I've one question. you scale by avgfov, I assume avgfov is the average of
> the two fov's involved in the control point, right? How does it behave if
> the hfov's are quite different? Shouldn't the fov of the complete pano be
> used instead (but if I remember correctly, that is not easily
available in
> the optimisation function)?
The avgfov that I use is the average over all images. I modified
SetAlignParams() to calculate that and leave it lying around in
a global variable. The optimization function fcnPano picks up
the average fov after it calls SetAlignParams to store parameter
values provided by the optimizer.
The way that I use this is to record the initialAvgFov calculated
from the starting parameter values. Then on every evaluation
of fcnPano I pick up a new currentAvgFov and scale all of the errors
by initialAvgFov / currentAvgFov;
I am guessing that your concern about different hfov's is that
scaling might change the way that the errors are weighted
between images. I think this is OK because I use the same
weight for all errors.
--Rik
> Hi Rik,
>
> On Thu, 29 Apr 2004, Littlefields - Rik, Janis, Kyle & Peter wrote:
>
> > Pablo,
> >
> > I plugged in the fov penalty that I suggested yesterday
> > > ... scale the errors by 1.0/avgfov
> > > to correct for the shrinking image size as fov gets smaller.
> >
> > It seems to work fine.
> >
> > Yesterday I gave this example:
> > > ...single-row series ... with a [nominal] 105mm lens (fov 12.3).
> > > It optimizes to average error (as reported by PTGui)
> > > of 0.446 pixels. When I force fov 10 and reoptimize,
> > > the average error drops to 0.445 pixels. At fov 5, the
> > > error is 0.323 pixels. It should be apparent why the
> > > optimizer wants to push fov to zero in this case.
> >
> > With the optimizer mod installed, this panorama now
> > optimizes to focal length 117mm (fov 11.1) even if
> > I start from geometries optimized for focal lengths
> > as far wrong as 20mm (fov 59.1) and 1000mm (fov 1.3).
> >
> > Does that sound like what you wanted?
>
> Yes, pretty much. Even better, since I would have tried to cure the
symtoms
> by adding an additional penalty term, instead of modifiying the old one.
>
> I think this should be tested and then applied to the panotools
> project on sourceforge.
>
> I've one question. you scale by avgfov, I assume avgfov is the average of
> the two fov's involved in the control point, right? How does it behave if
> the hfov's are quite different? Shouldn't the fov of the complete pano be
> used instead (but if I remember correctly, that is not easily
available in
> the optimisation function)?
>
> Sorry, I'm quite busy these days so I can't comment on everything
happening
> here.
>
> ciao
> Pablo
More information about the ptX
mailing list