Forum

Author Topic: Find How Individual Images Overlap with their Neighbours?  (Read 6334 times)

mindful_drone

  • Newbie
  • *
  • Posts: 5
    • View Profile
Find How Individual Images Overlap with their Neighbours?
« on: October 29, 2021, 03:15:24 PM »
Greetings all,

New Metashape user here.

I Want To:
  • Use a saved project file for an already stitched ortho to get transform information for individual images/cameras,
  • Project those images onto the plane of the earth,
  • Calculate exactly which portions of neighbouring images overlap with one another.
Is there a straightforward way to access or calculate this using the Python API?

If there's a simpler way to find/access these intersections, of course I'm all ears as well.

Extra Context:

We have a pipeline where we take RGB & MSP images flown over farm land, and then stitch those together using Metashape following the usual flow of:
  • Aligning the images,
  • Optimising camera alignment,
  • Building a dense cloud,
  • Creating a 3D model,
  • Building the ortho.

I want to use the project file from this process to either access or calculate exactly how each image overlaps with all the images that it intersects with.

Kind regards

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15688
    • View Profile
Re: Find How Individual Images Overlap with their Neighbours?
« Reply #1 on: October 29, 2021, 04:25:26 PM »
Hello mindful_drone,

As a possible solution you can extend the functionality of the following script in order to generate the footprint from bigger number of points (the script uses 4 points - corners of the source images) from the image border:
https://github.com/agisoft-llc/metashape-scripts/blob/master/src/footprints_to_shapes.py
Then calculate the area of intersection between each pair of overlapping shapes.

Another way that comes to my mind, is exporting orthorectified images (via Export Orthophotos command) and estimate the overlap between the pairs in the external application, ignoring no-data areas (covered with the transparency).
Best regards,
Alexey Pasumansky,
Agisoft LLC

mindful_drone

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Find How Individual Images Overlap with their Neighbours?
« Reply #2 on: November 02, 2021, 10:15:45 AM »
Hi Alexey,

Thanks very much for the quick response - much appreciated. Will look into this and post back when I've rounded things out.