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

Pages: 1 [2]
16
Python and Java API / check if model has UVs
« on: February 06, 2024, 10:36:18 PM »
Kia ora,

I've had a read through the reference and read through this forum, but for the life of me I can't find how to check if a model already has UVs built. if anyone can providem e with the command, I'd appreciate it! e.g an equivalent check for if a model exists:
Code: [Select]
if not chunk.model:

17
Ok I got it working with the code below. Now to figure out how to import fiducial markers

Code: [Select]
import Metashape

def find_marker(label, chunk):
for marker in chunk.markers:
if label == marker.label:
return marker
return None

def getCameras(name):

marker = find_marker(name, chunk)
if not marker:
print("Fiducial " + name + " not found.")
return

if not marker.position:
print("Fiducial " + name + " is not defined in 3D, skipping...")
return
return marker.projections.keys()

FILEPATH = "C:\\Temp\\raw_data.txt"
chunk = Metashape.app.document.chunk
print("Script started...")

fiducialCameras = getCameras("1") # get all cameras that have fiducial 1 in it, assume that other fiducials are located in camera too..

fid1=find_marker("1", chunk)
fid2=find_marker("2", chunk)
fid3=find_marker("3", chunk)
fid4=find_marker("4", chunk)
f = open(FILEPATH, 'w')
for camera in fiducialCameras:
f.write(camera.label + ',' + str(fid1.projections[camera].coord.x) + ',' + str(fid1.projections[camera].coord.y) + ',' + str(fid2.projections[camera].coord.x) + ',' + str(fid2.projections[camera].coord.y) + ','+ str(fid3.projections[camera].coord.x) + ','+ str(fid3.projections[camera].coord.y) + ','+ str(fid4.projections[camera].coord.x) + ',' + str(fid4.projections[camera].coord.y) +  '\n')
f.close
print("Script finished")

18
Hi,

We would like to export fiducial information for each camera that we've added to one project, in order to add them to a new one. Had a look around and couldn't find any information on the subject. How is the postion of markers stored on each camera? in the camera class?

We're trying to avoid having to hand pick fiducial location on each camera again. Any help appreciated!

cheers,

19
Bug Reports / Path errors when network processing
« on: July 27, 2020, 05:33:06 AM »
Hello,

One of our users has issues when using network processing. The project path seems to reset itself to a root folder or the methashape folder, seemingly at random. It is very hard to reproduce the error. See examples below:

[132.181.231.141:49964] failed #68 BuildDepthMaps: Can't open file: The system cannot find the file specified (2): C:/Program Files/Agisoft/Metashape Pro/edge_3580_v2_med_align_opt_highdense.psx

2020-07-22 14:30:06 [132.181.102.15:50060] failed #77 DetectFiducials: Can't open file: The system cannot find the file specified (2): //geolnas1/Public/edge_8732_v5.psx


Any thoughts on troubleshooting?

20
Python and Java API / Re: License issues
« on: January 23, 2020, 04:02:41 AM »
ok- That solved all the issues! thanks for that.

21
Python and Java API / Re: License issues
« on: January 21, 2020, 01:11:02 AM »
Changing from the lic file from rlm_roam format to a server/port format solved the issue (environment variable didn't), but now other problems are cropping up (Metashape.app.document returns none).

My guess is that the problem might be to do with python versions or some other issues out of my grasp. I can run the script using os.system and metashape.exe -r, so that will have to do.

Thanks for your help

22
Python and Java API / License issues
« on: January 20, 2020, 07:25:23 AM »
Hello,

I am trying to run a python metashape script in conjuction with arcpy.

I installed the metashape wheel file in the same environment, but can't get the license recognised.

I tried copying the license file .lic into the module folder, but it doesn't seem to recognise it.

We have a site wide roaming license- might be the issue?

Cheers.

23
General / Re: Agisoft Metashape 1.6.0 pre-release
« on: November 05, 2019, 09:58:57 PM »
...

Pages: 1 [2]