Forum

Author Topic: Sloooow Decimating Mesh..  (Read 12360 times)

bmc130

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Sloooow Decimating Mesh..
« on: May 26, 2014, 03:55:17 PM »
What is causing Agisoft to be super slow when decimating some meshes? I have a project with different chunks. One chunk consist of 80 photos that I have generated a mesh from and one chunk with 94 photos. The first one took like 10 minutes to decimate the second one have been chewing for 1.5 hours now and still 6 hours to go.

The meshes are pretty much the same kind of object, sure the second one have more polygons but cant  understand why it will be such big difference in time..

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15650
    • View Profile
Re: Sloooow Decimating Mesh..
« Reply #1 on: May 26, 2014, 04:05:15 PM »
Hello bmc130,

Memory consumption for mesh decimation stage depend on the number of polygons in the source model. You can find approximate memory consumption peak for this operation on our Wiki pages:
http://www.agisoft.ru/wiki/PhotoScan/Tips_and_Tricks#Memory_Requirements

Have you checked if the memory limit is reached by PhotoScan during second chunk decimation.
Best regards,
Alexey Pasumansky,
Agisoft LLC

bmc130

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: Sloooow Decimating Mesh..
« Reply #2 on: May 26, 2014, 04:12:03 PM »
Didnt look at memory consumption on my first decimate, but second one is hitting the roof. On the other hand I think the first one would have aswell, arent that much of difference between them but maybe this one just hit the limit:)

I have a few more to decimate so I'll see if they are any different in memory and speed.

Thank you Alexey!

David Cockey

  • Full Member
  • ***
  • Posts: 211
    • View Profile
Re: Sloooow Decimating Mesh..
« Reply #3 on: May 26, 2014, 07:36:55 PM »
A work-around is to split the chunks with too many polygons into smaller chunks, and decimate the smaller chunks. The smaller chunks can then be merged after decimation.

bmc130

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: Sloooow Decimating Mesh..
« Reply #4 on: May 26, 2014, 07:46:11 PM »
Thanks David!
I had no idea you could split actual mesh into smaller chunks, or do you mean splitting the photos to smaller chunks and re process all steps again?

David Cockey

  • Full Member
  • ***
  • Posts: 211
    • View Profile
Re: Sloooow Decimating Mesh..
« Reply #5 on: May 26, 2014, 08:02:34 PM »
Thanks David!
I had no idea you could split actual mesh into smaller chunks, or do you mean splitting the photos to smaller chunks and re process all steps again?
There is not a simple command to "split" a chunk. Here is what you can do without recreating the chunks:
Make two copies of the chunk. Keep the original and don't modify it.
Delete part of one copy.
Delete most of the other part of the other copy. Leave a small amount of overlap in both copies. Decimate the two copies.
Merge the two decimated copies.
 

bmc130

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: Sloooow Decimating Mesh..
« Reply #6 on: May 26, 2014, 08:08:14 PM »
cool will try it! Thanks for the tip!

bmc130

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: Sloooow Decimating Mesh..
« Reply #7 on: May 26, 2014, 10:57:33 PM »
Tried your tip David on one of my easier scans. Had no idea about this and it seems to work pretty good!

Usually my scans are only one chunk so getting this to work I need to have at least two chunks to be able to get Agisoft to align chunks to begin with, next step would be to merge chunks, correct?

This is what I did, please let me know if there are easier way to do this David:)

Duplicate chunk so I got two chunks
Aling chunks, didnt bother much of the settings just keep them at low pointbased and 1000
Next delete one of the chunks
Do the selection and make sure it's selected when duplicating your chunk again.
Invert the selection on one of the chunks, now you have a exact split when removing respective part.
On one of the chunks I played with grow selection or shrink selection so I got some overlapping just incase when decimating.
Did my decimating and combine chunks with combine model checked.

I also tried and continue splitting and adding more chunks which also worked fine, so you can have different amount of decimation and detail where needed..

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15650
    • View Profile
Re: Sloooow Decimating Mesh..
« Reply #8 on: May 27, 2014, 10:44:14 AM »
Hello bmc130,

If you are using PhotoScan Professional, you can use Python scripting to duplicate original chunk several times and adjust bounding box in the chunks' copies so that they (bounding boxes) form a grid. In this case you'll be able to generate smaller meshes based on the same dense cloud and then merge them into single chunk model.
Best regards,
Alexey Pasumansky,
Agisoft LLC

bmc130

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: Sloooow Decimating Mesh..
« Reply #9 on: May 27, 2014, 11:00:04 AM »
Thank you Alexey, unfortunatly I have standard version..