Aligning two photos with few or partly identical content

327 views
Skip to first unread message

Wolfgang Kreische

unread,
Apr 12, 2022, 11:53:16 AM4/12/22
to PTGui Support

Hello,
I hope to find help here and thank you already. For a painting restoration I have to align two photographs of the painting. One is a high-resolution photo (already stitched together as a panorama from several photos), the other is an infrared photo (already stitched together as a panorama from several photos). The photos were taken with two different cameras (1x DSLR colour, 1x special infrared camera, 780 to 1800 nm, Blach&White). Many details match in both pictures. Some, however, do not. In the infrared photo, details can be seen that are not visible in the normal photo.
The aim is to obtain two largely congruent images (1x IRR, 1x photo). These are to be used for two purposes: 1. for infrared false colour analyses 2. for blending layers in Photoshop to mark the differences.
I loaded both photos into PTGui and manually marked over 60 identical points, mainly in the so-called Craquele (cracks in the image surface). I also marked the edges of the image with horizontal and vertical lines. I masked the disturbing elements in the picture, such as the easel, in PTGui.
Now I can't get any further. I have already tried various settings in the Optimizer. As soon as I call up the Optimizer, I get shifted pictures in the Panorama Editor. What else do I have to set in PTGui so that the two images are aligned (Optimizer) and how can I then export the two images with which settings so that I get two congruent images or a Photoshop file which contains both as congruent images?

Can anyone help me?
Best thanks Wolfgang

Translated with www.DeepL.com/Translator (free version)

In deutsch:

Hallo,
Ich hoffe hier Hilfe zu finden und Danke bereits. Ich soll für eine Gemälderestaurierung zwei Aufnahmen vom Gemälde deckungsgleich ausrichten. Eine aufnahme ist ein hochauflösendes Foto (aus mehrern Aufnahmen bereits als Panorama zusammengefügt), die andere ist ein Infrarotfoto (aus mehrern Aufnahmen bereits als Panorama zusammengefügt). Die Fotos ind mit zwei verschiedenn Kamerasaufgenommen worden (1x DSLR Farbe, 1x Spezial Infrarorkamera, 780 bis 1800 nm, Schwarzweiss). Viele Details stimmen in beiden Bildern überein. Einige aber nicht, im Infrarot Foto sind Details zu erkennen die so nicht im normalen Foto zu sehen sind.
Das Ziel ist zwei weitestgehend deckungsgleiche Aufnahmen (1x IRR, 1x Foto) zu erhalten. Diese sollen für zwei Zwecke verwendet werden: 1. für Infrarot-Falschfarben Analysen 2. für Überblendungen von Ebenen in Photoshop zum Markieren der Unterschiede.
Ich habe beide Fotos in PTGui geladen und manuel über 60 gleiche Punkte, vorwiegend im sogenannten Craquele (Riße in der Bildberfläche) markiert. Dazu die Bildränder mit horizontalen und vertikalen Linien markiert. Die auch im Bild vorhandenen störenden Elemente wie Staffelei habe ich in PTGui maskiert.
Jetzt komme ich nicht weiter. Ich habe bereit verschiedene Einstellungen i Optimizer probiert. Sobald ich den Optimizer aufrufe eralte ich im Panorama Editor verschobene Bilder. Was muß ich noch einstellen in PTGui damit de beiden Bilder ausgerichtet werden (Optimizer) und wie kann ich dann die beiden Bilder mit welchen Einstellungen exportieren so daß ich zwei deckungsgleiche Bilder oder eine Photoshop Daei erhalte welche beide als deckungsgleiche Bilder enthält?

Kann mir jemand helfen?
Viele, vielen Dank Wolfgang


PTGui Support

unread,
Apr 12, 2022, 5:13:01 PM4/12/22
to pt...@googlegroups.com
Hi Wolfgang,

You need to tell PTGui to use one of the two images (say the photo) as a
reference picture. The reference picture should not be optimized. Go to
the Optimizer tab, click Advanced there, and uncheck the yaw/pitch/roll
and everything else of the first image.

Also uncheck all checkboxes (fov, a, b, c etc) of the Global Lens
Profile in the optimizer tab. You don't want PTGui to change anything of
the reference image.

Then go to Lens Settings and under 'Use individual parameters for
images', check the boxes for Lens and Shift of the second image. The
second image will get its own set of lens parameters.

Return to the Optimizer tab, and enable all boxes for the second image.

If you've added control points, you can now run the Optimizer and you
should get a better alignment. You might try enabling viewpoint
correction for the second image if the alignment is not good enough.

When outputting the panorama, in the Create Panorama tab, uncheck the
Blended panorama box and enable the Individual Layers box. This will
give you two separate images (or a layered photoshop file).

Hope this helps!

Kind regards,

Joost Nieuwenhuijse
www.ptgui.com

