Forum

Author Topic: Dense cloud generate step by step by a shape grid  (Read 4076 times)

tuffi

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Dense cloud generate step by step by a shape grid
« on: January 20, 2018, 04:08:07 PM »
Hi,

Someone tried to write a script to divide the total area of sparse cloud in a regular grid to generate the dense cloud. Expecially to avoid loss of data in case of some problem in very long processing.

In my mind the following process will be interesting but I need some advice to write script.

- Project with sparse cloud
- Create more new chunk based on a grid (shapefile or manual input of colums and row). So the same project duplicate for N chunks but with different bounding box, each one for one field of the grid.
- Then generate dense cloud for each chunk and saving project step by step
- Merge all the new chunk and delete the intermediate chunk
- Use this complete final chunk to DEM and orto generation.

So, please, someone can help me with this idea?

Emanuele

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14944
    • View Profile
Re: Dense cloud generate step by step by a shape grid
« Reply #1 on: January 20, 2018, 05:16:34 PM »
Hello Emanuele,

You can use the following sample script as a reference:
https://github.com/agisoft-llc/photoscan-scripts/blob/master/src/split_in_chunks_dialog.py
Best regards,
Alexey Pasumansky,
Agisoft LLC

tuffi

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Re: Dense cloud generate step by step by a shape grid
« Reply #2 on: January 23, 2018, 12:13:37 PM »
Thanks,


it seems exactly what I'm looking for. without many changes.

Emanuele

tuffi

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Re: Dense cloud generate step by step by a shape grid
« Reply #3 on: March 12, 2018, 03:47:53 PM »
hi Alexey, I try the script but PS results in "Can't run the script alert".
I tried woth different PC and also after upgrade of Phyton...

Some advice?



Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14944
    • View Profile
Re: Dense cloud generate step by step by a shape grid
« Reply #4 on: March 12, 2018, 04:11:50 PM »
Hello tuffi,

Can you please provide the output from the Console pane related to the script start?
Best regards,
Alexey Pasumansky,
Agisoft LLC

tuffi

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Re: Dense cloud generate step by step by a shape grid
« Reply #5 on: March 12, 2018, 05:12:48 PM »
2018-03-12 13:43:00   File "C:/PdhTufa/split_in_chunks_dialog.py", line 4, in <module>
2018-03-12 13:43:00     from PySide2 import QtGui, QtCore, QtWidgets
2018-03-12 13:43:00 ImportError: cannot import name QtGui

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14944
    • View Profile
Re: Dense cloud generate step by step by a shape grid
« Reply #6 on: March 12, 2018, 07:52:17 PM »
Hello tuffi,

Does the following line work (without error messages) when input to the Console pane directly?

Code: [Select]
from PySide2 import QtGui, QtCore, QtWidgets
Best regards,
Alexey Pasumansky,
Agisoft LLC

tuffi

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Re: Dense cloud generate step by step by a shape grid
« Reply #7 on: March 13, 2018, 07:00:11 PM »
No.

The same error

Code: [Select]
>>> from PySide2 import QtGui, QtCore, QtWidgets
2018-03-13 16:59:17 Traceback (most recent call last):
2018-03-13 16:59:17   File "<console>", line 1, in <module>
2018-03-13 16:59:17 ImportError: cannot import name QtGui

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14944
    • View Profile
Re: Dense cloud generate step by step by a shape grid
« Reply #8 on: March 13, 2018, 07:50:48 PM »
Hello tuffi,

That's quite strange. Which version of PhotoScan Pro you have installed and running the script from? And have you altered any contents of /python/Lib/site-packages/PySide2/ folder?
Best regards,
Alexey Pasumansky,
Agisoft LLC