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 -

Pages: [1]
I'm curious if there is a way to force the position of selected images that do not align? An example of this would be images over water in a large project.  In this particular use case, I have a camera system with very good positions but average orientation however, because its over water, I'm less concerned, I just want to create an ortho without a hole without having to go to photoshop.  In the past, for a precise full INS LiDAR/Camera system, I've used the attached script and it has worked well. Can it be modified to only iterate through selected images or images that are not currently aligned? I'm not sure what variables I can use to separate for the iteration.

Code: [Select]
import Metashape

chunk =
crs =
T = chunk.transform.matrix

origin = None
for camera in chunk.cameras:
if not camera.type == Metashape.Camera.Type.Regular:
if not camera.reference.location:
if not camera.reference.rotation:

pos = crs.unproject(camera.reference.location)
m = crs.localframe(pos)
rot = Metashape.utils.ypr2mat(camera.reference.rotation) * Metashape.Matrix().Diag([1, -1, -1])
R = Metashape.Matrix().Translation(pos) * Metashape.Matrix().Rotation(m.rotation().t() * rot)

if not origin:
origin = pos
chunk.transform.matrix = Metashape.Matrix().Translation(origin)
T = chunk.transform.matrix

camera.transform = T.inv() * R

Thank you in advance for your help.

Thank you Paul,

That is a very good point on the camera transformations vs. the block. In my workflow, all transformations have been completed prior to alignment. I didn't know Metashape allowed you to much your block post alignment allowing you to keep your tie points and dense point cloud. I'll try that.

Regarding the translation of the raster products, the workflow you described is similar to what I do already in Global Mapper. My thought was if I could do it in Metashape as well, I could create a script to just process and export products in Grid and Ground and not have to worry about any post processing.

Thank you for your help with this. you have been very helpfull!

Thank you Paul, If I'm looking at it correctly, I believe your process is similar. You are applying your correction to your chunk. I'm applying it to my cameras prior to my bundle adjustment. My hope is that there was a way to apply a transformation to the product so that you don't have to reprocess if you were creating outputs in both a grid and local coordinate system. Do you know if that is possible?

Hello, I made a set of tools that allows me to scale, translate, and rotate my camera positions for localized survey projects. I want to know if I can do the same to the finalized ortho, point cloud, and DEM? sometimes projects need deliverables in both grid and ground coordinates. If possible, I would prefer to process my projects in grid coordinates and then convert the products (point clouds, DEMs, and orthos) to ground coordinates. This way I can have two sets in both projections.  I looked through the API documentation but I was unable to clearly identify methods to do these types of transformations. If you could point me in the right direction to the methods in the API documentation for each deliverable or have some examples, that would be great.
Thank you


This worked perfectly. Thank you so much for your help!


We are facing a similar issue. I have a camera system that I has exterior orientation (XYZ, RPH), calibrated cameras in Agisoft format, and an existing DEM surface. I just want to hold the eo and rectify the images.  All options to proceed will not work without first doing the align photos step. I want to skip this step and just rectify the images but it will not let me. Please let me know how to skip the align photos step and just rectify the images to the current surface and the initial EO's from the inertial navigation system.


Feature Requests / Google Earth Flight path export
« on: January 11, 2019, 09:53:38 PM »
I'd like to request the ability to export a KML or KMZ that contains the image photo centers as a point feature with the image name as well as the projected footprints on the ground as a polygon also with the image name once you have finished processing a surface. This is very helpful for our business and is very common for our large format camera systems. additional bonus that would be great is further metadata for each image containing coordinates both projected and geographic and orientation information and EXIF information.

Thanks in advance.

Feature Requests / Modify EXIF data based on bundle adjustment results
« on: March 30, 2016, 10:51:20 PM »
I think it would be beneficial to modify the EXIF data of the input images once the bundle adjustment is complete. This would allow you to use the raw frames in different applications.

Pages: [1]