Forcing a horizon - and missing doc. for Manual Optimization

Discussion forum for Tawbaware's PTAssembler software, Helmut Dersch's Panorama Tools software and any other photography related software

Moderator: spamkiller

Post Reply
Allan Olesen
Posts: 3
Joined: Tue Jul 29, 2014 4:13 am

Forcing a horizon - and missing doc. for Manual Optimization

Post by Allan Olesen » Tue Jul 29, 2014 4:52 am

I am trying to create a panorama from handheld photos where the horizon line is visible in most of the photos. And I am struggling really hard getting the horizon straight without bends or offsets. I have given up on automatic creation and is now trying to find the best manual approach.

If anyone has good pointers to the best strategy for this, I would like to hear about it. Below I have described what I have already done.

First I tried setting lines of horizontal control points in the Step 3 screen. But those seemed to be generally ignored. The horizon would still bend, meaning that the optimizer must have given more weight to other control points.

Then I tried unchecking pitch and roll in the Step 4 screen for all the photos with a visible horizon. After that, I set each of the photos as a reference photo one by one and set a reference point so the red line's position and angle would fit the horizon of the photo. This resulted in new pitch and roll parameters for each photo, and I believe that those should result in a straight horizon (at least when they pass through the approximate centre of the photo so lens distortion doesn't play a role). Edit: This was sort of a last resort solution. Since I can't get the same magnification in the reference point picking screen as in the control point picking screen, I will probably end up with some rather unprecise values for pitch and roll.

After that, I tried running the optimizer to "fill in the blanks" - mostly yaw for all photos and pitch/roll for the few photos without a visible horizon. But here I get stuck. It is pretty clear that I need to use Manual Optimize, since Auto-Optimize will replace the check marks at roll and pitch. But there is not much documentation on how to use Manual Optimize.

I have read this: http://www.tawbaware.com/pta_help/ptasm ... .htm#step4

... which says that I can find more about manual optimization in the Links and More Reading section. I assume that this means I should read John Houghton's tutorial here: http://homepage.ntlworld.com/j.houghton/optitute.htm

But this link is dead.

(And on the topic of dead links: Smartblend seems to have disappeared from the surface of Earth. The link in the above mentioned documentation points to an empty placeholder website, and some other links found via Google lead to a page which is experiencing technical problems. Is there an alternative download source. Or in case the license permits it: Could someone put it up for download somewhere?)

johnh
Posts: 2118
Joined: Sun Jul 20, 2003 2:43 pm
Location: UK
Contact:

Re: Forcing a horizon - and missing doc. for Manual Optimiza

Post by johnh » Tue Jul 29, 2014 12:54 pm

My web site was relocated nearly 7 years ago and the optimizer tutorial is now at http://www.johnhpanos.com/optitute.htm. You will find Smartblend at http://wiki.panotools.org/SmartBlend.

As to your problems with the horizon, I would use a row of line control points (type t3) sprinkled along the line of the horizon in the several images. (You will need to check that the optimizer you are using does support t3,t4,,,,tn points). Other than that, I would use a known good set of lens parameters and assign control points on features far away from the camera if possible. You must expect to see parallax problems near to the camera, but trying to get the optimizer to correct these is likely to lead to distortions elsewhere (e.g. in the line of the horizon).

John

Allan Olesen
Posts: 3
Joined: Tue Jul 29, 2014 4:13 am

Re: Forcing a horizon - and missing doc. for Manual Optimiza

Post by Allan Olesen » Tue Jul 29, 2014 1:45 pm

Heh, talk about a dead link...

Thanks for the links.

Your Smartblend link was the one I found on Google yesterday. It did not work then, but it works now.

Regarding the line control points: Do these get priority over other control points?

I am pretty sure that I have parallax problems in the foreground since I did it handheld and haven't really gotten used to dancing around the nodal point of the lens.

johnh
Posts: 2118
Joined: Sun Jul 20, 2003 2:43 pm
Location: UK
Contact:

Re: Forcing a horizon - and missing doc. for Manual Optimiza

Post by johnh » Tue Jul 29, 2014 3:53 pm

