Forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Silent_T

Pages: [1]
1
Python and Java API / split_in_chunks: Zero Resolution Error (v1.5)
« on: January 17, 2019, 08:54:17 PM »
Hello,
I have received a Zero Resolution error when running the Split In Chunks script to create a dense point cloud. I am using the latest script copied from https://github.com/agisoft-llc/metashape-scripts/blob/master/src/split_in_chunks_dialog.py

I am aware of what the Zero Resolution error means from other posts https://www.agisoft.com/forum/index.php?topic=5109.msg44587#msg44587, and I understand that there are no, or not enough points in the chunk I am processing to create the dense point cloud. See attached screenshot of the 4x4 split that I am processing, the bounding box shown (i.e. 1-4) is the one that stops processing.

However, in the past (before v1.5.0) I have run the script with no problems on chunks with few or no points available to create a dense cloud, similar to this current scenario. The script simply skipped over those chunks with not enough points and didn't create a dense cloud, but continued on processing the other chunks.

In Metashape v1.5 I am getting a Zero Resolution error when the script encounters a chunk with few or no points. Error follows (I have replaced the file location with <FileDir> for brevity):

Quote
File "<FileDir>, line 152, in <lambda>

proc_split = lambda: self.splitChunks()

File "<FileDir", line 286, in splitChunks

new_chunk.buildDenseCloud(max_neighbors=100)  # keep_depth=False

Exception: Zero resolution


I have tried to continue processing from this point using the additional code found in this thread (also pasted below), thinking I could skip it manually with this method: https://www.agisoft.com/forum/index.php?topic=10024.0
Code: [Select]
chunk_labels = [ichunk.label for ichunk in PhotoScan.app.document.chunks]
if  "Chunk " + str(i) + "_" + str(j) in chunk.labels:
    continue

Per the previous threads instructions, I added the above additional code on line 239 (i.e in between the following lines):
Code: [Select]
for i in range(1, partsX + 1):
                if not buildDense:
I Updated "PhotoScan" to "Metashape" and received the following error:
Quote
File "<FileDir>", line 152, in <lambda>

proc_split = lambda: self.splitChunks()

File "<FileDir>", line 240, in splitChunks

chunk_labels = [ichunk.label for ichunk in Metashape.app.document.chunks]

AttributeError: 'Metashape.Chunk' object has no attribute 'labels'

In this case, understand that 'labels' needs to be defined for 'Metashape.Chunk', but I have tried editing the script with my limited coding ability to no success. I can't seem to find a solution to move forward.

Any thoughts on how to get the script to skip chunks with few or no points? Or, as a workaround, how to get the additional script to allow continued processing from what has already been processed? Thanks in advance for any assistance provided.

Pages: [1]