Path: csiph.com!usenet.pasdenom.info!news.albasani.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'algorithm': 0.04; 'yet.': 0.04; 'insert': 0.05; 'subject:Python': 0.06; 'context': 0.07; 'remaining': 0.07; 'assuming': 0.09; 'converted': 0.09; 'image,': 0.09; 'lost.': 0.09; 'portions': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subset': 0.09; 'python': 0.11; 'subject:Registration': 0.12; 'wrote': 0.14; 'appreciated!': 0.16; 'crop': 0.16; 'irregular': 0.16; 'other,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'elements': 0.16; 'library': 0.18; 'trying': 0.19; 'cloud': 0.22; 'copied': 0.24; 'visible': 0.24; 'versions': 0.24; "i've": 0.25; 'header:X-Complaints-To:1': 0.27; 'function': 0.29; 'largest': 0.30; "i'm": 0.30; 'code': 0.31; 'another.': 0.31; 'extract': 0.31; 'probably': 0.32; 'thanks!': 0.32; 'raw': 0.33; "i'd": 0.34; 'problem': 0.35; 'advice': 0.35; 'common': 0.35; 'created': 0.35; 'tool': 0.35; 'but': 0.35; 'there': 0.35; 'done': 0.36; 'subject:?': 0.36; 'two': 0.37; 'auto': 0.38; 'feed': 0.38; 'filled': 0.38; 'form,': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'even': 0.60; 'analyze': 0.60; 'exposure': 0.60; 'color': 0.61; 'till': 0.61; 'full': 0.61; "you're": 0.61; 'email addr:gmail.com': 0.63; 'such': 0.63; 'different': 0.65; 'within': 0.65; 'quality': 0.72; 'converter,': 0.84; 'correction,': 0.84; 'differences,': 0.84; 'faxes': 0.84; 'manual,': 0.84; 'moisture': 0.84; 'subject::': 0.85; 'difficult,': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dave Angel Subject: Re:Python Image Registration and Cropping? Date: Sun, 4 May 2014 09:24:55 -0400 (EDT) Organization: news.gmane.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: dpc6744192248.direcpc.com X-Newsreader: PiaoHong.NewsGroup.Client.VIP:1.52 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 45 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1399209520 news.xs4all.nl 2871 [2001:888:2000:d::a6]:55414 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:70910 mikejohnryan08@gmail.com Wrote in message: > Hello, > > Is there a Python tool or function that can register two images together (line them up visually), and then crop them to the common overlap area? I'm assuming this can probably be done with Python Imaging Library but I'm not very familiar with it yet. > > Any help or advice is appreciated! > > Thanks! > Without some context I'd call the problem intractable. I've done such things using Photoshop to insert elements of one image into another. But even describing an algorithm is difficult, never mind trying to code it. If I had such a challenge, I'd probably use Pillow, but not till I knew what subset I was solving. 1) you had an image, saved in lossless tiff, and it was copied twice, each was edited and cropped, and the original lost. Analyze the two remaining tiff, and try to reconstruct the largest common subset. 2) You have two faxes from filled in versions of the same original form, and you're trying to extract just the handwriting portions of each. Very tricky, because not only exposure differences, but registration will vary over the surface, because of moisture and irregular feed from multiple rollers. 3) You have two jpegs, created from same master, but one has been scaled, rotated, cropped, and color corrected. Even without color correction, one was saved at a different quality setting, or prepared with a different raw converter. 4) You have two images taken with the same camera, on a tripod, within a minute of each other, with no visible difference of cloud cover, with camera set on full manual, without auto focus. The were converted with the same raw converter, ... etc. -- DaveA