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
Python and Java API / python script for maksing out of focus images
« on: February 27, 2024, 05:47:38 AM »
kai ora, I made a python script, based on the removebg script in the agisoft github repo, that simply detects areas of photos that are in focus and creates masks. The idea is that thsi script could be used to improve detailed textures. I used it as a learning tool for myself, but thought it might be useful to others.

https://github.com/jrjdavidson/detectEdges


3
Python and Java API / Re: Incorrect version when running script
« on: February 19, 2024, 04:54:52 AM »
whoops, I just realised I updated all the nodes but not the server. It works fine now. Sorry!

4
Python and Java API / Re: Incorrect version when running script
« on: February 19, 2024, 04:49:04 AM »
Kia ora Alexey,

I just installed 2.1.1 and I still have the same issue when sending a python script to network processing,.

5
Python and Java API / Re: Incorrect version when running script
« on: February 12, 2024, 04:44:24 AM »
looks like it is the same as topic  #16128

6
Python and Java API / Incorrect version when running script
« on: February 12, 2024, 02:33:49 AM »
I'm unable to run scripts over the network anymore once I've installed 2.1. It appears to be due to the project not being recognised as the correct version. This is not an issue if I launch the same process using the GUI instead of a script. See attached Network monitor screenshot of a project launched as a script.


Any thoughts anyone?

7
Python and Java API / Re: check if model has UVs
« on: February 07, 2024, 10:19:29 PM »
thanks!

8
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:

9
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")

10
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,

11
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?

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

13
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

14
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.

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

Pages: [1]