0

I am trying to stitch together screenshots of a map, so that I can get a higher resolution version of it to later vectorize and work with. The screenshots will have to be aligned in a grid of 3x3 or 4x4. They all have the same orientation and zoom level, and all overlap by a fair bit. However I am having trouble doing this job in Hugin.

I tried following the Hugin tutorial on Snitching flat scanned images, but I wasn't able to get the pictures to align correctly. So, how do I do this? Thank you.

  • 1. Screenshots of a map is not photography. 2. A full tutorial on how to use Hugin is too broad. 3. Hugin is not the right tool because there is no need to remap the projection in screenshots of a flat larger image. Just put the images in separate layers of a larger canvas and move them around until they're lined up. – xiota Nov 2 at 5:51
  • Thank you for taking the time to point out what's wrong with my question. I asked my question here because here is where I saw most discussions about the Hugin software. I never asked for a full tutorial, just what settings to pay attention to in order to get the desired result. I imagined that there would have been better alternatives than Hugin, and that's why I asked for other FOSS as well. I was looking for an automated tool because I want to make several of these images. Where do you think is appropriate to ask my question? Thank you again. – itsmeciao Nov 2 at 13:12
  • Hugin is probably the "only game in town" for automated FOSS stitching. There are many possibilities for why a set of images might not align properly. It could be the input images, control points, or other settings. More information is needed to figure out the cause in your case. – xiota Nov 2 at 18:38
  • 1
    I was editing my question with steps to reproduce, but then found what was wrong and so I went ahead and wrote an answer. Thank you again for wanting to help. – itsmeciao Nov 3 at 3:04
3

After some more studying the program and testing around I finally got it to work! Here is every step I took:

  • Launch Hugin (version 2019.0.0.a369cbe55179, on Manjaro Linux);
  • Interface menu > Expert;
  • In the Photos tab, add images (In my case they are a 3x4 grid, all are 1920x1080, but I have also tried a set of images that don't have a clear shape after stitching). When asked, I set 1 as HFOV and leave Normal (rectilinear) as lens type;
  • I set one of the central images as anchor by right clicking in the image and choosing Anchor this image for position/exposure, then proceed to right click on every image except the first one and choose Lens > New lens. I also go in Optimise > Geometric and choose Custom parameters;
  • Switch to the Control points tab and let Hugin's engine (default Hugin's CPFind) detect control points between pairs of images. I also make sure that every image has CPs with images overlapping from top/bottom, left/right and angles (is this necessary or overkill?). After every run of CPFind, I check for false positives, a quick way is to compare the distances of every cp, in my case they all match except the false positives;
  • In the Optimiser tab, I unselect all Yaw, Pitch and Roll, and select all X and Y (the anchor has nothing active). Under Lens Parameters I select all Hvof (v). Then click on Optimise now! and apply the changes;
  • Open the Preview panorama window and choose Straighten, you should be able to see the stitched image at this point;
  • Open the Stitcher tab, click on Calculate Optimal Size and Fit Crop to Images, eventually choose your format and other settings, and Stitch!

I couldn't get it to work before because the tutorial that I was following, Stitching flat scanned images, suggested to also activate all Z in the Optimiser tab, or alternatively all Roll and under Lens Parameters all Hfov, d, e.

I hope that this will be useful to someone in the future.

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.