選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

README.md 2.7 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. ### Goal
  2. There are a lot of bird-perspective greyscale FLIR-images made by a drone, which don't get stitched well together automatically.
  3. But we have geo-coordinates as metadata.
  4. It will be manual work, but maybe we can semi-automatize it.
  5. ### How it works
  6. The process has three steps:
  7. 1. Putting the tiles onto an SVG-canvas using the `gis-svg-stitcher.py` script.
  8. You may want to try around with the settings (scaling, rotation, etc) of the CLI tool until you get a useful SVG.
  9. 2. Manual Editing of the SVG.
  10. There are errors in the GPS data and FLIR data.
  11. Correct them manually using Inkscape or similar Vector Graphics software.
  12. 3. Converting the SVG canvas into a GeoTIFF using the `convert-svg-to-geotiff.py` script.
  13. The script produces 16-bit greyscale PNG-Files, representing the temperature, and exports the SVG into a big PNG image.
  14. This PNG image gets then projected and converted into a GeoTIFF, using temperature information from the grey-scale value of the PNG
  15. #### The two python scripts:
  16. * `gis-svg-stitcher.py` for putting the tiles onto an SVG canvas
  17. Example usage:
  18. ```
  19. python3 gis-svg-stitcher.py relative_path/to/the/image_files --scale=15 --base_rotation=115 --rotation_corr_left=28
  20. ```
  21. It produces a file called `map.svg` next to the original tiles.
  22. * `convert-svg-to-geotiff.py` for converting the (edited) SVG canvas
  23. Example usage:
  24. ```
  25. python3 convert-svg-to-geotiff.py relative_path/to/the/image_files/map.svg output.tiff
  26. ```
  27. It produces the output file, but also some temporary files, which can be deleted manually afterwards. The (likely) hundrets of generated png tiles insnde the "thermalpng" directory may take some disk space (around 0.5 MB per tile).
  28. ### Requirements
  29. * python3 + pip
  30. * inkscape
  31. * firefox
  32. * git
  33. ### Installation
  34. Install Python3, Inkscape, Firefox and git.
  35. Then clone repo and install script dependencies:
  36. ```
  37. git clone https://git.notice.at/redplanet/deep-crop.git
  38. cd deep-crop
  39. pip3 install -r requirements.txt
  40. ```
  41. It's recommended to use a virtualEnv if the host is also used for other python jobs.
  42. ### How to use
  43. You should be able to run commands on the command line.
  44. Use the `--help` flag for more information about how to use the scripts:
  45. ```
  46. python3 gis-svg-stitcher.py --help
  47. ```
  48. and
  49. ```
  50. python3 convert-svg-to-geotiff.py --help
  51. ```
  52. ### Licence
  53. This work is licenced under GPLv3+.
  54. However, the scripts are built upon libraries and programs with some different licences:
  55. * lxml - BSD
  56. * wand - MIT
  57. * PyExifTool - GPLv3+/BSD
  58. * argparse - Python Software Foundation License
  59. * pyproj - MIT
  60. * flirimageextractor - MIT
  61. * opencv-contrib-python - MIT
  62. * numpy - BSD
  63. * pathlib - MIT
  64. * selenium - Apache 2.0
  65. * rasterio - BSD
  66. * Mozilla Firefox - MPL
  67. * Inkscape - GPLv2