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:

(source: phrogz.net)

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:

(source: phrogz.net)

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.

  • \$\begingroup\$ 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? \$\endgroup\$ Commented Feb 14, 2017 at 19:14
  • \$\begingroup\$ 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. \$\endgroup\$
    – Michael C
    Commented Feb 16, 2017 at 0:54
  • \$\begingroup\$ @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. \$\endgroup\$
    – Phrogz
    Commented Feb 16, 2017 at 5:58
  • \$\begingroup\$ 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! \$\endgroup\$
    – scottbb
    Commented Jun 3, 2017 at 0:24

3 Answers 3


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.

  • \$\begingroup\$ 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. \$\endgroup\$
    – Phrogz
    Commented Feb 14, 2017 at 18:26
  • \$\begingroup\$ 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. \$\endgroup\$ Commented Feb 14, 2017 at 19:24
  • \$\begingroup\$ 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. \$\endgroup\$
    – Phrogz
    Commented Feb 15, 2017 at 2:10

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.


Don't know how this would apply to using multiple cameras for video, but these types of stitching errors tend to occur with parallax or camera movement in space between member shots. Parallax is more easily corrected in stitching with more overlap, but when you've got less, there's not much you can do. With stills, you need to determine the no-parallax point of your lens and be careful to rotate around that, which is why panoheads, like the Nodal Ninja, exist. Camera movement, you may need specialized stitching software (e.g., PTGui's viewpoint correction).

I would recommend that you consider remapping images from fisheye lenses (where you can often get 140-150º HFoV), or maybe consider a 360º camera, like a Ricoh Theta or GoPro MAX.

See also:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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