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:
Signature Verification (help with images)

Subject: Signature Verification (help with images)

From: Image Kamath

Date: 2 Aug, 2010 14:32:09

Message: 1 of 10

[URL=http://www.freeuploadimages.org/viewer.php?file=420r492jdiijjz2f2yqw.jpg][IMG]http://www.freeuploadimages.org/images/420r492jdiijjz2f2yqw_thumb.jpg[/IMG][/URL]
[URL=http://www.freeuploadimages.org/viewer.php?file=6cuyxlo72yl65tvkxt3.jpg][IMG]http://www.freeuploadimages.org/images/6cuyxlo72yl65tvkxt3_thumb.jpg[/IMG][/URL]
Above are two images of signatures. What I want to do is align them such that maximum corresponding pixels overlap with each other and then get a percentage of the number of pixels that overlap to the total number of pixels (both overlapping and not overlapping).
Please help me out with this.
Thank you.

Subject: Signature Verification (help with images)

From: Sean

Date: 2 Aug, 2010 14:42:24

Message: 2 of 10

"Image Kamath" <grkkrg@rediffmail.com> wrote in message <i36kt9$8og$1@fred.mathworks.com>...
> [URL=http://www.freeuploadimages.org/viewer.php?file=420r492jdiijjz2f2yqw.jpg][IMG]http://www.freeuploadimages.org/images/420r492jdiijjz2f2yqw_thumb.jpg[/IMG][/URL]
> [URL=http://www.freeuploadimages.org/viewer.php?file=6cuyxlo72yl65tvkxt3.jpg][IMG]http://www.freeuploadimages.org/images/6cuyxlo72yl65tvkxt3_thumb.jpg[/IMG][/URL]
> Above are two images of signatures. What I want to do is align them such that maximum corresponding pixels overlap with each other and then get a percentage of the number of pixels that overlap to the total number of pixels (both overlapping and not overlapping).
> Please help me out with this.
> Thank you.

Your links don't work. What do you mean by "maximum"? Do you mean the maximum intensity or the maximum height/[left-right align], as I suspect?

Subject: Signature Verification (help with images)

From: Image Fun

Date: 2 Aug, 2010 14:48:07

Message: 3 of 10

I think the above links are not working. Here are the new links.
http://www.freeimagehosting.net/uploads/3990feb85e.jpg
http://www.freeimagehosting.net/uploads/51a54b3dab.jpg

Subject: Signature Verification (help with images)

From: Image Fun

Date: 2 Aug, 2010 14:54:24

Message: 4 of 10

They are black and white images. So i want the exclusive nor of these two images to have as less white pixels as possible. So they should be aligned in such a way that maximum number of white pixels of one image overlap with pixels from the other image.

Subject: Signature Verification (help with images)

From: Sean

Date: 2 Aug, 2010 15:10:28

Message: 5 of 10

"Image Fun" <grkkrg@rediffmail.com> wrote in message <i36m70$3ut$1@fred.mathworks.com>...
> They are black and white images. So i want the exclusive nor of these two images to have as less white pixels as possible. So they should be aligned in such a way that maximum number of white pixels of one image overlap with pixels from the other image.

Well a simple brute force method would be:
1) Find the indices of the most left point and top most point of each.
2) Pad the lower sides of the first image so you have room to float the second image around.
3) Based on the indices you found earlier and a global transformation(pad amount); float the window around to minimize the error; which in this case would be the minimum absolute difference.

Subject: Signature Verification (help with images)

From: Image Fun

Date: 2 Aug, 2010 19:20:06

Message: 6 of 10


> Well a simple brute force method would be:
> 1) Find the indices of the most left point and top most point of each.
> 2) Pad the lower sides of the first image so you have room to float the second image around.
> 3) Based on the indices you found earlier and a global transformation(pad amount); float the window around to minimize the error; which in this case would be the minimum absolute difference.

But I want a code that does this automatically without any manual aid. And the time taken for execution should also be very less. Isn't there any function in MATLLAB that will make this task easier?

Subject: Signature Verification (help with images)

From: Sean

Date: 2 Aug, 2010 19:40:25

Message: 7 of 10

"Image Fun" <grkkrg@rediffmail.com> wrote in message <i375p6$pa4$1@fred.mathworks.com>...
>
> > Well a simple brute force method would be:
> > 1) Find the indices of the most left point and top most point of each.
> > 2) Pad the lower sides of the first image so you have room to float the second image around.
> > 3) Based on the indices you found earlier and a global transformation(pad amount); float the window around to minimize the error; which in this case would be the minimum absolute difference.
>
> But I want a code that does this automatically without any manual aid. And the time taken for execution should also be very less. Isn't there any function in MATLLAB that will make this task easier?

What about this isn't completely automatic. Finding the lowest coordinates - automatic, padding - automatic, floating window with error calculation saving the minimum error - automatic. I would imagine this would take, on an image your size, start to finish - about .08 seconds; or faster than you can click a mouse button.

Functions to help you:
max,size,for loop, (if Image Processing TBX) padarray, '-' -> that's a minus sign, <=, abs, sum, (:) ->colon operator to turn matrix into vector...

If you meant you want us to write the function for you that's probably not going to happen. If you want us to help you: show us what you've done and we can point out the bugs or give hints.

Subject: Signature Verification (help with images)

From: Image Analyst

Date: 2 Aug, 2010 20:48:04

Message: 8 of 10

If you're looking for automated image registration methods, look here:

http://iris.usc.edu/Vision-Notes/bibliography/contentsmatch-pl.html#Registration,%20Matching%20and%20Recognition%20Using%20Points,%20Lines,%20Regions,%20Areas,%20Surfaces

or here:

http://www.mathworks.com/matlabcentral/fileexchange/?term=registration

Subject: Signature Verification (help with images)

From: Image Fun

Date: 11 Aug, 2010 17:40:27

Message: 9 of 10

The solution you have given works if the two images are of nearly the same size. What if the they aren't? What if the second image has just a 'D'?
My final aim is to get a percentage match on the basis of differing pixels.

Subject: Signature Verification (help with images)

From: Sachini

Date: 6 Apr, 2013 13:02:10

Message: 10 of 10

"Image Kamath" <grkkrg@rediffmail.com> wrote in message <i36kt9$8og$1@fred.mathworks.com>...
> [URL=http://www.freeuploadimages.org/viewer.php?file=420r492jdiijjz2f2yqw.jpg][IMG]http://www.freeuploadimages.org/images/420r492jdiijjz2f2yqw_thumb.jpg[/IMG][/URL]
> [URL=http://www.freeuploadimages.org/viewer.php?file=6cuyxlo72yl65tvkxt3.jpg][IMG]http://www.freeuploadimages.org/images/6cuyxlo72yl65tvkxt3_thumb.jpg[/IMG][/URL]
> Above are two images of signatures. What I want to do is align them such that maximum corresponding pixels overlap with each other and then get a percentage of the number of pixels that overlap to the total number of pixels (both overlapping and not overlapping).
> Please help me out with this.
> Thank you.

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