Scripts for exporting scanning metadata as described in the publication "Metadata Schema and Ontology for Capturing and Processing of 3D Cultural Heritage Objects"
Contributors: Timo Homburg, Anja Cramer, Laura Raddatz
Source Code Documentation: Doxygen Documentation
- To use the script you need a license for the Professional Edition of Agisoft Metashape
- Agisoft project files also store the metadata of input data, processes and results. They can be accessed with the Python module of Agisoft Metashape. The keys for accessing the metadata have changed during version upgrades. The scripts were applied to the following Agisoft versions: 1.8.4 / 1.7.2 / 1.6.2 / 1.5.5 / 1.5.4 / 1.5.1 / 1.5.0 / and older versions
- After installing the Python 3 module from Agisoft and activating the Agisoft Metashape license in the development environment (e.g. Visual Studio Code), the script can be executed directly
- After starting, an input window will open, where the Agisoft project and the unit used in the project must be selected. The reason for selecting the unit are older Agisoft projects where we did not have unit millimeter set directly in the project but used it anyway.
- The variable includeonlypropswithuri can be set True or False. With True only the metadata that is assigned an "uri" in the script will be exported, with False all.
The data generated by this script may be published at a SPARQL endpoint. To make data URIs of this metadata dereferencable, it is possible to define a data namespace in the script. If no namespace is defined, a default namespace is used.
- The metadata are exported as **.ttl and **.json files.
- They are saved at the same path as the selected Agisoft project file.
- The file name corresponds to the name of the opened Agisoft project file.
- Contains the metadata of the Agisoft project
- You can open it with an editor
- The content of the **.ttl file is based on the ontology structure. https://github.com/mainzed/mainzedObjectsOntology
- You can open it e.g. with Protégé.
- Sample data can be found here .
- There are two sample data, the difference are used references:
- sample 1: with coded targets and imported coordinate list
- sample 2: with coded targets and defined scale bars in between
- The zip files sample-1_agisoft-project.zip and sample-2_agisoft-project.zip contain Agisoft project files and the captured images. (Agisoft version 1.8.4)
- In sample-1_result_3d-model.zip and sample-2_result_3d-model.zip you can download the 3d-model of the project.
- To use the script you need a license for the GOM Software ATOS Professional 2016 or GOM Inspect Professional 2016.
- Other versions of the software might work as well, but the script was only tested with this version
- Open the software ATOS Professional 2016 or GOM Inspect Professional 2016.
- Import the Python script under the menu Scripting.
- The variable includeonlypropswithuri can be set True or False. With True only the metadata that is assigned an "uri" in the script will be exported, with False all.
- The variable sensortype are a list of structured light scanners. If your scanner is not included, you can add it here, otherwise your sensor in the exported TTL will get the general class " capturing device".
- The variables referencepointid and globalreferencepointid contain the keyword for the point ID. For other ATOS Python libraries this could be different.
The data generated by this script may be published at a SPARQL endpoint. To make data URIs of this metadata dereferencable, it is possible to define a data namespace in the script. If no namespace is defined, a default namespace is used.
- The metadata are exported as **.ttl and **.json files.
- They are saved at the same path as the opened ATOS file.
- The filename corresponds to the name of the opened ATOS file.
- Contains the metadata of the ATOS project
- You can open it with an editor
- The content of the **.ttl file is based on the ontology structure. https://github.com/mainzed/mainzedObjectsOntology
- You can open it e.g. with Protégé.
- Sample data can be found here .
- There is a zip folder atos-2016_project.zip that contains the **.atos file
- In atos_2016_3d-modell.zip you can download the 3d-model of the scanning project.
- In atos_2016_metadata.zip are the metadata belonging to the scanning project and the 3d-model, which are the result of this script.
- To use the script you need a license for the software ATOS v6.2 (GOM a ZEISS company).
- Other versions of the software may work as well, because we only have this version we could use the script only here.
- Open the software ATOS v6.2.
- Import the Python script under the menu item Macro.
- The variable includeonlypropswithuri can be set True or False. With True only the metadata that is assigned an "uri" in the script will be exported, with False all.
- The variable sensortype are a list of structured light scanners. If your scanner is not included, you can add it here, otherwise your sensor in the exported TTL will get the general class " capturing device".
- The variables referencepointid and globalreferencepointid contain the keyword for the point ID. For other ATOS Python libraries this could be different.
The data generated by this script may be published at a SPARQL endpoint. To make data URIs of this metadata dereferencable, it is possible to define a data namespace in the script. If no namespace is defined, a default namespace is used.
- The script writes out the metadata for **.amp and **.session files.
- The metadata are exported as **.ttl and **.txt files.
- They are saved at the same path as the opened ATOS file.
- The filename corresponds to the name of the opened ATOS file.
- The ATOS v6.2 software includes the Pyton version 2.3, in which it is not possible to import the external json library. Therefore the dictionary is written into a **.txt file, which can be converted into a **.json file in another environment.
- The content of the **.ttl file is based on the ontology structure. https://github.com/mainzed/mainzedObjectsOntology
- You can open it e.g. with Protégé.
- Sample data can be found here .
- There is a zip folder atos-v62_project.zip that contains both the **.amp file and the **.session file that you can use for testing.
- In atos_62_3d-modell.zip you can download the 3d-model of the scanning project.
- In atos_62_metadata.zip are the metadata belonging to the scanning project and the 3d-model, which are the result of this script.