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 / Build dense cloud for sub-region
« on: September 19, 2023, 01:15:40 AM »
Hi. I'm working with a pair of satellite stereo images which are quite large and I would like to limit the processing (mainly dense cloud building) to a sub-region. Is there a way to do this in Metashape?

General / Re: Coordinate System greyed out in Export Points
« on: August 01, 2023, 08:42:36 PM »
Hi Alexey. I tried without clipping and it works well but the projection isn't defined.
When I check the Reference window, it shows the correct projection system but I can't modify the system in the Export window.
Is there another place I need to define the projection for the model?

General / Coordinate System greyed out in Export Points
« on: August 01, 2023, 06:19:26 PM »
Hi. I've built a dense cloud which I now would like to export but the Coordinate System drop down menu is greyed out and I can't choose the right system. If I leave it as is, it will export an empty las file. Can you help? Thanks

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]