Forum

Author Topic: Duplicate Photos / Image overlap question  (Read 3164 times)

Cowboy_2

  • Newbie
  • *
  • Posts: 4
    • View Profile
Duplicate Photos / Image overlap question
« on: October 05, 2014, 09:18:16 PM »
Greetings All,

I have obtained a large photos set (~5000 images) of 1km section of river.  The images were acquired using a pole mounted camera about 7 m above the ground.  I have accidentally added duplicate images into the model and now would like to find a way to delete these duplicates.  Does anyone have any shortcuts (maybe python code?) to remove duplicates?  I may have a few hundred duplicates which were accidentally added, and I don't want to remove them individually. 

My second question is about image overlap.  There are several photos with a great deal of overlap (the image footprint was around 6x9m).  Would my model improve in quality if I the removed photos which had too much overlap?  Has anyone done this experiment?  If so how did you achieve this?  Anyone have any code to share?

Thanks much!

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14847
    • View Profile
Re: Duplicate Photos / Image overlap question
« Reply #1 on: October 16, 2014, 04:24:35 PM »
Hello Cowboy_2,

Yes, it is possible to remove the duplicates using Python code.. Something like the following:
Code: [Select]
import PhotoScan

doc = PhotoScan.app.document
chunk = doc.activeChunk

photos_list = set()
duplicates = 0

for photo in list(chunk.cameras):

if photo.path in photos_list:
chunk.cameras.remove(photo)
duplicates += 1
else:
photos_list.add(photo.path)

print("Script finished. Removed " + str(duplicates) + " duplicates.")
Best regards,
Alexey Pasumansky,
Agisoft LLC