Agisoft Metashape

Agisoft Metashape => Python Scripting => Topic started by: ben909 on April 13, 2018, 08:11:29 PM

Title: Split in chunks doesn't split
Post by: ben909 on April 13, 2018, 08:11:29 PM
I've tried running the split_in_chunks_dialog.py on 1.4.1 without any luck. It just duplicates the chunks without removing any cameras. Any suggestions?

Title: Re: Split in chunks doesn't split
Post by: Alexey Pasumansky on April 13, 2018, 08:59:59 PM
Hello ben909,

"Split in chunks" script copies the original alignment (without any modifications) and is only adjusting the bounding box in the chunk duplicates - the further reconstuction of dense cloud and mesh with the script will be performed in the smaller volume.
The duplicated cameras would be removed, if the "merge back" option is turned on in the script.
Title: Re: Split in chunks doesn't split
Post by: dcmartns on October 11, 2018, 04:49:17 PM
Hey, I have a similar problem.
Nothing happens but an error ocurred:


2018-10-11 15:40:59 Script started
2018-10-11 15:40:59 Duplicating chunk...
2018-10-11 15:41:11 Finished processing in 10.742 sec (exit code 1)
2018-10-11 15:41:11 Traceback (most recent call last):
2018-10-11 15:41:11   File "C:/Users/SFM/Downloads/split_in_chunks/split_in_chunks.py", line 80, in <lambda>
2018-10-11 15:41:11     proc_split = lambda : self.splitChunks()
2018-10-11 15:41:11   File "C:/Users/SFM/Downloads/split_in_chunks/split_in_chunks.py", line 159, in splitChunks
2018-10-11 15:41:11     doc.addChunk(new_chunk)
2018-10-11 15:41:11 TypeError: addChunk() takes no arguments (1 given)
Title: Re: Split in chunks doesn't split
Post by: Alexey Pasumansky on October 11, 2018, 05:40:38 PM
Hello dcmarts,

Are you using the latest version of the script?
https://github.com/agisoft-llc/photoscan-scripts/blob/master/src/split_in_chunks_dialog.py
Title: Re: Split in chunks doesn't split
Post by: dcmartns on October 12, 2018, 10:36:44 AM
Well.. I tried this version to load in...

Code: [Select]
2018-10-12 09:28:04 Traceback (most recent call last):
2018-10-12 09:28:04   File "C:/Users/SFM/Downloads/Archiv/split.py", line 4, in <module>
2018-10-12 09:28:04     from PySide2 import QtGui, QtCore, QtWidgets
2018-10-12 09:28:04 ImportError: No module named 'PySide2'
>>>

but:

Code: [Select]
C:\Python37\Scripts>pip install pyside2
Requirement already satisfied: pyside2 in c:\python37\lib\site-packages (5.11.2)


but I also have to say that I have no clue...
Title: Re: Split in chunks doesn't split
Post by: Alexey Pasumansky on October 12, 2018, 12:20:59 PM
Hello dcmartns,

Which version of PhotoScan you are using?

PySide2 is default module supplied with PhotoScan Pro 1.4 so oyu do not need to install it (moreover, PhotoScan is not using system Python, so installation of any modules to the system Python wouldn't have any effect on the Python integrated to PhotoScan).
Title: Re: Split in chunks doesn't split
Post by: dcmartns on October 18, 2018, 10:36:29 AM
I´m using 1.2 ?!
Title: Re: Split in chunks doesn't split
Post by: Ruben on November 23, 2018, 02:30:36 PM
I don't understand the script. I want to split chunks due to RAM shortage but it just duplicates all the cameras and tie points...
I don't want to duplicate...
Any help?

Cheers