Flight Separator tool detects and separates drone photos in a folder taken in different flights based on timestamps.
There are three ways to install this tool: use a precompiled executable, run as Python application or build local executable file.
A precompiled executable is provided at the bin directory. Please download to your computer and double-click to run.
Flight Separator could be used as a Python application. It requires exifread library.
pip install exifread
Download the source code of Flight Separator to your local machine. Then, navigate to your local FlightSeparator directory and run main.py. This will open up the application user interface for use.
git clone https://github.com/verticalphotoplacer/FlightSeparator.git
cd FlightSeparator
python main.py
pyinstaller is a recommended tool to build a local executable file. It is recommended to build from a minimal Python environment. This will exclude unnecessary packages and create a minimum size executable file.
- Create and activate a virtual environment in your Python installation.
mkdir py36envtest
python -m venv venv_py36
venv_py36\Scripts>activate.bat
- Install dependencies
pip install exifread
- Install pyinstaller
pip install pyinstaller
- Download the source code of Flight Separator to your local machine
git clone https://github.com/verticalphotoplacer/FlightSeparator.git
cd FlightSeparator
- Change the pathex in main.spec file to your path
# -*- mode: python ; coding: utf-8 -*-
block_cipher = None
added_files = [
( 'main.ui', '.' ),
( 'icon/app.png', 'icon/' ),
( 'icon/copypaste.png', 'icon/' ),
( 'icon/erase.png', 'icon/' ),
( 'icon/save2file.png', 'icon/' ),
]
a = Analysis(['main.py'],
pathex=['your_path_to_FlightSeparator_folder'], # change this line
binaries=[],
datas=added_files,
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='main',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False )
- Create executable
pyinstaller --onefile main.spec
This will create an executable file in a new directory name dist (your_path/FlightSeparator/dist)
Please follow the steps in Figure 1. The result is shown in the log. A folder is created for each detected flight, to store the flight's photos.
Figure 1. Using Flight Separator
Input folder before (Figure 2) and after running the tool (Figure 3). In this example, there are photos from 3 different flights in the input folder.
Figure 2. Input folder before running Flight Separator
Figure 3. Input folder after running Flight Separator
This tool could be used to support Vertical Photo Placer which may require same-flight photos in some of its features.
If you find some issue that you are willing to fix, code contributions are welcome.
- Man Duc Chuc
The author thanks the International Digital Earth Applied Science Research Center, Chubu University and National Research Institute for Earth Science and Disaster Resilience (NIED), Japan.
This software is distributed under a GNU General Public License version 3.
Coming soon!