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 - ro-teodoro

Pages: [1]
1

I am trying to follow this tutorial for detecting objects: https://agisoft.freshdesk.com/support/solutions/articles/31000162552-automatic-detection-of-objects-on-orthomosaic  , the training and detection are going very well but when I try to make a detection with the created model it gives me the following error in the console:

2023-02-13 09:17:09 Traceback (most recent call last):
2023-02-13 09:17:09   File "C:/Users/INFOGEOG02/Downloads/agi/metashape-scripts-master/src/detect_objects.py", line 1168, in <lambda>
2023-02-13 09:17:09     QtCore.QObject.connect(self.btnRun, QtCore.SIGNAL("clicked()"), lambda: self.process())
2023-02-13 09:17:09   File "C:/Users/INFOGEOG02/Downloads/agi/metashape-scripts-master/src/detect_objects.py", line 188, in process
2023-02-13 09:17:09     self.detect()
2023-02-13 09:17:09   File "C:/Users/INFOGEOG02/Downloads/agi/metashape-scripts-master/src/detect_objects.py", line 963, in detect
2023-02-13 09:17:09     self.add_trees(big_tile_to_world, big_tile_trees, detected_shapes_layer)
2023-02-13 09:17:09   File "C:/Users/INFOGEOG02/Downloads/agi/metashape-scripts-master/src/detect_objects.py", line 979, in add_trees
2023-02-13 09:17:09     p = Metashape.CoordinateSystem.transform(p, self.chunk.orthomosaic.crs, self.chunk.shapes.crs)
2023-02-13 09:17:09 TypeError: transform() argument 3 must be Metashape.CoordinateSystem, not None

Anyone know how to solve this error?

2
Python and Java API / problem with importPoints()
« on: November 24, 2022, 10:12:05 PM »
When using the importPoints method in a script to import multiple .LAZ files it imports the files one by one but always replacing the previous one leaving only the last one.

How can I avoid this and then combine all the files?
 this is my code...

Code: [Select]

import Metashape

from os import listdir
print('starting...')

path = 'the path'

files = listdir(path)

for i in files:
    print(i,end="\r")

    if i[-4:len(i)] == '.laz':

        print('importando... {}'.format(i), end="\r")
        path2 = path+'/'+i
        Metashape.app.document.chunk.importPoints(path2)


Pages: [1]