Moving an image around until it exactly matches another one underneath

R
Posted By
Ramon
Oct 12, 2007
Views
494
Replies
11
Status
Closed
Let’s say I have scanned 2 documents which are very similar and I need to quickly find out the parts (words) in which they differ. A very useful technique is to alternatively display both images and the eye will quickly spot the differences. The catch is that the similar parts of the images have to be aligned as precisely as possible. I could attempt to do this by trial an error, moving one of the images around, measuring pixels, etc., but I bet there is a better way.

Is there?

TIA,

-Ramon

How to Improve Photoshop Performance

Learn how to optimize Photoshop for maximum speed, troubleshoot common issues, and keep your projects organized so that you can work faster than ever before!

R
Rob
Oct 12, 2007
Ramon F Herrera wrote:
Let’s say I have scanned 2 documents which are very similar and I need to quickly find out the parts (words) in which they differ. A very useful technique is to alternatively display both images and the eye will quickly spot the differences. The catch is that the similar parts of the images have to be aligned as precisely as possible. I could attempt to do this by trial an error, moving one of the images around, measuring pixels, etc., but I bet there is a better way.
Is there?

TIA,

-Ramon

layers
J
john
Oct 12, 2007
On Thu, 11 Oct 2007 20:46:16 -0700, Ramon F Herrera
wrote:

Let’s say I have scanned 2 documents which are very similar and I need to quickly find out the parts (words) in which they differ. A very useful technique is to alternatively display both images and the eye will quickly spot the differences. The catch is that the similar parts of the images have to be aligned as precisely as possible. I could attempt to do this by trial an error, moving one of the images around, measuring pixels, etc., but I bet there is a better way.
Is there?

TIA,

-Ramon

Put the two images on separate layers. Reduce the transparency of the top layer so you can see partly through it. then just nudge the layers around to get the best match. Reset the transparency of the top layer to 100% and switch the top layer on and off

John
EH
Ed Hanni8gan
Oct 12, 2007
John wrote:
On Thu, 11 Oct 2007 20:46:16 -0700, Ramon F Herrera
wrote:

Let’s say I have scanned 2 documents which are very similar and I need to quickly find out the parts (words) in which they differ. A very useful technique is to alternatively display both images and the eye will quickly spot the differences. The catch is that the similar parts of the images have to be aligned as precisely as possible. I could attempt to do this by trial an error, moving one of the images around, measuring pixels, etc., but I bet there is a better way.
Is there?

TIA,

-Ramon

Put the two images on separate layers. Reduce the transparency of the top layer so you can see partly through it. then just nudge the layers around to get the best match. Reset the transparency of the top layer to 100% and switch the top layer on and off

John

Actually, if both scans are exactly the same size, you may not have to move the layers around at all.

If you set the top layer to Difference, the pixels that are identical will turn black. So, when the layers are perfectly aligned the whole image will be black except for any parts that are different, which makes the differences easy to pick out.
N
nomail
Oct 12, 2007
Ed Hannigan wrote:

Put the two images on separate layers. Reduce the transparency of the top layer so you can see partly through it. then just nudge the layers around to get the best match. Reset the transparency of the top layer to 100% and switch the top layer on and off

John

Actually, if both scans are exactly the same size, you may not have to move the layers around at all.

If you set the top layer to Difference, the pixels that are identical will turn black. So, when the layers are perfectly aligned the whole image will be black except for any parts that are different, which makes the differences easy to pick out.

It is unlikely that this will work with two different scans. Even if the images are the same size, there will be scanning differences which are irrelevant for what the OP is looking for, but will interfere in this process.


Johan W. Elzenga johan<<at>>johanfoto.nl Editor / Photographer http://www.johanfoto.com
J
Joel
Oct 12, 2007
(Johan W. Elzenga) wrote:

Ed Hannigan wrote:

Put the two images on separate layers. Reduce the transparency of the top layer so you can see partly through it. then just nudge the layers around to get the best match. Reset the transparency of the top layer to 100% and switch the top layer on and off

John

Actually, if both scans are exactly the same size, you may not have to move the layers around at all.

If you set the top layer to Difference, the pixels that are identical will turn black. So, when the layers are perfectly aligned the whole image will be black except for any parts that are different, which makes the differences easy to pick out.

It is unlikely that this will work with two different scans. Even if the images are the same size, there will be scanning differences which are irrelevant for what the OP is looking for, but will interfere in this process.

