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 - SFL_Beda

Pages: [1]
1
Feature Requests / Please add Stubs for the Python standalone module
« on: November 24, 2023, 04:52:03 PM »
Without stubs, there are is no autocomplete, type hinting etc. in Editors that can't scan the .so files themselves (like VSCode with pylance for example.)

I understand that it kind of works in PyCharm (also not very well to be honest) but not everybody is free to switch editor as they want to.

By adding stubs you could vastly improve the quality of life for developers using your python module.

2
Does somebody know the impact of the variables
workitem_size_cameras
workitem_size_pairs
max_workgroup_size

which are used in many functions of the python api?

Trough trial and error I have found out that workitem_size_cameras impacts how many images are processed in a package on the gpu. Afterwards it does initialize the gpu again "Found 1 GPUs in 0.000307 sec (CUDA: 0.000187 sec, OpenCL: 0.000107 sec)".

Now the interesting thing for me is that the defaults in the GUI don't seem to correspond to the defaults in the python module.
If I process a project in the gui, it extracts keypoints from all pictures in one go while in the python module it does it in sets of 20.

now my question is: How should these variables be used? does the GUI calculate ideal values based on the available hardware?

3
Agisoft Cloud / Selectively upload outputs into agisoft cloud
« on: September 20, 2023, 12:51:53 PM »
Hi I currently am working on this setup:


1. Metashape python script (standalone) processes a dataset and creates many different outputs (pointcloud, model, tiledmodel, orthomosaic etc.)
2. I want to upload a minimal amount of data into the agisoft cloud, probably orthomosaic and model/tiledmodel.
3. A user annotates that data
4. Based on the exported annotations and the results from 1. another python script does further processing (no metashape needed)

As far as I can see, uploadProject() just uploads the whole project into the cloud (does that even include the pictures?) which would make my workflow unnecessarily slow and waste a lot of space on the cloud.
What is the best way to only upload the data I need?


4
I recently changed from Pix4d to metashape and while I am very happy with the capabilities of the software there is one thing I am missing.

In Pix4d by default you see both the initial and the optimized position of the camera in 3d space.

This allows you to get a very intuitive "feeling" for the dataset as you can clearly see if some cameras are faulty as you can see in this image:


I have found the "camera locations" and "camera rotations" panels in the survey statistic but this representation of the data in 2d just does not work for me.

5
General / Confused about local to geographic conversion
« on: September 09, 2022, 01:41:29 PM »
I need to transform between WGS84 and the local chunk coordinate system (which i assume is the same coordinate system 3d Data is exported in).

I have found this thread which explains how to transform between those coordinate systems.

But when I transform the origin of the local coordinate system to WGS84
Code: [Select]
origin_local=Metashape.Vector((0,0,0))
origin_ecef=chunk.transform.matrix.mulp(origin_local)
origin_wgs84=chunk.crs.project(origin_ecef)

Add 1 meter in altitude and then transform back:
Code: [Select]
offset_wgs84=origin_wgs84+Metashape.Vector((0,0,1))
offset_ecef=chunk.crs.unproject(offset_wgs84)
offset_local=chunk.transform.matrix.inv().mulp(offset_ecef)

The output i get is
Code: [Select]
Vector([0.0005184573819860816, 0.020001072552986443, 0.1875601572683081])when I would expect it to be close to (0, 0, 1)

Furthermore
Code: [Select]
origin_local=Metashape.Vector((0,0,0))
offset_local=Metashape.Vector((0,0,1))

origin_ecef=chunk.transform.matrix.mulp(origin_local)
offset_ecef=chunk.transform.matrix.mulp(offset_local)
(origin_ecef-offset_ecef).norm()

gives me 5.3015440268911815 when i would expect 1 (given that both local and geocentric coordinate system are supposedly in meters).

as far as I can tell the coordinate systems are correct:
Code: [Select]
chunk.crs.proj4
'+proj=latlong +ellps=WGS84 +datum=WGS84'
chunk.crs.geoccs.proj4
'+proj=geocent +ellps=WGS84 +datum=WGS84 +units=m'

Where do I go wrong? Do I have a false understanding on how the transformations work?

Pages: [1]