Python Image Registration and Cropping?

Dave Angel davea at davea.name
Sun May 4 09:24:55 EDT 2014


mikejohnryan08 at 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




More information about the Python-list mailing list