Forum

Recent Posts

Pages: 1 [2] 3 4 ... 10
11
Python and Java API / Unable to export plan_mission with CaptureTrack class
« Last post by Tom2L on May 24, 2022, 04:09:43 PM »
Hi all,
Once again, thanks for the amazing software and support that you all provide.
I'm actually trying to create the capture photos ... option of the plan mission in python using metashape API.
In order to do so, i'd like to export the camera track as a .path file, then use it the viewpoint and capture viewpoint class.

Unfortunately, i do not manage to export the camera track as a .path file.
I actually  have a metashape project with an animation generated thanks to the mission planning that i am trying to export using python
My code is :
Code: [Select]
doc = Metashape.Document()
doc.open(path=r"C:\Users\Thomas\Documents\projet_x2.psx")
chunk = doc.chunk
camtrack = Metashape.CameraTrack
camtrack.chunk = chunk
camtrack.save(r"C:\Users\Thomas\Documents\CameraTrack.path")
and i always get the error message
Code: [Select]
TypeError: descriptor 'save' for 'Metashape.Metashape.CameraTrack' objects doesn't apply to a 'str' object
that i can't solve.
In the api reference, the save option is really confusing and reclame a path as a string, that i can't solve :
Quote
save(path[, file_format, max_waypoints, projection])
Save camera track to file.
Parameters
• path (string) – Path to camera track file
• file_format (string) – File format. “deduce”: - Deduce from extension, “path”: Path,
“earth”: Google Earth KML, “pilot”: DJI Pilot KML, “trinity”: Asctec Trinity CSV, “au-
topilot”: Asctec Autopilot CSV, “litchi”: Litchi CSV
• max_waypoints (int) – Max waypoints per flight
• projection (CoordinateSystem) – Camera track coordinate system.

I also tried loading an existing .path file with :
Code: [Select]
camtrack.load(r"C:\Users\Thomas\Documents\CameraTrack_001.path")
but i get the same error.
Is anyone able to help me with this ?
12
General / DEM Model doesn't have coordinate data
« Last post by krogers42 on May 24, 2022, 03:15:40 PM »
Hello,

I am new to using Agisoft and I am using the program to complete my thesis. I've been experiencing a problem and don't know how to fix it. I've exported my DEM model and imported it into ArcGIS. Once I import it into ArcGIS I'm trying to convert it into a local scene to create a 3D model but when I do this it doesn't work because my model doesn't contain a X,Y, and Z values. Is there a way to export the model with these values or export the values separately?

Any suggestion helps
13
Hello eastonmbio,

In the end of the script when you are creating the network_tasks list, there's always the same chunk value used for all tasks.

So you may need to optimize you code and to iterate through chunks, inside each loop create the required tasks, which are the same for all chunks and also add relevant network_task list elements, in such manner network_tasks should be properly assigned to every chunk.
14
General / Rapid Orthomosaic
« Last post by MurrayW on May 24, 2022, 12:55:42 PM »
Hi everyone,

I am looking for a method to generate a quick orthomosaic, so color can be checked and adjusted prior to the final mosaic.

I have 5400 images from FujiFilm GS100 100 MegaPixels)

I have psx project with 1100 of the 5400 images. It is aligned, optimised, Dense Pt Cld, Mesh, all ready to go to mosaic - that takes 7 hours.
But the colors differences between images are large due different dates, sun-angle, atmospheric conditions, etc.

I made some low resolution images, and made a new psx with those.
I did the  usual process and could generate a low-res mosaic in 2 minutes

I would like to import the EO (XYX/OPK.csv) from the accurate high-resolution psx - in place of the whole allign/optimise etc process with the low-res images

I hope to import and accept the EO
Also import a mesh or DEM, create a camera calibration, then run mosaic

But not sure how to tell metashape to accept the imported EO.


MetaSHape 1.7.5 build 13229 (64 bit)

regards

Murray

15
General / Detect Markers
« Last post by hij on May 24, 2022, 09:13:12 AM »
I used Metashape network processing to auto-detect Non-coded targets (Detect Markers).
However, it was not possible to speed up the processing because the processing is executed by only one Processing node.

Is it possible to distribute "Detect Markers" to multiple processing nodes for processing?
16
Python and Java API / Network processed jobs not behaving as expected
« Last post by eastonmbio on May 24, 2022, 02:23:05 AM »
Hi,

I am trying to use network processing to repeat the same tasks over 4 different chunks all living in the same project. Clearly there is an error in how my code is structured and I'm looking to see where I have gone wrong. I am building meshes using depth maps as source data. All 8 of the tasks are sent off and processed but on reopening the project, only the depth maps and mesh from the final chunk is there.

Code: [Select]
import Metashape as ms

app = ms.app
docpath = ms.app.document.path
doc = ms.Document()
chunk = ms.app.document.chunk

doc.open(docpath, read_only = False, ignore_lock=True)


doc.save()

network_server = 'metashape-qmgr.myinstitution.gov.au'

ms.app.settings.network_path = 'Z:/'



client = ms.NetworkClient()

tasks = []  # create task list

chunk = doc.chunks[0]

task = ms.Tasks.BuildDepthMaps()
task.downscale = 4
task.filter_mode = ms.MildFiltering
task.reuse_depth = False
task.max_neighbors = 40
task.max_workgroup_size=100
tasks.append(task)

