Desktop Tkinter app to annotate windows on a floor-plan image and compute drone capture points, heading, and optional georeferenced outputs.
- Load floor-plan images (
png,jpg,jpeg,bmp,tif,tiff,webp) - Set plan origin
- Calibrate X and Y scale from known real distances
- Add window annotations with 3 clicks:
- window endpoint 1
- window endpoint 2
- side selector click (which side the drone should stand off)
- Two drone distance modes:
auto: computed from HFOV + fill ratiomanual: fixed user-entered distance (Manual dist m)
- Real-time update of existing annotations when you click
Apply Settings - Save/load project JSON
- Export CSV and verbose JSON
- Export marked plan image with drone positions overlaid
- View drone points on map from project JSON (
project_map_viewer.py)
After origin is set:
- image
x: positive to the right - image
y: positive downward - local
east: positive to the right - local
north: positive upward
Conversion:
east_m = (px_x - origin_x) * meters_per_pixelnorth_m = -(px_y - origin_y) * meters_per_pixel
Formula:
d_m = W_m / (2 * tan(HFOV / 2) * fill_ratio)
Where:
W_mis window width in metersHFOVis horizontal field of view in degreesfill_ratiois desired frame occupancy ratio (0 < ratio <= 1)
- Set
Dist modetomanual - Enter
Manual dist m - Click
Apply Settings - Manual distance overrides auto formula (HFOV/fill are ignored for standoff)
When you click Apply Settings, the app recalculates existing annotations immediately (no reload needed) using the current settings and distance mode.
- New annotations are sequentially numbered (
W1,W2, ...) - Preview rendering does not consume IDs
- IDs are re-numbered sequentially when loading a project and after deletions
If georef fields are set:
- origin latitude/longitude/altitude
- plan
+Yazimuth clockwise from true north
the app converts local EN coordinates to LLA using navpy.
- Saves editable project state
- Saved under
output/project/json - Includes annotation geometry and current settings
- Verbose structure with:
project(full project payload)exports(flat per-annotation rows)
- Flat per-annotation table for spreadsheets/scripting
- Exports plan image with drone positions, guide lines, and labels drawn
- Menu:
File -> Export Marked Plan Image...
Select: select annotationPan: tool mode (mouse pan is still middle/right drag)Origin: set origin pointCal X: set X calibrationCal Y: set Y calibrationWindow: add window annotation
- Mouse wheel: zoom
- Middle drag or right drag: pan
- Left click: active tool action
Esc: switch toSelectand clear temp tool stateCtrl+S: save projectCtrl+Z: undoCtrl+Y: redo
output/project/json: project saves + JSON exportsoutput/project/csv: CSV exportsoutput/project/images: marked plan image exports
exporter.py also writes output CSV into output/project/csv.
project_map_viewer.py loads project JSON and plots drone points on a map.
Run:
python project_map_viewer.pyOr with file:
python project_map_viewer.py path/to/project.jsonexporter.py converts saved/exported JSON to a compact CSV with:
iddrone_lat_degdrone_lon_degdrone_alt_mheading_deg
Run:
python exporter.pyOr:
python exporter.py path/to/input.json output_name.csv- Python 3.10+
- Tkinter
- Dependencies in
requirements.txt
Install:
pip install -r requirements.txtpython app.py