On 12/04/2022 17:53, Wolfgang Kreische wrote:
>
> Hello,
> --
> You received this message because you are subscribed to the Google
> Groups "PTGui Support" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ptgui+un...@googlegroups.com
> <mailto:ptgui+un...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ptgui/ec56e998-a27b-4c3b-8ac6-ad2a4e9616ecn%40googlegroups.com
> <https://groups.google.com/d/msgid/ptgui/ec56e998-a27b-4c3b-8ac6-ad2a4e9616ecn%40googlegroups.com?utm_medium=email&utm_source=footer>.

Wolfgang K

unread,
Apr 15, 2022, 3:52:07 AM4/15/22
to PTGui Support
Thank you, that works very well. But I still have to set many points because the painting is very large. This has helped me a lot.

I still have a problem with the upper edge of the picture. It comes out a bit wavy at the end. But I have set horizontal control points (2 each) in both pictures. In a second step I can straighten it (load the final images into PTGui again). What else do I have to do so that the edges of the pictures (two straight wooden strips) are straightened in the first step?

Another idea, a theme:
In many art collections there are many infrared UV photos, colour photos taken in the past years. These could be aligned congruently with this technique in order to achieve the greatest possible equality of coverage. The craquele is like a fingerprint and can be seen in almost all photography techniques. Of course, setting the control points is time-consuming.
It would be very helpful if I could simply trace the craquele (cracks in the painting surface) in both pictures, as lines. And in the case of matching parts of the picture, the contours of definitely identical picture contents, again as drawn lines.
And a dream algorithm performs an alignment with these lines and thus aligns both pictures in the same way. Similar to the control points.

This would also be good to use for other creative montages.

Many thanks and a happy Easter wishes Wolfgang


Translated with www.DeepL.com/Translator (free version)

Danke, das funktioniert sehr gut. Ich muß aber noch viele Punkte setzen, weil das Gemälde sehr groß ist. Das hat mir dehr gut geholfen.

Ein Problem habe ich noch an der oberen Bildkante. Diese wird zum Schluß etwas wellig ausgegeben. Horizontale Kontrolpunkte (je 2) habe ich aber in beiden Bildern gesetzt. In einem zweiten Schritt kann ich das begradigen (Finale Bilder nochmal in PTGui laden). Was muß ich noch tun damit die Bildkanten (sind zwei gerade angesetze Holzleiste) gleich im ersten Schritt begradigt werden?

Noch eine Idee, ein Thema:
In vielen Kunstsammlungen liegen viele in den vergangenen Jahren gemachte Infrarot- UV-Aufnahmen, Farbfotos vor. Die könnten mit dieser Technik gut kongruent ausgerichtet werden um weitestgehende Deckunggleichheit zu erzielen. Das Craquele ist wie ein Fingerabdruck und fast in mit allen Aufnahmetechniken zu sehen. Die Kontrolpunkte zu setzen ist natürlich aufwändig.
Sehr hilfreich wäre, wenn ich einfach in beiden Bildern das Craquele (Riße in der Maloberfläche) nachzeichnen könnte, als Linien. Und bei übereinstimmenden Bildteilen die Konturen von defintiv gleichen Bildinhalten, wieder als gezeichnete Linien.
Und ein Traum-Algorithmus führt eine Abgleichung mit diesen Linien durch und richtet damit beide Bilder gleich aus. Ähnlich wie mit den Kontrolpunkten.

Dies wäre auch gut zu verwenden für andere kreative Montagen.

Vielen Dank und ein schönes Osterfest wünscht Wolfgang

John Houghton

unread,
Apr 15, 2022, 1:03:32 PM4/15/22
to PTGui Support
On Friday, April 15, 2022 at 8:52:07 AM UTC+1 gewue...@gmail.com wrote:
I still have a problem with the upper edge of the picture. It comes out a bit wavy at the end. But I have set horizontal control points (2 each) in both pictures. In a second step I can straighten it (load the final images into PTGui again). What else do I have to do so that the edges of the pictures (two straight wooden strips) are straightened in the first step?

Wofgang,  You can try assigning straight line control points along the picture edge.  You create several points of type "Line 1" along the edge rather than on identical features.. PTGui will try to get the points into a straight line, but you must select the option to include hor/vert points in the first pass of the optimizer on the Advanced page of the Optimizer tab.  If you want to straighten other edges, you create points of type "Line 2", "Line 3" etc. on those.

John

PTGui Support

unread,
Apr 15, 2022, 4:25:53 PM4/15/22
to pt...@googlegroups.com
Hi Wolfgang,

I think the wavy edge can only be prevented if you would use the
individual source images instead of an already stitched panorama. Using
the individual source images gives the optimizer more freedom; with an
already stitched panorama only a limited set of adjustments is possible
(yaw/pitch/roll and lens parameters).

The craquele would probably require a different kind of control point
generating algorithm, the current algorithm is designed for real world
photographs. It also has problems with line drawings. Improving this is
on the wish list.

