Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Image Registration / Matching

Subject: Image Registration / Matching

From: Stephen

Date: 6 Jan, 2011 16:39:05

Message: 1 of 6

Hi,
I am a relative novice when it comes to MATLAB so I wonder if any of you guys can help me.

I am looking to write an algorithm that enables me to match images exactly.

Basically I have a folder full of photos (some many thousands) which all have particular file names e.g. "YorkshireDales_Gatepost_Autumn" (Set 1). I also have a folder which contains EXACTLY THE SAME images but has some additional meta data associated with them (i.e when they were taken , by whom etc) - which I'll call Set 2. Set 2 images have filenames such as 'DSC000024454'.

I would like to be able to add the image filenames from Set 1 into the meta data from Set 2.

The images themselves are all I have to match on - and as they are identical (ie. no rotations, changes in size or quality, or noise or anything) I was wondering if anyone knew of an easy way, or at least some pointers towards writing an algorithm that:

Takes an image from Set 1, compares it against all the images in Set 2 in turn until it finds an exact match then returns the corresponding filenames for the image in Sets 1 & 2? Ideally it would include some sort of loop to run through each of the images to find matches for each one.

As there is absolutely no difference between versions of images in Sets 1 and 2. As such I don't think I'd need to do anything too flash in terms of Image processing techniques? I might be wrong!

Any assistance, pointers or examples would be greatly appreciated!

Subject: Image Registration / Matching

From: Sean de

Date: 6 Jan, 2011 17:01:06

Message: 2 of 6

"Stephen" wrote in message <ig4r79$sjj$1@fred.mathworks.com>...
> Hi,
> I am a relative novice when it comes to MATLAB so I wonder if any of you guys can help me.
>
> I am looking to write an algorithm that enables me to match images exactly.
>
> Basically I have a folder full of photos (some many thousands) which all have particular file names e.g. "YorkshireDales_Gatepost_Autumn" (Set 1). I also have a folder which contains EXACTLY THE SAME images but has some additional meta data associated with them (i.e when they were taken , by whom etc) - which I'll call Set 2. Set 2 images have filenames such as 'DSC000024454'.
>
> I would like to be able to add the image filenames from Set 1 into the meta data from Set 2.
>
> The images themselves are all I have to match on - and as they are identical (ie. no rotations, changes in size or quality, or noise or anything) I was wondering if anyone knew of an easy way, or at least some pointers towards writing an algorithm that:
>
> Takes an image from Set 1, compares it against all the images in Set 2 in turn until it finds an exact match then returns the corresponding filenames for the image in Sets 1 & 2? Ideally it would include some sort of loop to run through each of the images to find matches for each one.
>
> As there is absolutely no difference between versions of images in Sets 1 and 2. As such I don't think I'd need to do anything too flash in terms of Image processing techniques? I might be wrong!
>
> Any assistance, pointers or examples would be greatly appreciated!


There is _exactly_ one copy of each image in each folder?
Pseudocode:
idx_folder2 = 1:nfiles_folder2;
FOR loop as an outer loop for ii = 1:nfiles in one folder
    I1 = load(iith) image folder 1
    jj = 0;
    for jj = idx_folder2(idx_folder2~=0) %Remaining images in folder 2
        I2 = load(jjth) image folder 2
        if isequal(I1,I2)
             match!
             Do whatever you want
             idx_folder2(jj) = 0;
             break; %break for loop, you've found your match
        end
     end
end

Good Luck!
-Sean

Subject: Image Registration / Matching

From: ImageAnalyst

Date: 6 Jan, 2011 17:17:25

Message: 3 of 6

I use BeyondCompare:
http://www.scootersoftware.com/
It lets you sync up different folders. If you have images where the
image is the same but the metadata is different, it will let you
compare the files by a variety of criteria, such as size, date, etc.
It will put the images side by side with the difference image in
between so you can try to locate any differences that may occur in the
pixels. Unfortunately the version I have does not let you compare
metadata, and that is what I need. For example, I have lots of
versions of family snapshots and I've been trying to add descriptions
(using ACDSee) and I'd like to see exactly what the difference is in
the metadata between one version and backups on various external hard
drives. All I can do is detect that the files are different due to
difference size and/or date but it doesn't tell me that the difference
is in certain metadata fields and not the image, or vice versa. So
it's not perfect but it works.

Subject: Image Registration / Matching

From: ImageAnalyst

Date: 6 Jan, 2011 17:21:03

Message: 4 of 6

To find duplicates of any files, even if they have different
filenames, you can use doublekiller:
http://download.cnet.com/DoubleKiller/3000-2248_4-10407004.html
It's free for Windows


DoubleKiller 1.6.2.82

    * Quick specs
    * Price: Free
    * Operating system: Windows 95/98/Me/2000/XP/Vista/NT
    * Date added: August 07, 2008
    * Total Downloads: 131,046
    * Downloads last week: 131

Download Now (391.33K)

Tested spyware free

    * Average user rating: 3.5 stars out of 71 votes
      See all user reviews

Publisher's description
From Big Bang enterprises:

DoubleKiller searches for duplicate files by comparing any combination
of name, size, modification date, and content. You can exclude files
or limit the scan to files matching masks like *.MP3, files in a
particular file size range or files with certain attributes, like
hidden or system files. When the scan is finished a list containing
all duplicates found is displayed and you can manually or
automatically select the files to be removed. The result list can be
sorted and exported to a textfile readable by both humans and
spreadsheet applications. DoubleKiller is a stand-alone executable
that does not need to be installed, just extracted and run, and does
not alter the system in any way without the user's prior permission.

Version 1.6.2 includes minor user interface improvements.

Subject: Image Registration / Matching

From: Stephen

Date: 6 Jan, 2011 17:43:04

Message: 5 of 6

Yes, there is exactly one copy of each image in both folders! (i.e the same distinct image resides in both folders).

Subject: Image Registration / Matching

From: Walter Roberson

Date: 6 Jan, 2011 19:22:14

Message: 6 of 6

On 11-01-06 11:21 AM, ImageAnalyst wrote:
> To find duplicates of any files, even if they have different
> filenames, you can use doublekiller:
> http://download.cnet.com/DoubleKiller/3000-2248_4-10407004.html
> It's free for Windows

I have used a similar Windows program named DuplicateFileFinder

The general algorithm is that or each image, as well as the obvious meta data
about file size and image shape, that an HD5 hash (or equivalent) is
generated. Such checksums have a very low probability of being duplicated for
the kinds of files you would be working with. You then sort by file size and
shape and then by hash within that. The files that match on all the criteria
are _probably_ duplicates, and any files that do not match on even one of the
criteria are definitely _not_ exact duplicates.

DuplicateFileFinder can go further than that and detect some kinds of common
image modification.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us