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

Pages: [1]
Python and Java API / Re: Create chunk copy
« on: June 17, 2022, 07:17:57 PM »
Thanks. I forgot the () after .copy

Python and Java API / Create chunk copy
« on: June 16, 2022, 10:15:52 PM »
Hi. I'm having trouble making a copy of the chunk in my project. I'm using the following:
chunk2 = chunk.copy
But when I reopen the project in the GUI, chunk2 is not visible.
Can you help?

Python and Java API / GPS/INS offset parameters
« on: June 10, 2022, 11:12:04 PM »
Hi. Once again, I'm looking to code in Python the parameters of a GUI window, this time the GPS/INS offset parameters of the Camera Calibration window. Does anyone have python code for this? Thank you.

Python and Java API / Re: Reference Settings parameters
« on: June 10, 2022, 10:11:06 PM »
Oui, de Montréal. Toi aussi?

Python and Java API / Re: Reference Settings parameters
« on: June 10, 2022, 08:22:40 PM »
Great! Thanks Paul.

Python and Java API / Reference Settings parameters
« on: June 09, 2022, 10:55:55 PM »
Hi. I'm trying to implement in my Python script the various parameters found in the GUI Reference Settings window. Do you have a script example showing this process? Thank you.

Python and Java API / Re: Re-opening project with chunk
« on: June 06, 2022, 07:43:30 PM »
Thank you Alexey.

Python and Java API / Re: Re-opening project with chunk
« on: June 06, 2022, 06:03:52 PM »
And what about the chunk? How do I open the existing chunk in the project?

Python and Java API / Re-opening project with chunk
« on: June 03, 2022, 06:34:48 PM »
Hi. My workflow is the following:
- python script #1: create project, create chunk, add photos, photo matching and save
- open the project in the GUI and manually add GCP points and save
- python script #2: re-open the project and build the dense cloud
How do I re-open the project with the chunk already created?

Yes, the sensors seem to be assigned to the photos but the parameters are not changed, as you can see in this screen capture.
I added the height and width but it didn't appear to change anything.

Python and Java API / Assign pixel_size and focal_length to imported photos
« on: February 25, 2022, 05:44:15 PM »
Hi. I need to build a point cloud using 5 simultaneous sets of aerial photos (1 nadir view and 4 oblique views) with Python.
I'm stuck at the camera calibration step as I can't manage to assign the pixel_size and focal_length to the imported photos.
Below is the part of the script that should do it but when I run it and open the project in the GUI, the pixel_size and focal_length are blank. What is missing?

Code: [Select]
import Metashape
import os

data = "D:\Data"
project = Metashape.Document(), "project.psx"))
chunk = project.addChunk() = Metashape.CoordinateSystem("EPSG::32616")
views = ["nadir", "oblique1", "oblique2", "oblique3", "oblique4"]
sens = dict()
for view in views:
    sens[view] = chunk.addSensor()
    sens[view].label = view
    sens[view].pixel_size = Metashape.Vector([0.00520, 0.00520])
    if "oblique" in view:
        sens[view].focal_length = 123.0
        sens[view].focal_length = 82.0
photos = [os.path.join(data, f) for f in os.listdir(data) if f.endswith(".tif")]
for camera in chunk.cameras:
    for view in views:
        if view in camera.label:
            camera.sensor = sens[view]


Pages: [1]