[ptx] 'circle-kind' output of optimization for a 360 degree panorama

Sebastian scut at nb.in-berlin.de
Sat Dec 20 03:42:15 GMT 2003


Hi list,


On Fri, Dec 19, 2003 at 06:54:19PM +0100, Pablo d'Angelo wrote:

> > Maybe this could be made into an FAQ entry, as I experienced it three
> > times by now on three different panoramas, and for a newbie it is very
> > frustrating. What do you think?
> 
> Hmm yes, shure, it would be very useful. If you want to modify it, please
> go ahead. its included in the hugin package, at
> src/hugin/xrc/data/FAQ.html, and add the questions, and maybe answers ;)

I added a new section "Common problems" to the FAQ
(screenshots removed due to size):


<h3> Common problems encountered while creating a panorama</h3>
<h4><a href="#top" name="problems_curvedhorizont">In my panorama the horizont is curved, how to straighten it?</a></h4>
<p>
If the panorama looks nice but the horizont is curved, there are two ways to
improve the image and straighten the horizont. First, try optimizing the view
by selecting &quot;Positions and View&quot; as the optimization mode and run
the optimizer afterwards. By clicking &quot;Calculate Field of View&quot; in
the &quot;Stitcher&quot; tab and displaying the preview window afterwards you
can check if the image has been improved.
<br><br>
If it is still curved, you have to add horizontal guide control points in the
&quot;Control Points&quot; tab. What works best for me is to select the first
image in the left half of the window and the image next to it in the right
window, just as you do with normal control points. Then add a control point in
some left part of the left image, where the horizont is. In the right image
select a point on the horizont in the right part of the image. Once this point
is added, change its type in the list below to &quot;horiz. Line&quot;, as
displayed in the image below (the red circles in the left/right part of the
left/right image). You might want to switch off the auto-add and auto-estimate
options while doing this to avoid naggy dialogs while adding this guide
points (which I forgot in this screenshot).
	<center><img src="horiz-guide.jpg" alt="Hugin screenshot displaying
		horizontal guide line between two images"></center>
<br>
Then, just cycle one image pair to the right and do the same thing. For some
images where lots of buildings are you have to guess where the horizont is,
but do not worry, you do not have to be that exact (and most people can guess
the horizont quite well without seeing it, must be some kind of evolutional
ability ;-).
<br><br>
Afterwards run the optimizer with the &quot;Positions and View&quot; setting,
update the preview and check the result. For panoramas that have more than one
horizontal line of images, you usually only have to set horizontal guides for
one line.
</p>
<h4><a href="#top" name="problems_circledpano">When optimizing my 360 degree
panorama it results in a circle instead of a hfov-360 panorama. How to make
hugin recognize its a 360 degree one?</a></h4>
<p>
In some 360 degree panoramas you might encounter an optimization like this:
<center><img src="problem-circle.jpg" alt="360 degree panorama invalidly
optimized as circled pictures"></center>
<br>
This is not a bug, but a feature ;-) As the panorama tools can handle images
in any orientation, once the optimizer has found a strong local minimum it
might be unable to escape from it. The way of avoiding this is to guide the
optimizer by giving rough picture estimates for the yaw values (as pointed out
by <a href="http://www.postle.net/">Bruno Postle</a>). To do this, count how
many pictures are in your horizontal line. For 40 degree horizontal pictures
this might be 10-12 pictures, sometimes more. Then divide 360 by the number,
for example lets assume you have 12 pictures in one horizontal line, so 360 /
12 = 30. In the &quot;Images&quot; tab enter the yaw values in increasing
order. Be careful to do this in the right order, i.e. if you took your
pictures from left to right, just add 30 to each yaw value, starting with 0
for the first picture, then 30, 60, 90, etc. This does not have to be very
exact, its just there to avoid the optimizer stepping into a local minima it
might not be able to escape from. If you have multiple horizontal lines of
images, you can do this for the other lines as well right now or try without
doing so and if it fails, redo it later. Be sure to save your .pto file before
optimizing.
<br><br>
Now optimize using &quot;the Custom parameters below&quot; and clear the pitch
and roll and view optimizations. For the &quot;yaw&quot; box, select every
picture but the first. Then optimize. Now you should land at a pretty good
first estimate, which you can check in the preview tab after updating the
preview. With this rought estimate, you can apply the normal &quot;Position
and View&quot; optimization now.
<br><br>
If it still has some circles, you can try to set and optimize the pitch, too.
</p>
<h4><a href="#top" name="problmes_blackblends">There are dark blends between
two images, how to remove them?</a></h4>
<p>
If there are visible black zones between two source images in the final output
image but they are not visible in the preview, the most likely reason for that
is feathering happening with the black background. This occurs if two images
overlap only slightly and the feather width is set to more pixels than the
overlap. It happens because feathering happens inside the image boundary, up
to 'feather size' pixels into the image. If there is no overlapping picture
within this border, the feathering takes place between the black background
and the picture, which makes the black background shine through the image. To
change this, either: (a) decrease the feather size to below the overlapping
amount, or (b) increase the overlap of the two pictures. While (a) is always
possible if there is any overlapping, (b) should be considered while taking
the pictures in the first place.
</p>

----(end)----

Hopefully some more knowledgeable people can pick this first start up and
improve the answers a bit. :-)

I send the screenshots to Pablo, so in case they are ok they can be added to
CVS. For people wanting to see them now, I put them online at:

http://segfault.net/~scut/pano/horiz-guide.jpg and
http://segfault.net/~scut/pano/problem-circle.jpg


ciao,
Sebastian

-- 
-. scut at nb.in-berlin.de -. + http://segfault.net/~scut/ `--------------------.
-' segfault.net/~scut/pgp `' 5453 AC95 1E02 FDA7 50D2 A42D 427E 6DEF 745A 8E07
`- GBU-31 blueprints available. payment >500k$. hi echelon! -----------------'


More information about the ptX mailing list