I don’t see why 2 scans can’t line up to each other, even with different DPI. Cuz the only different would be quality, size (you have option to fit the canvas) which wouldn’t cause much or any problem.

Cuz one of several tricks to remove the old film gain from old photo is scanning the photo (1) top-to-bottom (2) bottom-to-top to get different result from the light-movement of the scanner, then rotate 1 photo then blend 2 scans together etc..
S
samandjanet
Oct 12, 2007
Ramon F Herrera wrote:
Let’s say I have scanned 2 documents which are very similar and I need to quickly find out the parts (words) in which they differ. A very useful technique is to alternatively display both images and the eye will quickly spot the differences. The catch is that the similar parts of the images have to be aligned as precisely as possible. I could attempt to do this by trial an error, moving one of the images around, measuring pixels, etc., but I bet there is a better way.
Is there?

TIA,

-Ramon

Yes, there’s a very simple way to do this.

Instead of pasting to layers, rotating images by half a degree, resizing by a pixel or two and shunting left and right until everything lines up – a task which could take hours to do correctly, why not let your computer do all the hard work instead. It can do the exact same job for you in a matter of seconds.

Open both images, and then click on File>Automate>Photomerge When it asks you which files you want to use, select the option "Use Open" and tick the box labelled "Attempt to automatically align images". Now click okay to proceed.
Photoshop will now present you with a composite image with both the source images correctly aligned over each other.
On the right hand side of this window, place a tick in the box labelled "Keep as layers", and then click Okay.
You should now have a new image open in your workspace, with two separate layers. Each layer contains one of the original source images, and they should be perfectly aligned.

Now just toggle the top layer on and off to highlight any changes between the two.
N
nomail
Oct 12, 2007
Joel wrote:

Actually, if both scans are exactly the same size, you may not have to move the layers around at all.

If you set the top layer to Difference, the pixels that are identical will turn black. So, when the layers are perfectly aligned the whole image will be black except for any parts that are different, which makes the differences easy to pick out.

It is unlikely that this will work with two different scans. Even if the images are the same size, there will be scanning differences which are irrelevant for what the OP is looking for, but will interfere in this process.

I don’t see why 2 scans can’t line up to each other, even with different DPI. Cuz the only different would be quality, size (you have option to fit the canvas) which wouldn’t cause much or any problem.

Cuz one of several tricks to remove the old film gain from old photo is scanning the photo (1) top-to-bottom (2) bottom-to-top to get different result from the light-movement of the scanner, then rotate 1 photo then blend 2 scans together etc..

Cuz the originals are two different printed documents, and then scanned individually. It’s unlikely that these will give you pixel perfect copies of eachother, because both the printer and the scanner has certain tolerances. Most likely the scans will be ever so slightly different, making it impossible to align all the text pixel perfect. You can align some of the text, but then another part will be slightly misaligned. For an old photo that isn’t so important, because it will only slightly blur the blended result. But to see the difference between the scans by using the ‘Difference’ layer mode, you need pixel perfect alignment.


Johan W. Elzenga johan<<at>>johanfoto.nl Editor / Photographer http://www.johanfoto.com
N
nomail
Oct 12, 2007
Johan W. Elzenga wrote:

It is unlikely that this will work with two different scans. Even if the images are the same size, there will be scanning differences which are irrelevant for what the OP is looking for, but will interfere in this process.

I don’t see why 2 scans can’t line up to each other, even with different DPI. Cuz the only different would be quality, size (you have option to fit the canvas) which wouldn’t cause much or any problem.
Cuz one of several tricks to remove the old film gain from old photo is scanning the photo (1) top-to-bottom (2) bottom-to-top to get different result from the light-movement of the scanner, then rotate 1 photo then blend 2 scans together etc..

Cuz the originals are two different printed documents, and then scanned individually. It’s unlikely that these will give you pixel perfect copies of eachother, because both the printer and the scanner has certain tolerances. Most likely the scans will be ever so slightly different, making it impossible to align all the text pixel perfect. You can align some of the text, but then another part will be slightly misaligned. For an old photo that isn’t so important, because it will only slightly blur the blended result. But to see the difference between the scans by using the ‘Difference’ layer mode, you need pixel perfect alignment.

I just realised a far more important problem, making the ‘difference’ layer mode method clearly useless: Let’s say that there is only ONE different word, and this word is in the beginning of the text. If the new word is shorter or longer than the word it replaces, it will cause the entire text to reflow. In the rest of the text, each word will be in a different position, even though the word itself is still the same. The ‘difference’ layer mode will show that the entire text is different, only because the words are in a different place now.


