3

When I take a few rectilinear landscape images and stitch them using Hugin into a cylindrical projection, I get straight segments with sharp bends at the overlap:

http://phrogz.net/tmp/Jeep_Landscape%C3%975.jpg
Notice the top and bottom of the windshield, and the double-yellow line seen out the windshield.

In contrast, when I take many heavily-overlapping portrait shots, I get nice smooth results:
http://phrogz.net/tmp/Jeep_Portrait%C3%9710.jpg

Given the sparse landscape input, is there a way with Hugin—or any other stitching software—to get it to warp the original images consistently to get output like the latter?


Background motivation: I'm about to be producing video from within a vehicle similar to what you see above, and I'd like to use as few cameras as possible. The test shots above were done with an iPhone (rectilinear ~60° HFoV) while the real video will be shot with a GoPro (mild fisheye ~120° HFoV) so perhaps the result won't be as bad as I fear.

  • What happens if you take the lens correction parameters generated from that second batch, and apply them to the sparse images in the first one as a starting point for optimization? – junkyardsparkle Feb 14 '17 at 19:14
  • The biggest problem with using multiple cameras will be placing the optical center of the lenses of each camera at the same point in space. – Michael C Feb 16 '17 at 0:54
  • @MichaelClark I appreciate your concern. My optical centers will only deviate by 3" (or less, depending on the angle I choose). While this seems like a lot for normal still panoramas, it's better than even the tightly-packed 360 rigs like this one. – Phrogz Feb 16 '17 at 5:58
  • Would you mind editing your question to embed the images instead of linking them? That way, if you ever move the files or delete them, future readers of this question won't be left with dead links and no way to understand the context of the question or answers. Thanks! – scottbb Jun 3 '17 at 0:24
2

If memory serves me you can force Hugin to make certain points form a horizontal or vertical line in the final image. You might look into that. Note however that forcing one part of the image to adopt a particular geometry will typically result in other parts of the image being distorted.

Manually selecting matching point and lines can also help, but again may result in you forcing an image into an unrealistic mapping that will have other distortions.

However the way you get a good panorama is to use a large number of heavily overlapping shots. So you already know the correct solution to your problem.

Trying to wing it on a small number of images is exactly the problem. Hugin (and any other software) will have a very hard time without enough overlap to figure out a decent mapping without enough information. I'd normally aim for 50% overlap horizontally and 50% vertically if I'm doing a vertical pano as well.

  • If I had a single 170° rectilinear lens, took a picture of some horizontal lines, fed that to Hugin and told it to produce a cylindrical projection, I would assume that it would warp the lines above and below the horizon. Am I wrong? If I'm not wrong, then I wonder why Hugin is not warping the lines in each individual shot to match. – Phrogz Feb 14 '17 at 18:26
  • Such an extreme wide angle is not a natural thing for the human vision system. Any projection will produce an image that is, in some sense, warped. Hugin will try and match what it can, but you have to use control points to do that. It may, however, not be possible for the application to match your requirements to what it can do in smooth sectional maps. Also the effect of parallax may make smooth mapping impossible. – StephenG Feb 14 '17 at 19:24
  • I don't think you understand my question. Perhaps I just need to try it and see. Perhaps Hugin does not behave as I believe. – Phrogz Feb 15 '17 at 2:10
1

These "bends" might be from distortions from your camera's lens, which Hugin will have a hard time correcting for, if you supply only a limited number of pictures. Check the lens distortion parameters in Hugin for your panoramas (a,b,c - barrel, pincushion, wavy).

You can apply the lens distortion correction in Lightroom, UFRaw, similar tools or Hugin itself first, then use Hugin to stitch. In my experience, this gives better results with known lenses and only a few pictures in the panorama.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.