1
$\begingroup$

Anybody have experience stitching panoramas with Hugin (or other software)?

My Situation

I have one "master" wide shot that shows everything (horiz. FOV ≈ 105°), and a bunch of tighter-zoom images that show detail (horiz. FOV ≈ 34°). All images are 4096 x 2176 pixels.

I want to stitch them all together into one super-resolution photo mosaic. The final image should show everything that's in the wide shot, but have all the detail from the tight shots.

This thumbnail grouping should give you a rough idea of things (wide shot on the left): Thumbnails of all my images

Basically I want one full-view image like the wide shot, but with the resolution of the tight shots.

Comparing resolution between wide and tight shots

What's Going Wrong

I've been trying to use Hugin. It wants to treat all images with equal importance, but the alignment between the tighter shots is just never perfect enough and always comes out with ugly seams.

example 1 example 2 example 3
Seam 1 Seam 2 Seam 3

I know the data is there. If I could treat the wide shot as the perfect standard, and align each tight shot against it while ignoring the others, then theoretically the alignment would be perfect at least to within the resolution of the wide shot. (I don't care whether the final image is re-projected or retains the wide shot's projection, as long as it looks natural and cohesive.)

Things I've Tried

Weird Hugin Setup

I tried removing all control points between pairs of tight shots, leaving only control points tying everything to the wide shot.

This may have mildly improved things, but no matter what I can't seem to convince Hugin to treat a single image (the wide shot) as "gospel truth" for alignment purposes.

I think maybe one of two things is wrong. Either:

  1. There's still too much cross-influence among the tight shots, or
  2. Maybe Hugin is unwilling to arbitrarily deform the tight shots to match their control points to the wide shot. Maybe it's just doing a re-projection calculation, feathering the seams, and calling it a day?

I'm currently thinking that I need to arbitrarily deform the tight shots for optimal adherence at all the control points, and just interpolate between them. But I don't know what software (if any) can do that.

I could spend a month and write my own, but ... I have a life. 😢

Gimp Cage Tool

I'm not afraid of pain or tedium, if the end result is good. I actually tried opening all the raw images in Gimp and using its Cage tool, but it was so hopelessly sloppy that I gave up after "aligning" just one image.

Note

As I'm sure you can tell, these are video game screenshots instead of real photos. There's a lot of repeating textures and areas of flat color that are messing things up a little.

However, there are advantages too:

  • Perfect rotation around parallax point / no camera translation.
  • No other movement or change in the scene.
  • Perfect mathematical lens (no defects or aberration, etc.)

I was really pushing my GPU getting these screenshots. I had to wait several minutes for all the scenery to load, and I was getting <1 fps (especially if I turned the camera too much).

All that to say, I'm not really sure if it's feasible to set my game window to 10,000 pixels and retake this as a single screenshot ... whereas I feel sure there's a way to stitch this as a mosaic.

Any thoughts or help would be very much appreciated!

$\endgroup$
1
  • $\begingroup$ There is a Google group, and a category on pixls.us. $\endgroup$
    – xenoid
    Feb 8 at 18:14

1 Answer 1

0
$\begingroup$

I posted on Pixls.us and got a little help there. But I also had to get a bit creative. For more details on my process, see my thread on Pixls.us. The gist is:

  1. I had to find more accurate FOV numbers for my images. This got me a little closer.
  2. I was only leveraging part of Hugin's auto-alignment algorithm. I enabled more alignment variables before pressing "optimize," and this got me 90% of the way.
  3. For a final improvement, I ran the stitch with "Keep intermediate images" enabled, imported those to Blender, and performed a manual fine-tune on them using Blender's U/V Mapping.

I spent about 30 minutes in Blender on the first tight shot, and here is a before/after comparison.

Each GIF switches between the wide shot and the tight shot. Bad alignment shows movement, good alignment shows no movement:

Hugin output Blender manual alignment
Hugin output Blender manual alignment

It’s possible that with a lot more tinkering I could’ve gotten results this good using only Hugin. But personally, I find Hugin to be something of a frustrating black box so my tinkering was usually blind. This process I found allows me to feel in control again.

Here's what my mesh looked like in Blender. All things considered, it's not that many vertices to worry about. And it gets me exactly the results I wanted. ☺️

Aligning with U/V Mapping

$\endgroup$

Your Answer

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