Kind regards,

Joost Nieuwenhuijse
www.ptgui.com

> www.ptgui.com <http://www.ptgui.com>
> <http://www.DeepL.com/Translator> (free version)
> <https://groups.google.com/d/msgid/ptgui/ec56e998-a27b-4c3b-8ac6-ad2a4e9616ecn%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/ptgui/ec56e998-a27b-4c3b-8ac6-ad2a4e9616ecn%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "PTGui Support" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ptgui+un...@googlegroups.com
> <mailto:ptgui+un...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ptgui/d1e4bdb8-52e4-46cf-abd5-af618b701a6fn%40googlegroups.com
> <https://groups.google.com/d/msgid/ptgui/d1e4bdb8-52e4-46cf-abd5-af618b701a6fn%40googlegroups.com?utm_medium=email&utm_source=footer>.

Wolfgang K

unread,
May 11, 2022, 5:25:29 AM5/11/22
to PTGui Support
Works well.
But I still have problems.

How can I see if the two images are now matching. Only after the export and the opening in Photoshop I can control the result in the two layers. I see in Panorama Editor always only the anchor image (photo 1) Is there a way for a better preview. So that I can see in PTGui where reference points still have to be added. That would be great. The exported result always differs from the Panorama Editor windows.


"The craquele would probably require a different kind of control point
generating algorithm, the current algorithm is designed for real world
photographs. It also has problems with line drawings. Improving this is
on the wish list. "

I support that, that is great wish.


Translated with www.DeepL.com/Translator (free version)

PTGui Support

unread,
May 11, 2022, 5:40:23 AM5/11/22
to pt...@googlegroups.com
Hi Wolfgang,

You can switch the panorama editor to 'Edit Individual Images' mode.
Then you can switch between the two source images by clicking their
thumbnails (above the panorama).

Kind regards,

Joost Nieuwenhuijse
www.ptgui.com

> www.ptgui.com <http://www.ptgui.com>
> <http://www.DeepL.com/Translator> (free version)
> > www.ptgui.com <http://www.ptgui.com> <http://www.ptgui.com
> > <http://www.DeepL.com/Translator
> <https://groups.google.com/d/msgid/ptgui/d1e4bdb8-52e4-46cf-abd5-af618b701a6fn%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/ptgui/d1e4bdb8-52e4-46cf-abd5-af618b701a6fn%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "PTGui Support" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ptgui+un...@googlegroups.com
> <mailto:ptgui+un...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ptgui/07167ca0-9216-4d78-86e7-57d38f7342cen%40googlegroups.com
> <https://groups.google.com/d/msgid/ptgui/07167ca0-9216-4d78-86e7-57d38f7342cen%40googlegroups.com?utm_medium=email&utm_source=footer>.

Wolfgang K

unread,
May 11, 2022, 6:35:25 AM5/11/22
to pt...@googlegroups.com
Yes,this is the solution.
Another question.
It turns out that possibly the IRR image 2 is the better base. Right now, color photo 1 is the anchor image.
How can I swap this? If I just swap I can't set the settings in the Optimizer function to optimize now the color photo (now 2) (optimize per image).

Best regards and thanks Wolfgang

You received this message because you are subscribed to a topic in the Google Groups "PTGui Support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ptgui/K9nIBT_18U4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ptgui+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ptgui/35aab5bf-20b6-7379-c5b7-00e68f5ef39f%40ptgui.com.

Erik Krause

unread,
May 11, 2022, 7:01:26 AM5/11/22
to pt...@googlegroups.com
Am 11.05.22 um 12:35 schrieb Wolfgang K:
> It turns out that possibly the IRR image 2 is the better base. Right now,
> color photo 1 is the anchor image.
> How can I swap this? If I just swap I can't set the settings in the
> Optimizer function to optimize now the color photo (now 2) (optimize per
> image).

Go to Optimizer tab. In standard interface simply select the Anchor
image. In advanced interface check anything for image 2 that is
unchecked for image 1 and vice versa. If you have different lens
profiles, do the same for those. If you used viewpoint correction, set
the new anchor image to "Reset". Then go to Image Parameters tab and set
Yaw, Roll and Pitch and the Shift values for the new anchor image to 0.
Optimize.

--
Erik Krause

Wolfgang K

unread,
May 11, 2022, 11:23:10 AM5/11/22
to PTGui Support
Thanks Erik, this works now.
But I still had to make the changes in the lens settings tab.

Regards Wolfgang

Wolfgang K

unread,
May 11, 2022, 11:31:59 AM5/11/22
to PTGui Support
However, after swap and after Optimizer the result is not better, rather worse. I think most of the images are sufficiently suitable. Although the main content is correct, there are problems in the corners and the outer edges of the image. I'll have to do the rest in Photoshop with the transformation tools.
Wolfgang
Reply all
Reply to author
Forward
0 new messages