Forum

Author Topic: Duplicate photos after merge of chunks  (Read 9594 times)

tuffi

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Duplicate photos after merge of chunks
« on: January 24, 2018, 07:34:04 PM »
Hi,

after many processing is the time to perform orthomosaics.

I,ve merge 7 chunks but after that I've 7 duplicates for each Camera so I I've many problem to use the PC.
Actually I have about 60k cameras insteand of 8k.

Someone have an advice to delete 6 camera for each without do this manuals?

Thank you very much..

Emanuele

tuffi

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Re: Duplicate photos after merge of chunks
« Reply #1 on: January 24, 2018, 09:06:26 PM »
For example, is possible to use SQL query annidate in Phyton script?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15723
    • View Profile
Re: Duplicate photos after merge of chunks
« Reply #2 on: January 24, 2018, 09:22:44 PM »
Hello Emanuele,

I can suggest to move the cameras to the new camera group in every chunk prior to the merging operation, thus after merging you'll have 7 camera groups in the merged chunk and you can easily select any six of them and delete, leaving on the one group that corresponds to the initial alignment in the chunk.
Best regards,
Alexey Pasumansky,
Agisoft LLC

tuffi

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Re: Duplicate photos after merge of chunks
« Reply #3 on: January 24, 2018, 09:29:29 PM »
Thank you,
but I can do this for the next time.
Unfortunatly for space reasons I deleted the old project with the chunk, but only after that I noted the duplicate...

:(

tuffi

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Re: Duplicate photos after merge of chunks
« Reply #4 on: January 25, 2018, 12:45:33 PM »
Hello Emanuele,

I can suggest to move the cameras to the new camera group in every chunk prior to the merging operation, thus after merging you'll have 7 camera groups in the merged chunk and you can easily select any six of them and delete, leaving on the one group that corresponds to the initial alignment in the chunk.

It can works If I delete all camera with ID bigger than 9000 from XML file inside chunk.zip archive?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15723
    • View Profile
Re: Duplicate photos after merge of chunks
« Reply #5 on: January 25, 2018, 01:06:38 PM »
Hello tuffi,

Actually, I don't recommend to modify the project files.

You can try the following script that should remove the duplicates according to the path to the files from the active chunk:
Code: [Select]
import PhotoScan
chunk = PhotoScan.app.document.chunk
cameras = set()
remove = list()
for camera in chunk.cameras:
    if camera.photo.path in cameras:
        remove.append(camera)
    else:
        cameras.add(camera.photo.path)
chunk.remove(remove)
Best regards,
Alexey Pasumansky,
Agisoft LLC

tuffi

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Re: Duplicate photos after merge of chunks
« Reply #6 on: January 25, 2018, 06:38:16 PM »
thank you Alexey.

It works perfectly!!

Emanuele