Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Aligning irregular pictures
#1
Hello,

maybe somebody can help me with this: I have non rectangular, polygonal pictures that I need to assemble - like a puzzle, each part roughly fits to the next one. Now what is the easiest way to align the parts for merging? Moving and rotating by hand is quite imprecise and takes a lot of time. Is there maybe a way to mark/use the corners that are supposed to align?

Thanks everybody.
Reply
#2
Maybe this can help you : https://www.gimp-forum.net/Thread-Stitch...ht=denzjos
Reply
#3
There are one or two layer aligners around. Ofnuts has a plugin ofn-layer-aligner.py from http://sourceforge.net/projects/gimp-too...s/scripts/  look for ofn-layer-aligner.zip dated 2016-07-12

Works like this (including a little mistake, make sure you are on the correct layer Smile )  

50 seconds demo https://imgur.com/qdqhAJB.mp4
Reply
#4
See my ofn-layer-aligner script(*). Basically you define a path with two pairs of points: the target points, and the moved points on the layer that should be adjusted, and the script rotates and scales the layer so that the second pair of points overlays the first.

(*) Installation instructions at the bottom of the linked page, and a short HTML write-up in the ZIP.
Reply
#5
Thank you guys very much! Thats indeed the kind of tool I was looking for.

The only thing is my files only fit roughly (digitalized old maps), so with only two points and scaling the result is sadly rather insufficient, especially after stitching a few dozen together. Is there maybe a similiar tool somewhere out there that can, lets say, align likte 20 or 30 pairs of points and doesn't scale but only moves and rotates? So that the points are only approximately aligned but the overall picture gets preserved?
Reply
#6
I have done this before, but not with Gimp. Hugin is the best tool for assembling a mosaic of map tiles.
Reply
#7
(10-13-2022, 10:42 AM)phipeco Wrote: Thank you guys very much! Thats indeed the kind of tool I was looking for.

The only thing is my files only fit roughly (digitalized old maps), so with only two points and scaling the result is sadly rather insufficient, especially after stitching a few dozen together. Is there maybe a similiar tool somewhere out there that can, lets say, align likte 20 or 30 pairs of points and doesn't scale but only moves and rotates? So that the points are only approximately aligned but the overall picture gets preserved?

You can use the Unified Transform tool:
  • It is often useful to set the top image to Difference mode, this makes the features stand out in the overlap area
  • Start the Unified transform, with:Show image > Composited preview set
  • Using the Move mode (click somewhere in the middle), align a point of the top layer over the same point in the lower layer
  • Drag the pivot of the transform (crosshair circle) to that point
  • Rotate the top layer around the pivot (drag outside the UT frame) until everything matches (which is when the overlappping part become as dark as possible)
  • Reset the top layer to Normal mode.
You can also do the same with the Move + Rotate tools (you can also move the Pivot in the Rotate tool)(*).

(*) In the general case, this method works with rotate and scale, that are best done in one operation (less blur). And the UT is mandatory in this case since you want the scaling to be done around the same pivot as the rotation, while the Scale tool doesn't let you change the scale origin (beyond corner/center.
Reply
#8
@Ofnuts
Thanks, that seems to be an alternate way! Only thing is when I'm entering the UT mode the difference mode gets disabled and I can't see anything - what am I doing wrong?

@rich2005

Thank you too, I downloaded Hugin and tried it for a few hours, sadly it seems to be quite complicated and there ain't many places to get help, or can you maybe recommend me some active forum?
(I tried to reproduce whats done in the official tutorial https://hugin.sourceforge.io/tutorials/scans/en.shtml (https://photo.stackexchange.com/question...er-fossoft) but I couldnt make it work)
Reply
#9
(10-13-2022, 03:38 PM)phipeco Wrote: @Ofnuts
Thanks, that seems to be an alternate way! Only thing is when I'm entering the UT mode the difference mode gets disabled and I can't see anything - what am I doing wrong?

Difference It must be set before you start the tool, and you need to set Show image > Composited preview in the options.
Reply
#10
Sorry, I'm kind of new to GIMP - where exactly can I find the option image > Composited preview?
Reply


Forum Jump: