Forum

Author Topic: New Split in Chunks script  (Read 7786 times)

PriNova

  • Newbie
  • *
  • Posts: 2
    • View Profile
New Split in Chunks script
« on: September 03, 2015, 11:21:40 PM »
Hello Community,

I modified the 'split in chunks.py' script and added two new features:

- now it is possible to split the region into X * Y * Z chunks instead of X * Y only.
- include a threshold (%) for overlaping the chunks regions

Background of modifying was that i use a low end 32bit PC with little RAM and wanted a high resolution model. Now i have an option to build X * Y * Z chunks and build a dense point cloud of about 2mio per chunk, generate mesh and put at maximum a 4096 pix texture on every part of the model per chunk.

This generates a very high resolution model with high resolution texture after merging the chunks into one model.

In the 'old' script merging results in a merged chunk without a model or cloud. I fixed it with aligning the chunks before. This aligning i added into script and after merging it works.

I put in the threshold option, because after merging the model, there were little gaps between the model parts.

Options:

The hardcoded options in the script are:

Aligning with camera matching

Quality = Medium & Filtering = Aggressive for dense point cloud generation

and

Surface = Arbitrary, Interpolation = Disabled & Face-Count = 0 for mesh building.

If you run the script from the custom menu there are two additional Spinboxes in the settings window.
The usual for X and Y splitting the third for Z splitting and the fourth for the threshold value in percentage.

I hope to help anyone with this modification.

Happy moddeling

PriNova

PriNova

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: New Split in Chunks script
« Reply #1 on: September 04, 2015, 11:24:03 AM »
Hi Community,

here is the modified script for the prerelease version 1.2.

There is a bug in the prerelease that after aligning und merging the chunks the 3d model did not show points/face count.
Also if you generate textures for every model in each chunk, after merging the button for displaying the textured model in the merged chunk is not available.

Cheers

PriNova

bigben

  • Sr. Member
  • ****
  • Posts: 406
    • View Profile
Re: New Split in Chunks script
« Reply #2 on: November 29, 2015, 02:47:25 AM »
Thanks PriNova

The threshold is a nice addition.  I'd started with the original script and it was the first thing I needed to avoid gaps in the dense cloud.

ferdywallinx

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: New Split in Chunks script
« Reply #3 on: December 23, 2015, 12:13:38 PM »
I have been trying this script but cannot get it to work: When I run the script on Linux only one extra chunk is created (regardless of the parameters) with all camera points, while on Windows the chunks get created but every chunk contains all cameras. The photos all have a georeference and i have tried the script before and after aligning photos. Any help anyone?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: New Split in Chunks script
« Reply #4 on: December 23, 2015, 12:59:51 PM »
Hello ferdywallinx,

Script  should be run after alignment is completed.

Also please specify if there are any error messages in the Console pane.
Best regards,
Alexey Pasumansky,
Agisoft LLC

taudronis

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: New Split in Chunks script
« Reply #5 on: December 24, 2017, 07:15:03 PM »
Quick (and probably stupid) question:

Once the script is running, how would we stop everything... even reboot the workstation maybe, and then continue where we left off?

Iga

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: New Split in Chunks script
« Reply #6 on: March 07, 2021, 06:50:15 PM »
Hello, can anyone adapt this script for version 1.7 ?
Or add Z division option in 1.7 script version ?

Thank you !
« Last Edit: March 07, 2021, 07:04:22 PM by Iga »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: New Split in Chunks script
« Reply #7 on: March 07, 2021, 07:50:58 PM »
Hello Iga,

Do you have any problems in 1.7 version with the latest script revision?
https://github.com/agisoft-llc/metashape-scripts/blob/master/src/split_in_chunks_dialog.py
Best regards,
Alexey Pasumansky,
Agisoft LLC

Iga

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: New Split in Chunks script
« Reply #8 on: March 07, 2021, 07:58:07 PM »
Hello, it works fine but it divides only in X and Y.
Z division option would be very usefull, especially for large projects.

Thank you.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: New Split in Chunks script
« Reply #9 on: March 07, 2021, 08:47:23 PM »
Hello Iga,

Which types of objects you are working with? Initially the script has been designed for the aerial survey projects, where Z-splitting is not required.

Maybe you should consider building mesh from the depth maps, which shouldn't require huge RAM amounts.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Iga

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: New Split in Chunks script
« Reply #10 on: March 07, 2021, 09:37:54 PM »
I am working on complex multi level buildings, both exterior and interior inthe same model.
I have noticed that when bounding boxes are smaller, there is less dense cloud noise, meaning less post processing/confidence cleaning etc.
Bigger bounding boxes create more residual noise in the dense cloud, so it is easier to divide the model in smaller parts, apart from the RAM / CPU / Autosave (power loss danger) / Issues.
I have also noticed tha depth maps are indeed faster but when there is need to combine LIDAR, dense cloud is necessary. I have also noticed that depths maps medium and dense cloud medium have different quality results. I think dense clouds have better edges.
For my workflow I also need the dense cloud for faster review.

Thank you again.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: New Split in Chunks script
« Reply #11 on: March 07, 2021, 09:46:08 PM »
Hello Iga,

If you are using terrestrial laser scanner that allows to export the structured scans, you can use the new approach, that allows to process the digital image and laser scanner data together on the depth data level (so point cloud import and generation is not required):
https://agisoft.freshdesk.com/support/solutions/articles/31000159101-terrestrial-laser-scanning-data-processing
Best regards,
Alexey Pasumansky,
Agisoft LLC

Iga

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: New Split in Chunks script
« Reply #12 on: March 07, 2021, 09:54:15 PM »
Thank you I have tried this, but I need a already registered LIDAR.

For all these reason I believe it would be useful to have the Z value if possible.
It think many people will be really happy with that !

Thank you again for your time!