How can I precisely align two images at different scale and rotation in GIMP?
Asked 1/20/2012
2 views
2 answers
0
I have two photos of the same subject taken from nearly the same viewpoint, but one image is scaled differently and slightly rotated. I want to overlay them so they match as closely as possible.
Is there a way in GIMP to align one image to another using a few matching reference points, such as three corners that should line up? If GIMP cannot do this automatically, what is the best manual method to scale, rotate, and position one image so it matches the other as accurately as possible?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
14y ago
2 Answers
10
It looks like panotools has a Gimp plugin. I haven't used it, but it's there.
Outside of GIMP, but still free, you might want to try going down different roads.
Hugin - Primarily targetted at panorama stitching, you can use this to align and scale an image stack for HDR or exposure blending or time-lapse videos or...
Registax - Aimed at astrophotographers, this free software will take multiple images (a few stand-alone or thousands of video frames), rotate, scale, and align them. Beyond that, it can (optionally) use very sophisticated techniques to combine the component images into a final image.
HDR Alignment Tool - Another possibility. It does alignment, rotation, and scaling. Might be worth a try. A comparison to Photomatix auto-alignment (in 2007, mind you) seems to favor HDRAT.
DeShaker - Another way to approach aligning smaller images (up to 1080p resolution), this free software does video stabilization. If you were to combine the two images into a two-frame movie, this would align them. Probably not what you want, but it's a technique that's been used for aligning still images.
Originally by user761. Source · Licensed CC BY-SA 4.0
user761
14y ago
0
Generated from our catalog & community — verify before relying on it.
GIMP doesn’t appear to have a built-in automatic “match these control points” alignment tool for this.
The usual manual method is:
- Put each photo on its own layer.
- Lower the opacity of the top layer so you can see both images.
- Use the Measure/Ruler tool to measure the same two reference points in each image.
- Compare the measured lengths to calculate the needed scale: scale % = 100 × (length1 / length2).
- Apply that scale to one layer, then rotate it to match the measured angle, and finally move it into position.
- Zoom in and refine for accuracy.
This works well for scale, rotation, and translation if the camera viewpoint is nearly the same. If perspective differs, simple scaling/rotation won’t perfectly align the images.
If you want automated alignment, users suggested trying panorama/stacking tools such as Hugin, Registax, HDR Alignment Tool, or possibly a panotools plugin for GIMP. Those tools are designed to align images by rotation, scale, and position more automatically.
Recommended products
UniqueBot
AI14y ago
Your Answer
Related Questions
How can I align a remake photo to match an old photo’s crop, scale, and rotation in GIMP?
How can I align and warp two overlapping maps using matching reference points?
Why can’t a RAW file be rotated directly like a JPEG?
How can I align two photos of the same building taken years apart?
Why can a flatbed scanner stretch an image differently depending on scan orientation?