Agisoft Metashape

Agisoft Metashape => Python and Java API => Topic started by: frank.stremke on May 04, 2015, 09:56:07 AM

Title: split in chunks.py
Post by: frank.stremke on May 04, 2015, 09:56:07 AM
hello i was trying to get this script to run...
http://wiki.agisoft.com/wiki/Split_in_chunks.py
however if i start it nothing happens.
what  i did : copied the text from the website and pasted into a textfile then saved as chunks.py
in photoscan with my project open i use: tools> run scipt> select the file and since i dont have any idea about the augument tried that with different setings but no effect
there is no information of anything going on in the console just as if i had done nothing.
anyone could give a short overview on the operations of this script or alternatives to split my project in managable sized regular chucks
thanks
frank
Title: Re: split in chunks.py
Post by: Alexey Pasumansky on May 04, 2015, 10:52:13 AM
Hello Frank,

Running the script will add new menu item to the Custom Menu.
Title: Re: split in chunks.py
Post by: frank.stremke on May 04, 2015, 10:57:21 AM
thanky will try that now ...
frank
Title: Re: split in chunks.py
Post by: Paulo on August 21, 2015, 08:19:06 PM
Alexei,

i am trying to run Split_in_Chunks script on an aligned referenced chunk and get following error:

2015-08-21 12:15:24 Traceback (most recent call last):
2015-08-21 12:15:24   File "C:/Users/paul.pelletier/Documents/Photoscan/Split_in_chunks.py", line 80, in <lambda>
2015-08-21 12:15:24     proc_split = lambda : self.splitChunks()
2015-08-21 12:15:24   File "C:/Users/paul.pelletier/Documents/Photoscan/Split_in_chunks.py", line 159, in splitChunks
2015-08-21 12:15:24     doc.addChunk(new_chunk)
2015-08-21 12:15:24 TypeError: addChunk() takes no arguments (1 given)

Could you help, please,
Title: Re: split in chunks.py
Post by: Paulo on August 24, 2015, 08:08:02 PM
It seems this script worjs for version 1.1 of PS.

Would it be possible to get the script adapted to version 1.2?


Thanks in advance, :)
Title: Re: split in chunks.py
Post by: gatsri on August 25, 2015, 06:11:58 PM
I have the same Error in V 1.2.0
Can you please give us a tip how to fix it alexey??

Thanks in advance!
Title: Re: split in chunks.py
Post by: Alexey Pasumansky on August 25, 2015, 06:22:25 PM
Hello,

It looks like you can just remove "doc.addChunk(new_chunk)" line, since using new_chunk = chunk.copy() operation create a duplicate in the active document.
Title: Re: split in chunks.py
Post by: Paulo on August 25, 2015, 06:35:06 PM
Thanks again,

it now works in v. 1.2!
Title: Re: split in chunks.py
Post by: tommek01 on September 22, 2015, 10:08:51 AM
Hey Alexey,

is it possible to include a classification tool for dense clouds in tiled chunks within the split in chunks script?

beast regards


Tommek