Forum

Author Topic: Photo duplicates after merging models  (Read 2559 times)

Vantage_DS

  • Newbie
  • *
  • Posts: 4
    • View Profile
Photo duplicates after merging models
« on: June 02, 2019, 08:44:35 PM »
Hi...

I've read that the best way to run a large project on a computer with low amounts of RAM is to split it up into chunks, process each mesh then merge them all together. The problem is now after doing that, my merged mesh/chunk has thousands of pictures associated with it and texturing it is taking too long.

What happened was -

Imported 967 photos.
Aligned them
Duplicated the chunk 24 times
Set a small region for each chunk, deleted everything out side that region.
Ran a batch to make a mesh for all the chunks one by one.
Merged the meshes from each chunk.

Now the merged chunk has tens of thousands of images associated with it and "Build Texture" is taking forever... it said 4 days at one point.

Have I done something wrong?

Any help or advice would be appreciated!

Thanks

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14840
    • View Profile
Re: Photo duplicates after merging models
« Reply #1 on: June 06, 2019, 03:09:22 PM »
Hello Vantage_DS,

Merge chunks operation is adding all the photos from the source chunks to the resulting merged chunk.

If you wish to remove the duplicates manually via GUI you can group the cameras from each chunk to the Camera Group in the Workspace pane and after merging remove all the groups leaving only one group of cameras in the merged chunk.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Vantage_DS

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Photo duplicates after merging models
« Reply #2 on: June 08, 2019, 05:13:00 PM »
Thanks for the advice.

So am i correct in thinking - I'd go through each chunk, select all photos, create a new camera group, repeat this for each chunk, then merge all those chunks and delete all but 1 camera group from the final merged chunk?

Thanks!

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14840
    • View Profile
Re: Photo duplicates after merging models
« Reply #3 on: June 08, 2019, 06:06:20 PM »
Hello Vantage_DS,

Yes, that is correct.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Vaidutis Zutautas

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Photo duplicates after merging models
« Reply #4 on: July 04, 2019, 10:49:56 AM »
@Vantage_DS

You can also run this script on an active merged chunk, which should simply solve your request:

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)