kopia lustrzana https://github.com/OpenDroneMap/ODM
Script to prepare TIFs captured by Parrot Sequoia (copy GPS Exif tags from RGB JPG)
rodzic
0e91208dcb
commit
5e7a351444
|
@ -0,0 +1,14 @@
|
||||||
|
# Prepare TIFs from Parrot Sequoia
|
||||||
|
|
||||||
|
The Sequoia captures five images per shot, an RGB JPG and four single band TIFs, but only the JPG contains GPS Exif tags. To use the single-band TIFs for multispectral mapping/analysis it’s useful (not technically required) to have them also contain GPS Exif tags.
|
||||||
|
|
||||||
|
This script will copy the GPS Exif tags from the RGB JPG file to the four TIFs of the same shot.
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
* [exiv2](https://www.exiv2.org/)
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
Run the script from a directory of images captured by Sequoia.
|
||||||
|
```
|
||||||
|
./prepare-tifs.sh
|
||||||
|
```
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Rename - remove timestamp
|
||||||
|
for img in IMG_*.*; do
|
||||||
|
newname=`echo $img | sed -r "s/IMG_[0-9]+_[0-9]+_//"`
|
||||||
|
mv $img $newname
|
||||||
|
done
|
||||||
|
|
||||||
|
# Copy GPS Exif tags from *RGB.JPG to .TIF images
|
||||||
|
for rgb in *_RGB.JPG; do
|
||||||
|
for band in GRE NIR RED REG; do
|
||||||
|
tif=`echo $rgb | sed s/_RGB.JPG/_$band.TIF/`
|
||||||
|
exiv2 -PEVk --grep GPS $rgb > $rgb.tags
|
||||||
|
exiv2 -m $rgb.tags $tif
|
||||||
|
rm $rgb.tags
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
# Move into subfolder per band
|
||||||
|
for band in RGB GRE NIR RED REG; do
|
||||||
|
mkdir $band
|
||||||
|
mv *_$band.* $band/
|
||||||
|
done
|
Ładowanie…
Reference in New Issue