Skip to content

Latest commit

 

History

History
182 lines (132 loc) · 5.91 KB

README.md

File metadata and controls

182 lines (132 loc) · 5.91 KB

Logo

Insect scanner

Script and documentation on scanning insects

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact

About The Project

We are in the process of digitalizing our Entomological Collection. To optimize the process we are doing experiments and writing scripts to automate most of the process. In this documentation, we are sharing our scripts and process optimizations. It is important to note that the hardware with which the images are made to process the 3d model is from Small World Vision. The information gathered from the hardware is needed for most of the scripts.

(back to top)

Getting Started

To get a local copy up and running follow these steps below.

Prerequisites

Software:

  • Disc3D
  • Metashape

Hardware:

Installation

Download all the files for the corresponding Metashape version under 'Insect-Scanner/Metashape/Script/Version X.X/'. Or you can simply download it here. Save the folder with the same folder structure where the .py files are contained.

For the script to work some adjustments need to be made inside the python script. To edit the script we recommend Visual Studio Code.

Calibration:
All settings and calibrations can be done in the setting.py file inside the variable folder.

  1. Create a folder where two files will be stored that are needed for the calibration
  2. Open the folder from the DISC3D process where the desired calibration was used
  3. Copy the file 'CamPos.txt' to the folder created in step 1
  4. Go back to the folder from the DISC3D process
  5. Open 'ScanInformation.pdf'
  6. Copy the value for '2.4. Camera Constant/f [px]'
  7. Load the images into Metashape (Workflow>Add Folder)
  8. Go to Tool>Camera Calibration
  9. Under the initial change Type from 'Auto' to 'Precalibrated'
  10. Paste the copied value from step 6 into 'f'
  11. Click the save icon
  12. Save the file to the folder created in step 1 (specific name not needed. We use 'CamCalibration')
  13. Open the file 'setting.py' inside the 'variable' folder
  14. Change the value for 'calibFolder' to the path of the folder created in step 1
calibFolder = "FOLDER_PATH"
  1. Change the value for 'referenceFilename' to the file name of the file copied in step 3 (usually 'CamPos')
referenceFilename = "CAMPOS_NAME"
  1. Change the value for 'CamCalibration' to the file name of the file created in step 12 (usually 'CamCalibration')
CamCalibration = "CAMCALIBRATION_NAME"
  1. Save the script File>Save

For more information, you are welcome to contact us.

(back to top)

Usage

To run the scripts you have to start them inside of Metashape:

  1. Go to Tools>Run Script (Shortcut: Ctrl+R)
  2. Select the folder icon
  3. Browse for the desired script and open it
  4. Press OK

The script will now go through and ask for the specified folder.


There are four different scripts:

  • BatchScript
    process one insect to a 3d model

  • BatchScript_FastCalculation
    process one insect to a 3d model with the addition that the calculation will be approx. 3x faster with minimal loss of quality. Can be used for experimenting

  • Multi_BatchScript
    process multiple insects to 3d models at once (select each folder)

  • Multi_BatchScript_SingleFolder
    process multiple insects to 3d models at once (select main folder)

  • Model_Exporter
    export multiple insect 3d models to obj at once


For more information, you are welcome to contact us.

(back to top)

Contributing

Any contributions are greatly appreciated.

If you have a suggestion, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/NewFeature)
  3. Commit your Changes (git commit -m 'Add some NewFeature')
  4. Push to the Branch (git push origin feature/NewFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Dr. Michael Greeff - [email protected]

Christian Felsner - [email protected]

Ernst Herb - [email protected]


(back to top)