latinet:unicaes:opendronemap:start
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
latinet:unicaes:opendronemap:start [2023/08/25 02:10] – jan.sonntag | latinet:unicaes:opendronemap:start [2023/08/25 21:47] (current) – removed jan.sonntag | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== OpenDroneMap ====== | ||
- | On this page, we are explaining and documenting the installation and usage of OpenDroneMap (ODM) on a Google Cloud Machine. | ||
- | The source code of ODM can be found in this GitHub Repo: [[https:// | ||
- | |||
- | ===== Installation ===== | ||
- | We are installing ODM on a Google Machine which is provided by the UNICAES. It is only turned on when needed. | ||
- | |||
- | As some prerequisites: | ||
- | |||
- | ==== Install Docker and Docker Compose ==== | ||
- | |||
- | We followed the official documentation: | ||
- | [[https:// | ||
- | |||
- | ==== Getting WebODM ==== | ||
- | |||
- | Download the git repository: | ||
- | < | ||
- | git clone https:// | ||
- | cd WebODM | ||
- | </ | ||
- | |||
- | Then WebODM can be started with the following: | ||
- | < | ||
- | ./webodm.sh restart --ssl --hostname webodm.myorg.com | ||
- | </ | ||
- | |||
- | ===== Preparing Drone Images from DJI Mavic 3 Multispectral ===== | ||
- | |||
- | After taking the photos with the DJI M3M we need to do some postprocessing to be able to use them in ODM. Therefore it is necessary to split the multispectral from the plain RGB images. Also, the timestamps of the photos need to be matched just in case and the names need to be slightly modified as there were some hick ups in ODM from time to time. | ||
- | We already prepared a script for that: | ||
- | <file sh correct_filenames.sh> | ||
- | #!/bin/bash | ||
- | |||
- | # Process images in the specified directory | ||
- | process_images() { | ||
- | local target_dir=" | ||
- | | ||
- | mkdir " | ||
- | mkdir " | ||
- | |||
- | echo " | ||
- | | ||
- | for first_image in $(ls " | ||
- | echo "Found first image: $first_image" | ||
- | | ||
- | timestamp=$(echo " | ||
- | echo " | ||
- | |||
- | # Extract the number (XXXX) from the first image filename | ||
- | number=$(echo " | ||
- | echo " | ||
- | |||
- | mv " | ||
- | |||
- | for ext in " | ||
- | echo " | ||
- | | ||
- | image_to_rename=$(ls " | ||
- | | ||
- | if [ -n " | ||
- | new_ext=$(echo " | ||
- | new_name=" | ||
- | echo " | ||
- | mv " | ||
- | else | ||
- | echo "No matching ${ext}.TIF files found for number: $number" | ||
- | fi | ||
- | done | ||
- | done | ||
- | } | ||
- | |||
- | # Check if an argument is provided | ||
- | if [ $# -ne 1 ]; then | ||
- | echo " | ||
- | exit 1 | ||
- | fi | ||
- | |||
- | # Call the function to process images | ||
- | process_images " | ||
- | </ | ||
- | |||
- | Just save this file somewhere you will be able to find it later as well. | ||
- | |||
- | We are running this script on Ubuntu. Do make it executable Don´t forget to: | ||
- | < | ||
- | sudo chmod +x ./ | ||
- | </ | ||
- | |||
- | You can then execute the script by giving the folder with pictures inside as an argument. Example: | ||
- | < | ||
- | ./ | ||
- | </ |