Copy link to clipboard
Copied
Hello, I try to align/superimpose two very different images along a common structure (see attachments) without doing the obvious manual Transform operations.
How can I superimpose Image 2 (in Layer 2) onto Image 1 (in Layer 1) so that I get “automatically” Image 3?
Somehow some kind of “pattern recognition” may need to happen and then some kind of AutoAlign. The regular AutoAlign feature does not seem to work here. Thank You.
Copy link to clipboard
Copied
Do you have multiple images? If yes then the next question is whether they share dimensions and exactly same pattern that should be rotated/aligned? If yes then please provide us with more samples. If not then task is very difficult, at least using Photoshop actions alone.
Copy link to clipboard
Copied
Hello:
Sorry for my late reply and thank you for your comments. I have only these two images right now, but could possibly generate more. Let me look into this.
Many Thanks Again
Copy link to clipboard
Copied
This can be done using a script.
In both images, you can highlight the central subject using select subject, tnen convert selection to path. Find the extreme points in the corners of the left, top, right, bottom, take them as outside boundaries of the object. Based on the deviation of the lines between the specified points from the horizontal / vertical, roughly calculate the angle of inclination of the entire object. Then you can move the layer and compensate rotation.
However, the result of the work will depend on what the select subject decides to select and on the form of the object, that is, it will often be unpredictable. I don’t think it is worth solving the issue in this direction.
Copy link to clipboard
Copied
Hello:
Sorry for my late reply and many thanks for your suggestion. The select subject command only worked for one image and I think it is worth solving the issue in this direction, as you also indicated.
Many Thanks Again
Copy link to clipboard
Copied
In order to achieve this, it seems that operations such as OpenCV using Python will be required.
Copy link to clipboard
Copied
Hello:
Sorry for my late reply and thank you for your suggestion. This looks interesting and I'll have friends looking into this.
Many Thanks Again