Johan W. Elzenga johan<<at>>johanfoto.nl Editor / Photographer http://www.johanfoto.com
J
Joel
Oct 12, 2007
(Johan W. Elzenga) wrote:

Johan W. Elzenga wrote:

It is unlikely that this will work with two different scans. Even if the images are the same size, there will be scanning differences which are irrelevant for what the OP is looking for, but will interfere in this process.

I don’t see why 2 scans can’t line up to each other, even with different DPI. Cuz the only different would be quality, size (you have option to fit the canvas) which wouldn’t cause much or any problem.
Cuz one of several tricks to remove the old film gain from old photo is scanning the photo (1) top-to-bottom (2) bottom-to-top to get different result from the light-movement of the scanner, then rotate 1 photo then blend 2 scans together etc..

Cuz the originals are two different printed documents, and then scanned individually. It’s unlikely that these will give you pixel perfect copies of eachother, because both the printer and the scanner has certain tolerances. Most likely the scans will be ever so slightly different, making it impossible to align all the text pixel perfect. You can align some of the text, but then another part will be slightly misaligned. For an old photo that isn’t so important, because it will only slightly blur the blended result. But to see the difference between the scans by using the ‘Difference’ layer mode, you need pixel perfect alignment.

I just realised a far more important problem, making the ‘difference’ layer mode method clearly useless: Let’s say that there is only ONE different word, and this word is in the beginning of the text. If the new word is shorter or longer than the word it replaces, it will cause the entire text to reflow. In the rest of the text, each word will be in a different position, even though the word itself is still the same. The ‘difference’ layer mode will show that the entire text is different, only because the words are in a different place now.

Well, it seems like the OP just drop his last will here then hang hiself or whatever but we haven’t seen a sight of him and his thought yet <bg>. I don’t know what you see at your end but if the OP says they are similar, and hard to be able to spot the difference then it must be almost if identical.

And I hate the conversation over the death of the OP <bg>
A
Avery
Oct 13, 2007
On Fri, 12 Oct 2007 18:54:50 +0100, "\(not quite so\) Fat Sam" wrote:

Ramon F Herrera wrote:
Let’s say I have scanned 2 documents which are very similar and I need to quickly find out the parts (words) in which they differ. A very useful technique is to alternatively display both images and the eye will quickly spot the differences. The catch is that the similar parts of the images have to be aligned as precisely as possible. I could attempt to do this by trial an error, moving one of the images around, measuring pixels, etc., but I bet there is a better way.
Is there?

TIA,

-Ramon

Yes, there’s a very simple way to do this.

Instead of pasting to layers, rotating images by half a degree, resizing by a pixel or two and shunting left and right until everything lines up – a task which could take hours to do correctly, why not let your computer do all the hard work instead. It can do the exact same job for you in a matter of seconds.

Open both images, and then click on File>Automate>Photomerge When it asks you which files you want to use, select the option "Use Open" and tick the box labelled "Attempt to automatically align images". Now click okay to proceed.
Photoshop will now present you with a composite image with both the source images correctly aligned over each other.
On the right hand side of this window, place a tick in the box labelled "Keep as layers", and then click Okay.
You should now have a new image open in your workspace, with two separate layers. Each layer contains one of the original source images, and they should be perfectly aligned.

Now just toggle the top layer on and off to highlight any changes between the two.

Very good!
JM
James McNangle
Oct 13, 2007
(Johan W. Elzenga) wrote:

I just realised a far more important problem, making the ‘difference’ layer mode method clearly useless: Let’s say that there is only ONE different word, and this word is in the beginning of the text. If the new word is shorter or longer than the word it replaces, it will cause the entire text to reflow. In the rest of the text, each word will be in a different position, even though the word itself is still the same. The ‘difference’ layer mode will show that the entire text is different, only because the words are in a different place now.

IIRC the original writer wanted to compare two text documents to see if they were the same. I assume he was talking about paper documents, in which case it would be far better to OCR the two documents and then use a file compare utility to find the differences. I use the free Beyond Compare
(www.scootersoftware.com) as a plug-in with Dreamweaver, but I expect that it could also be used with a word processor. This will immediately show the slightest difference between two documents, even if it is only a missing comma in a 1000 line document.

James McNangle

Must-have mockup pack for every graphic designer 🔥🔥🔥

Easy-to-use drag-n-drop Photoshop scene creator with more than 2800 items.

Related Discussion Topics

Nice and short text about related topics in discussion sections