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.


Topics - Florian T.

Pages: [1]
1
Python and Java API / How to mirroring an orthophoto
« on: August 02, 2018, 05:17:56 PM »
Hey,

a few years ago we made the attached Script in Cooperation with Agisoft for exporting archaeological profiles in planar projection defined by vector (from three markers) and Z axes . Now i´m searching for an idea to manage two profiles which are next to each other BUT are located on opposite sides. So when you look on a dirty ground from above and think of a circle with an Cross inside. Now you dig a hole at the top right and bottom left corner of the cross you get two profils in the middle wich mainly belong together but are located on opposite sides.
The Idea was to export the second one mirrored so that i get the complete profile when i put both orthophotos in a GIS. The center marker will be used for both profiles.
The whole thing is a bit complex but in the end it´s all about mirroring the second orthophoto and export both in a way that they are attached to each other in GIS .

Any ideas?

Thanks

2
Python and Java API / A way to force non-read-only open? Part 2
« on: July 13, 2018, 05:17:28 PM »
It´s a problem which was discussed one year ago but its still a problem. Wenn i´m running a script which opens a *psx file it´s starting in read-only mode and ask me if i want to modify. Not always but sometimes. So it is interupting the automation script. I use version 1.4.0 and in 1.3.3 the open(path,read_only=False) was implemented which i suposed could handle the problem. It´s still integrated in my scrip but wouldn´t help at all.

If anyone have an idea... I´ll take it.

3
Python and Java API / Problems with exporting model
« on: October 05, 2017, 03:08:18 PM »
Hey,

i just want to write a script which iterates through a given folder an all subfolders, opens psx files, export the model and then delete the psx files.
The following script always end in an Runtime Error:

import PhotoScan
import os

#def psx_to_obj_converter():

doc = PhotoScan.app.document
path = PhotoScan.app.getExistingDirectory("Bitte wählen Sie den Zielordner mit den *.psx Projekten in Ordner und Unterordnern")
for root, dirs, files in os.walk(path):
    for filename in files:
        if ".PSX" in filename.upper():
            doc.open(os.path.join(root, filename))
            chunk = doc.chunk
            chunk.exportModel(root, binary = False, precision = 6, texture_format = PhotoScan.ImageFormatJPEG, texture = True, normals = False, colors = False, cameras = False, udim = False, strip_extensions = False, format = PhotoScan.ModelFormatOBJ, projection = PhotoScan.CoordinateSystem("EPSG::31467"))
            #os.remove(path + "/" + filename)


The following error occures every time i tested it:

2017-10-05 13:49:16   File "C:/Users/ArchaeoBW/AppData/Local/Agisoft/PhotoScan Pro/scripts/psx to obj converter.py", line 13, in <module>
2017-10-05 13:49:16     chunk.exportModel(path, binary = False, precision = 6, texture_format = PhotoScan.ImageFormatJPEG, texture = True, normals = False, colors = False, cameras = False, udim = False, strip_extensions = False, format = PhotoScan.ModelFormatOBJ, projection = PhotoScan.CoordinateSystem("EPSG::31467"))
2017-10-05 13:49:16 RuntimeError: Can't create file: Permission denied (13): P:/2017_Maßnahmen/2017_258_Ludwigsburg_Schlosstr_29_31_Schmiedgaessle_5/Vermessung/Drone_3D


Thanks for your help!



Pages: [1]