From: "Sean " <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Signature Verification (help with images)
Date: Mon, 2 Aug 2010 15:10:28 +0000 (UTC)
Organization: University of Maine
Lines: 7
Message-ID: <i36n54$5mt$>
References: <i36kt9$8og$> <i36lr6$9n4$> <i36m70$3ut$>
Reply-To: "Sean " <>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1280761828 5853 (2 Aug 2010 15:10:28 GMT)
NNTP-Posting-Date: Mon, 2 Aug 2010 15:10:28 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2256903
Xref: comp.soft-sys.matlab:658311

"Image Fun" <> wrote in message <i36m70$3ut$>...
> 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.