Clip Raster Image Pair by Overlapping Area using Python

M

mikejohnryan08

Hello,

I have a set of aerial images which I am trying to clip by their overlapping areas, for use in a more involved program I am writing with PIL.

What would be the best method with Python to extract the overlapping area from a pair of images? I know there are libraries out there that could do this, but I couldn't find any so far.

I need to execute this through Python as it will be part of a batch processing script. Any ideas/advice would be great! Thanks so much in advance.
 
C

Chris Angelico

I have a set of aerial images which I am trying to clip by their overlapping areas, for use in a more involved program I am writing with PIL.

What would be the best method with Python to extract the overlapping area from a pair of images? I know there are libraries out there that could do this, but I couldn't find any so far.

The problem is that they won't absolutely perfectly match, so you need
some sort of similarity check. That's hard - very hard. I suggest you
find a stand-alone program that will do that part of the job; it'll be
easier than finding a Python library for it.

ChrisA
 
M

mikejohnryan08

The problem is that they won't absolutely perfectly match, so you need

some sort of similarity check. That's hard - very hard. I suggest you

find a stand-alone program that will do that part of the job; it'll be

easier than finding a Python library for it.



ChrisA


Chris,

Thanks for your response. For my purpose, the images won't have to be 'perfectly' matched, but hopefully as close as possible. Registration algorithms won't work for this reason--the images aren't identical to each other because of the different perspectives.
 
C

Chris Angelico

Thanks for your response. For my purpose, the images won't have to be 'perfectly' matched, but hopefully as close as possible. Registration algorithms won't work for this reason--the images aren't identical to each other because of the different perspectives.

Yeah, and that's what makes it hard. This is outside my area of
expertise, so all I can say is that these sorts of programs do exist,
but restricting yourself to Python libraries may make your life
unnecessarily hard.

On a separate topic, you're posting through Google Groups with its
abhorrent bugs. Can you please either edit your posts before sending
(removing the blank lines, wrapping to a sane width, and trimming the
quoted text), or switch to a better newsreader (or the mailing list)?
You'll find that a lot of people here either filter your message to
/dev/null automatically, or take one look and just move on to the next
post. Remember, never offend people with form when you can offend them
with substance :)

ChrisA
 
R

Rustom Mody

On a separate topic, you're posting through Google Groups with its
abhorrent bugs. Can you please either edit your posts before sending
(removing the blank lines, wrapping to a sane width, and trimming the
quoted text), or switch to a better newsreader (or the mailing list)?
You'll find that a lot of people here either filter your message to
/dev/null automatically, or take one look and just move on to the next
post. Remember, never offend people with form when you can offend them
with substance :)

This https://wiki.python.org/moin/GoogleGroupsPython
shows the problems and possible solutions
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,815
Latest member
treekmostly22

Latest Threads

Top