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.


Messages - Hugh

Pages: [1] 2
1
Python and Java API / Re: Support for Python 3.9
« on: August 10, 2022, 02:49:36 PM »
Please ignore this - it appears that it works in 3.9 already (I assume you're using the Limited API)

2
Python and Java API / Support for Python 3.9
« on: August 10, 2022, 02:17:36 PM »
Hi,

Do you have a plan to support Python 3.9 for the Metashape module? Right now the module (from its name, anyway) supports 3.5 - 3.8

Thanks

3
General / Re: Numpad navigation removed from 1.8.2 why ?
« on: August 10, 2022, 11:22:40 AM »
I'm running 1.8.3 here and the numpad appears to work like you're describing. 5 to toggle ortho/perspective, and 1, 3, 7 for each of the axes. Is this not what you're expecting? It feels logical to have them this way for me.

Do you possibly have num lock off?

4
General / Lens Distortion - Profile curve
« on: August 05, 2022, 07:27:17 PM »
Hi,

I'm trying to understand how the distortion plot is calculated in the Camera Calibration window.

I've got, for example, the attached image.

In this, I'd expect to be able to pass in a pixel radius of 2000 and get a result of just under 12 pixels.

The details of this calibration are:

Code: [Select]
w : 3840
h : 2160
f : 7617.05664
k1 : 0.052014
k2 : 0.689641
k3 : -3.7671
k4 : 0
cx : 0
cy : 0
p1 : -0.00148237
p2 : -0.0018401
b1 : 0
b2 : 0

The corner of my image would be considered 0.5, 0.5, which is 1920, 1080 from the center. So the pixel distance to the corner is 2202.907. I'm going to use this point, and expect something around or just above 12.

r2 = r*r
r4 = r*r*r*r
etc...

I've used the formulae from Appendix C of the Metashape Pro documentation, on Frame cameras.

Code: [Select]
x_prime = (x * (1 + k1*r2 + k2*r4 + k3*r6)) + (p1 * (r2 + (2 * x2))) + (2 * p2 * x * y) = 0.36136245
y_prime = (y * (1 + k1*r2 + k2*r4 + k3*r6)) + (p2 * (r2 + (2 * y2))) + (2 * p1 * x * y) = 0.36118359

u = w * 0.5 + cx + x_prime * f + x_prime * b1 + x_prime * b2 = 4672.52
v = h * 0.5 + cy + y_prime * f = 3831.16

This position in u,v is much more than 12 pixels away from the corner, so I'm not sure where my maths is going wrong here.

I tried doing this with p1 and p2 set to 0, and I got a similar result:

Code: [Select]
x_prime = (x * (1 + k1*r2 + k2*r4 + k3*r6)) + (p1 * (r2 + (2 * x2))) + (2 * p2 * x * y) = 0.363764875
y_prime = (y * (1 + k1*r2 + k2*r4 + k3*r6)) + (p2 * (r2 + (2 * y2))) + (2 * p1 * x * y) = 0.363764875

u = w * 0.5 + cx + x_prime * f + x_prime * b1 + x_prime * b2 = 4690.82
v = h * 0.5 + cy + y_prime * f = 3850.82


Could someone help me as to where I'm going wrong here? I'd like to be able to calculate the same results as the graph is showing.

Thanks

5
Python and Java API / Marker pixel error in Python
« on: June 22, 2022, 11:57:19 AM »
Hi,

In the Metashape UI, when I create markers, one of the columns is "Error (pix)". I can see this value in the UI, but I can't figure out how to get it in Python.

For reference, I'm creating the markers using Python:

Code: [Select]
marker = chunk.addMarker()
for projection in projection_cameras:
    marker.projections[projection['camera']] = Metashape.Marker.Projection(Metashape.Marker(projection['position']))

Thanks

6
General / Single vs multiple textures on alembic
« on: April 23, 2022, 08:03:25 PM »
If I import an Alembic with multiple nodes in and texture it, when I export the texture I get multiple images, one for each node. If I import the same geometry as an obj I get the texture out in a single image.

Is there a way (through the API, mainly, but also through the UI, to get it to export the texture into a single image when working with al alembic with multiple nodes?

7
Feature Requests / Re: AprilTag
« on: April 23, 2022, 07:54:53 PM »
+1

8
Feature Requests / Weighted texturing
« on: April 14, 2022, 04:22:53 AM »
Hi,

It would be great to be able to set per-camera weighting for texturing. so we can control the priority that each camera is given.

Currently we can enable or disable cameras, but it would also be good to allow cameras to still be available, but with a lower weighting

9
If it's all pure Python code, you could use the multiprocessing module (https://docs.python.org/3/library/multiprocessing.html), which creates new python processes and passes data between the processes

10
Python and Java API / Re: STMap export through the Python API
« on: April 06, 2022, 04:08:45 PM »
Got it - thanks Alexey

11
Python and Java API / Re: STMap export through the Python API
« on: April 06, 2022, 11:52:06 AM »
Is there pre-release documentation available? I tried downloading the Python API docs for 1.8.3, but I got a "file not found" error. I was hoping to see the changelog of what else had changed.

Thanks

12
I'm relatively new to Metashape, so I'm not 100% on top of the terminology.

The coordinate space is local - there's no geographic coordinates.

There's a set of e57 LIDAR files that are imported first, and enabled as reference, and then the images are brought in to align to that

13
Python and Java API / Re: Gradual model selction - Python API
« on: April 04, 2022, 06:20:43 PM »
If you're looking to delete all components smaller than a certain size (which was why I was using this selection), then you can do model.removeComponents(size) where size is the minimum number of faces to keep in each component

14
Python and Java API / Re: STMap export through the Python API
« on: April 04, 2022, 06:17:39 PM »
Thanks Alexey, I appreciate the update on this.

15
Hi,

I'd like to adjust my chunk to ensure that there is not chunk transformation, but the cameras are still in the same place in world space. How could I best do this? Is there something that I can in the UI or with an existing function in the Python API, or is it something that I'd need to calculate the maths for myself?

Thanks

Pages: [1] 2