task = ms.Tasks.BuildModel()
task.source_data = ms.DepthMapsData
task.surface_type = ms.Arbitrary
task.interpolation = ms.EnabledInterpolation
task.face_count = ms.FaceCount.HighFaceCount
task.source_data = ms.DepthMapsData
task.vertex_colors = True
task.vertex_confidence = True
task.volumetric_masks = False
task.keep_depth = True
task.trimming_radius = 10
task.subdivide_task = True
task.workitem_size_cameras = 20
task.max_workgroup_size = 100
tasks.append(task)

chunk = doc.chunks[1]

task = ms.Tasks.BuildDepthMaps()
task.downscale = 4
task.filter_mode = ms.MildFiltering
task.reuse_depth = False
task.max_neighbors = 40
task.max_workgroup_size=100
tasks.append(task)

task = ms.Tasks.BuildModel()
task.source_data = ms.DepthMapsData
task.surface_type = ms.Arbitrary
task.interpolation = ms.EnabledInterpolation
task.face_count = ms.FaceCount.HighFaceCount
task.source_data = ms.DepthMapsData
task.vertex_colors = True
task.vertex_confidence = True
task.volumetric_masks = False
task.keep_depth = True
task.trimming_radius = 10
task.subdivide_task = True
task.workitem_size_cameras = 20
task.max_workgroup_size = 100
tasks.append(task)

chunk = doc.chunks[2]

task = ms.Tasks.BuildDepthMaps()
task.downscale = 4
task.filter_mode = ms.MildFiltering
task.reuse_depth = False
task.max_neighbors = 40
task.max_workgroup_size=100
tasks.append(task)

task = ms.Tasks.BuildModel()
task.source_data = ms.DepthMapsData
task.surface_type = ms.Arbitrary
task.interpolation = ms.EnabledInterpolation
task.face_count = ms.FaceCount.HighFaceCount
task.source_data = ms.DepthMapsData
task.vertex_colors = True
task.vertex_confidence = True
task.volumetric_masks = False
task.keep_depth = True
task.trimming_radius = 10
task.subdivide_task = True
task.workitem_size_cameras = 20
task.max_workgroup_size = 100
tasks.append(task)

chunk = doc.chunks[3]

task = ms.Tasks.BuildDepthMaps()
task.downscale = 4
task.filter_mode = ms.MildFiltering
task.reuse_depth = False
task.max_neighbors = 40
task.max_workgroup_size=100
tasks.append(task)

task = ms.Tasks.BuildModel()
task.source_data = ms.DepthMapsData
task.surface_type = ms.Arbitrary
task.interpolation = ms.EnabledInterpolation
task.face_count = ms.FaceCount.HighFaceCount
task.source_data = ms.DepthMapsData
task.vertex_colors = True
task.vertex_confidence = True
task.volumetric_masks = False
task.keep_depth = True
task.trimming_radius = 10
task.subdivide_task = True
task.workitem_size_cameras = 20
task.max_workgroup_size = 100
tasks.append(task)
# --------------------------
# --------------------------
# ------------------------------------------------------------------------------

# DONE

# convert task list to network tasks
network_tasks = []
for task in tasks:
    if task.target == ms.Tasks.DocumentTarget:
        network_tasks.append(task.toNetworkTask(doc))
    else:
        network_tasks.append(task.toNetworkTask(chunk))


client = ms.NetworkClient()
client.connect(app.settings.network_host)  # server ip
batch_id = client.createBatch(docpath, network_tasks)
client.resumeBatch(batch_id)

I am assuming there is an issue with how I am saving the document but not sure how to correct it.

Thanks
17
General / Re: Issues with Creating Markers/GCPs
« Last post by Paulo on May 24, 2022, 12:20:39 AM »
hello  Mey,

you should use Convert button from Reference pane to convert your aligned project from WGS84 to Nad83/state plane and then import your GCPs in state plane and it should work....
18
General / Issues with Creating Markers/GCPs
« Last post by MEY on May 23, 2022, 07:38:10 PM »
Hello all,

I have limited knowledge of Agisoft, so please bear with me.

I'm currently having issues with creating markers in my images. My current workflow is as such: Align photos, Build Mesh, uncheck photos in the Reference window (because the photos are in WSG84, but my GCPs are in NAD83/State Plane). Then I change the Settings in the Reference window to the necessary State coordinate system and import the GCPs. According to the forum and YouTube videos, I should be able to double click a photo to open it in a new tab and right click to Add Marker. However, this does not happen.

I'm currently using a free trial of Agisoft Metashape Professional 1.8.x.

Thank you for your time!
19
Python and Java API / Re: Replicate Update Transform using Python API
« Last post by sepehr500 on May 23, 2022, 07:14:37 PM »
What do you mean by checked?
20
General / Re: building pyramid for orthomosaics
« Last post by Alexey Pasumansky on May 23, 2022, 06:14:27 PM »
Hello a.gschwind,

If you are exporting orthomosaic to GeoTIFF file you can enable `Generate TIFF overviews' option to enable image pyramids to be saved to the exported file.

Tiled formats for orthomosaic export (such as MBTiles, TMS Tiles, Google Map Tiles, World Wind Tiles, KMZ would be automatically represented in hierarchical format.
Pages: 1 [2] 3 4 ... 10