Heading Calculator tool estimates camera's heading angle (like gimbal yaw angle) for drone photos.
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.
The Heading Calculator could be used as a Python application. It requires exifread library.
pip install exifread
Download the source code of Heading Calculator to your local machine. Then, navigate to your local HeadingCalculator directory and run main.py. This will open up the application user interface for use.
git clone https://github.com/verticalphotoplacer/HeadingCalculator.git
cd HeadingCalculator
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 Heading Calculator to your local machine
git clone https://github.com/verticalphotoplacer/HeadingCalculator.git
cd HeadingCalculator
- 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/' ),
( 'tool/win/.ExifTool_config', 'tool/win/'),
]
a = Analysis(['main.py'],
pathex=['your_path_to_HeadingCalculator_folder'], # change this line
binaries=[('tool/win/exiftool.exe', 'tool/win/')],
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/HeadingCalculator/dist)
Please follow the steps in Figure 1. The calculated headings are visualized and shown in numbers. The heading information is also updated into each photo's metadata.
Figure 1. Using Heading Calculator
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!