I don't think line control points are given any particular priority over normal points. Parallax issues are quite usual with handheld panoramas but Smartblend frequently helps a lot to hide these. For flat paved or tiled areas, you may find the camera position optimization feature helpful in getting good alignment there.

John

Allan Olesen
Posts: 3
Joined: Tue Jul 29, 2014 4:13 am

Re: Forcing a horizon - and missing doc. for Manual Optimiza

Post by Allan Olesen » Wed Jul 30, 2014 5:20 pm

Thank you for the help, John. I finally succeeded in creating a 360 degrees panorama from 19 24MP files in portrait orientation (resulting in a final 250 MP photo).

In case someone else can benefit from it, here is a summary of what I did:

1. Since I had no known lens correction parameters, I did lens correction in Lightroom before exporting the tiffs which I used in PTAssembler. This way I could just set the "b" distortion parameter to 0 in PTAssembler.

2. There are some manual settings in PTAssembler I haven't figured out yet, so I first hit the Auto-Create button and let it do its worst job. The result was pretty unusable, but now a lot of settings had been set for me, for example the automatic cropping of the final image and the soft blending of adjacent photos.

3. In Step 3 I deleted all control points which were not on the horizon line, and then I added some additional points so I had 3-6 t0 pairs on each neighbour pair of photos. After placing the points, I pressed "m" in each pair of photos to let the control point picker do automatic micropositioning of my points.

4. On 4 photos far apart in the sequence, I added two pairs of t2 points along the horizon to force the horizon to be level after optimization.

5. The automatic optimization ran very slowly (several hours). So I invented my own "algorithm" for manual optimization:
5.1 Set pitch and roll to zero for all photos. Set "b" to zero.
5.2 Uncheck all optimization options except yaw, FOV and "b". (FOV should only be checked for a 360 degrees panorama). Hit the Manual Optimize button.
5.3 Uncheck all optimization options except roll. Hit the Manual Optimize button.
5.4 Uncheck all optimization options except pitch. Hit the Manual Optimize button. Hit the Cancel Optimization button after some seconds.
5.5 Repeat 5.3 and 5.4 a few times. Then repeat 5.2. Then repeat 5.3 and 5.4 again a few times.
5.6. Check all optimization options: FOV, "b", yaw, pitch and roll. Hit the Manual Optimize button.
Using this method, the first 2-5 minutes brought me closer to the the final result than the first hour of automatic optimization did.

6. After generating the final output, I examined the horizon for defects and found only one. I went back to Step 3 and added a line of t3 points for the horizon line on this pair of photos. Then I did the optimization again and created a new output.

Some notes:
Obviously, only having control points on the horizon line resulted in a lot of parallax errors. But since the ground was covered with foilage, sand and pebbles, these errors are impossible to spot unless I compare to the original photos.

The t3 points acted somewhat strangely. When I added a line of t3 points along the horizon in the photos by dragging with the left mouse button, I could see that a few points would jump above the horizon. Looking at the x and y coordinates confirmed this: They did not form a straight line. And when I ran the optimizer (PTAStitcher), it seemed to sometimes report rather long optimized distances, measured along the line, and not perpendicular to the line. So I only used t3 where it was absolutely necessary. But I don't know if PTAStitcher even supports t3.

Smartblend is much faster than Enblend, but on one occasion Smartblend made some bad brightness differences between individual photos in the panorama. I haven't figured out when this happens.

I let the optimizer calculate the "b" lens parameter. It actually ended at 0 again after some variation. So apparently, Lightroom had done a good job of lens correction. At first I was worried that the optimizer had incomplete information for calculating this parameter, since all my control points were placed along one radial line from the lens centre. But according to this documentation: http://wiki.panotools.org/Lens_correction_model, the "b" parameter is actually used for correcting distances along a radial line. So the horizon control points should contain plenty of information for calculating the parameter.

I have struggled a lot with the Horizontal FOV of the panorama. Since all photos are tied together in a complete ring (Photo 1 and 19 were also joined with control point pairs), the panorama should by definition be 360 degrees. But the software insisted on creating a 347 degree panorama, even though I several times changed the setting to 360. Anyway, somehow the software surrendered, and I got my 360 degrees panorama.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest