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

Pages: [1]
1
General / Re: Draw rectangle polygon
« on: June 28, 2019, 09:30:56 PM »
Perfect, thank you!

2
General / Re: Draw rectangle polygon
« on: June 27, 2019, 07:41:19 PM »
Thanks JMR, but I'm looking for a way to do this in PhotoScan. I don't want to add another program to my workflow.

Any other ideas?

3
Python and Java API / Remove Custom Menu Items
« on: June 26, 2019, 03:56:01 PM »
Is there a way to remove a custom menu item added from:

Code: [Select]
PhotoScan.app.addMenuItem("CustomMeno/Test", main)
Thanks!

4
General / Draw rectangle polygon
« on: June 26, 2019, 01:37:10 PM »
Hi, I am drawing a polygon on my DEM and I want it to be a perfect rectangle. But, my selections are imperfect and the edges are slanted.

Is there any way to force the shape to be a rectangle?

Thanks!

5
Python and Java API / Re: Camera Location and Centre Vector
« on: June 18, 2019, 06:04:55 PM »
Thanks Saduka!

That got me set in the right direction, but I found a more direct way to get the camera vector in my chunk coordinates. This is the code I'm using, if it's useful to anyone.

Code: [Select]
import PhotoScan #Photoscan 1.4.1

file1 = open(path, "wt")
chunk = PhotoScan.app.document.chunk #active chunk
cameras=chunk.cameras

for camera in cameras: # Loop through cameras
    if camera.enabled is True: # Only apply to enabled cameras
        estimated_coord = chunk.crs.project(chunk.transform.matrix.mulp(camera.center)) #estimated XYZ in coordinate system units
        cam_vec_int = camera.transform.mulv(PhotoScan.Vector([0,0,1]))
        cam_vec_ext = chunk.transform.matrix.mulv(cam_vec_int)
        cam_vec_ext.normalize()
        print(camera.label, estimated_coord, cam_vec_ext)
file1.write(camera.label + "," + "{:.8f}".format(estimated_coord) + "," + "{:.8f}".format(cam_vec_ext) + "\n")  #writing cameras
file1.write("#\n")
file1.close()

6
Python and Java API / Camera Location and Centre Vector
« on: June 05, 2019, 03:57:29 PM »
Hello,

I have a chunk in a local coordinate system with scale bars.
For all enabled cameras I want to extract their X,Y,Z coordinate in the local system and a vector that goes through the centre point of the image.

If it's also possible, I would also like to get the X,Y,Z coordinate of the intersection point of the vector with the mesh.

Is this possible through python scripting?

Thanks!

7
Python and Java API / Re: Multiple Single Orthophotos
« on: June 01, 2019, 09:21:39 PM »
Hello Alexey,

That is what I got from the GUI, I haven't tried it through python yet.

8
Python and Java API / Re: Multiple Single Orthophotos
« on: May 31, 2019, 01:53:26 PM »
Hi Alexy,

Thanks for the reply! I tried the export orthophotos command but it is not exporting any images. I built an orthophoto on my DEM with 2 photos as a simple test.

This is what the console said. Do you have an idea of what is happening?
Code: [Select]
2019-05-31 12:44:47 ExportOrthophotos: jpeg_quality = 99, path = D:/$$$$/{filename}.tif, resolution_x = 4.59399e-005, resolution_y = 4.59399e-005, tiff_compression = 1, write_alpha = off, write_world = on
2019-05-31 12:44:47 Exporting orthophotos...
2019-05-31 12:44:47 exporting 0 images
2019-05-31 12:44:47 Finished processing in 0.001 sec (exit code 1)

Thanks!

9
Python and Java API / Multiple Single Orthophotos
« on: May 31, 2019, 11:26:03 AM »
I want to export multiple single orthophotos based on the activated cameras in a chunk. I found this post here: https://www.agisoft.com/forum/index.php?topic=2595.0 but I am having a hard time updating it and getting it to work on 1.4 / Metashape.

Also, how do I set the projection plane to be based on manual markers that I have setup? I know how to do it in the GUI but am not sure how to achieve that through the API.

Thanks!

10
Python and Java API / Depth Maps Import
« on: September 24, 2018, 06:26:41 PM »
Is it possible to import depth maps created in an external software (per image) using the API? I want to see if I can get a cleaner point cloud and mesh using an external method to calculate the depth maps.

Thanks!

Pages: [1]