├── README.md └── Video_UAV_Tracker ├── .idea ├── .gitignore ├── Video_UAV_Tracker.iml ├── inspectionProfiles │ └── Project_Default.xml ├── misc.xml └── modules.xml ├── AddPoint.py ├── CanvasMarkers.py ├── CreateMosaic.py ├── LICENSE.txt ├── Makefile ├── NewProject.py ├── QGisMap.py ├── README.md ├── Setup3D.py ├── Setup3D.ui ├── SkipTrackTool.py ├── VUT_3D.py ├── VideoGis.py ├── VideoGis_dockwidget.py ├── VideoGis_dockwidget_base.ui ├── __init__.py ├── __pycache__ ├── AddPoint.cpython-35.pyc ├── AddPoint.cpython-36.pyc ├── AddPoint.cpython-39.pyc ├── CanvasMarkers.cpython-35.pyc ├── CanvasMarkers.cpython-36.pyc ├── CanvasMarkers.cpython-39.pyc ├── NewProject.cpython-35.pyc ├── NewProject.cpython-36.pyc ├── NewProject.cpython-39.pyc ├── QGisMap.cpython-35.pyc ├── QGisMap.cpython-36.pyc ├── QGisMap.cpython-39.pyc ├── Setup3D.cpython-35.pyc ├── Setup3D.cpython-36.pyc ├── Setup3D.cpython-39.pyc ├── SkipTrackTool.cpython-35.pyc ├── SkipTrackTool.cpython-36.pyc ├── SkipTrackTool.cpython-39.pyc ├── VideoGis.cpython-35.pyc ├── VideoGis.cpython-36.pyc ├── VideoGis.cpython-39.pyc ├── VideoGis_dockwidget.cpython-35.pyc ├── VideoGis_dockwidget.cpython-36.pyc ├── VideoGis_dockwidget.cpython-39.pyc ├── __init__.cpython-35.pyc ├── __init__.cpython-36.pyc ├── __init__.cpython-39.pyc ├── resources.cpython-35.pyc ├── resources.cpython-36.pyc ├── resources.cpython-39.pyc ├── tableManagerUi.cpython-35.pyc ├── tableManagerUi.cpython-36.pyc ├── tableManagerUi.cpython-39.pyc ├── tableManagerUiClone.cpython-35.pyc ├── tableManagerUiClone.cpython-36.pyc ├── tableManagerUiClone.cpython-39.pyc ├── tableManagerUiInsert.cpython-35.pyc ├── tableManagerUiInsert.cpython-36.pyc ├── tableManagerUiInsert.cpython-39.pyc ├── tableManagerUiRename.cpython-35.pyc ├── tableManagerUiRename.cpython-36.pyc ├── tableManagerUiRename.cpython-39.pyc ├── vut_newproject.cpython-35.pyc ├── vut_newproject.cpython-36.pyc ├── vut_newproject.cpython-39.pyc ├── vut_qgismap.cpython-35.pyc ├── vut_qgismap.cpython-36.pyc └── vut_qgismap.cpython-39.pyc ├── geographiclib ├── __init__.py ├── __pycache__ │ ├── __init__.cpython-35.pyc │ ├── __init__.cpython-36.pyc │ ├── __init__.cpython-39.pyc │ ├── constants.cpython-35.pyc │ ├── constants.cpython-36.pyc │ ├── constants.cpython-39.pyc │ ├── geodesic.cpython-35.pyc │ ├── geodesic.cpython-36.pyc │ ├── geodesic.cpython-39.pyc │ ├── geodesiccapability.cpython-35.pyc │ ├── geodesiccapability.cpython-36.pyc │ ├── geodesiccapability.cpython-39.pyc │ ├── geodesicline.cpython-35.pyc │ ├── geodesicline.cpython-36.pyc │ ├── geomath.cpython-35.pyc │ ├── geomath.cpython-36.pyc │ └── geomath.cpython-39.pyc ├── accumulator.py ├── constants.py ├── geodesic.py ├── geodesiccapability.py ├── geodesicline.py ├── geographiclib_LICENSE.txt ├── geomath.py ├── polygonarea.py └── test │ ├── __init__.py │ └── test_geodesic.py ├── help ├── Makefile ├── make.bat └── source │ ├── conf.py │ └── index.rst ├── i18n └── af.ts ├── icon.png ├── iconNewTabEditorConsole.png ├── mIconFormSelect.svg ├── metadata.txt ├── pb_tool.cfg ├── plugin_upload.py ├── pylintrc ├── resources.py ├── resources.qrc ├── resources2.py ├── scripts ├── compile-strings.sh ├── run-env-linux.sh └── update-strings.sh ├── tableManagerUi.py ├── tableManagerUi.ui ├── tableManagerUiClone.py ├── tableManagerUiClone.ui ├── tableManagerUiInsert.py ├── tableManagerUiInsert.ui ├── tableManagerUiRename.py ├── tableManagerUiRename.ui ├── terrain.frag.glsl ├── terrain.vert.glsl ├── test ├── __init__.py ├── __pycache__ │ ├── qgis_interface.cpython-39.pyc │ ├── test_VideoGis_dockwidget.cpython-39.pyc │ └── test_init.cpython-39.pyc ├── qgis_interface.py ├── tenbytenraster.asc ├── tenbytenraster.asc.aux.xml ├── tenbytenraster.keywords ├── tenbytenraster.lic ├── tenbytenraster.prj ├── tenbytenraster.qml ├── test_VideoGis_dockwidget.py ├── test_init.py ├── test_qgis_environment.py ├── test_resources.py ├── test_translations.py └── utilities.py ├── vut_newproject.py ├── vut_newproject.ui ├── vut_qgismap.py └── vut_qgismap.ui /README.md: -------------------------------------------------------------------------------- 1 | # Video Uav Tracker 3D 2 | A Qgis >= 2.99 plugin, synch and display on map a video with a gps track. Fill Geographic Database with information and snapshot. Extract video frame with associated UTM coordinates for rapid photogrammetry use . 3 | 4 | 5 | 6 | Video Uav Tracker v 2.1 (3D) 7 | 8 | Replay a video in sync with a gps track displayed on the map. 9 | 10 | repository: https://github.com/sagost/Video_UAV_Tracker-3D/ 11 | 12 | ---- 13 | copyright : (C) 2017 by Salvatore Agosta 14 | email : sagost@katamail.com 15 | 16 | 17 | This program is free software; you can redistribute it and/or modify 18 | it under the terms of the GNU General Public License as published by 19 | the Free Software Foundation; either version 2 of the License, or 20 | (at your option) any later version. 21 | 22 | ---- 23 | 24 | 25 | INSTRUCTION: 26 | 27 | ATTENTION: 3D IS NOT TESTED ON WINDOWS PLATFORM 28 | - Pixel value query need a .npz archive containing one array data for every frame, it must be named as 'VideoFile.npz' and be in the same folder of 'VideoFile.mp4' 29 | - for 3d options install numpy,panda3d and pypng python3 modules 30 | - Download all files from https://github.com/sagost/Video_UAV_Tracker-3D/Video_UAV_Tracker/FFMPEG and copy them in your Video_Uav_Tracker/FFMPEG folder and give them permissions to be executable. 31 | - Windows user shoukd install K-Lite codec packs or similar 32 | 33 | Syncing: 34 | - Create new project 35 | - Select video and .gpx track (1 trkpt per second) 36 | - Create associated shapefile 37 | - Manage 3d options (select dem and image with same extension and cartographic projection) 38 | - Identify first couple Frame/GpsTime and select it. 39 | - Push Synchronize 40 | - Push Start 41 | 42 | Replay: 43 | - Move on map 44 | - Create associated DB shapefile 45 | - Add POI with associated video frame saved 46 | - Add POI directly from video sceen if 3D is active 47 | - Create direct georeferenced mosaic if 3D is active 48 | - Extract frames with associated coordinates for rapid photogrammetry use 49 | 50 | GPX FIELDS for 3D OPTION: 51 | 52 | - 'course' or 'yaw' for HEADING 53 | - 'pitch' for PITCH 54 | - 'roll' for ROLL 55 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/.idea/Video_UAV_Tracker.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 22 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/AddPoint.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # -*- coding: utf-8 -*- 3 | ''' 4 | Video Uav Tracker 3D v 2.1 5 | 6 | Replay a video in sync with a gps track displayed on the map. 7 | 8 | 9 | ------------------- 10 | copyright : (C) 2017 by Salvatore Agosta 11 | email : sagost@katamail.com 12 | 13 | 14 | This program is free software; you can redistribute it and/or modify 15 | it under the terms of the GNU General Public License as published by 16 | the Free Software Foundation; either version 2 of the License, or 17 | (at your option) any later version. 18 | 19 | 20 | INSTRUCTION: 21 | 22 | ATTENTION: 3D IS NOT TESTED ON WINDOWS PLATFORM 23 | - Pixel value query need a .npz archive containing one array data for every frame, it must be named as 'VideoFile.npz' and be in the same folder of 'VideoFile.mp4' 24 | - for 3d options install numpy,panda3d and pypng python3 modules 25 | - Download all files from https://github.com/sagost/Video_UAV_Tracker-3D/Video_UAV_Tracker/FFMPEG and copy them in your Video_Uav_Tracker/FFMPEG folder 26 | 27 | Syncing: 28 | - Create new project 29 | - Select video and .gpx track (1 trkpt per second) 30 | - Identify first couple Frame/GpsTime and select it. 31 | - Push Synchronize 32 | - Push Start 33 | 34 | Replay: 35 | - Move on map 36 | - Create associated DB shapefile 37 | - Add POI with associated video frame saved 38 | - Extract frames with associated coordinates for rapid photogrammetry use 39 | ''' 40 | 41 | from qgis.gui import QgsMapTool 42 | from PyQt5.QtGui import QCursor,QPixmap 43 | from PyQt5.QtCore import Qt 44 | 45 | class AddPointTool(QgsMapTool): 46 | 47 | def __init__(self, canvas, layer,Parent): 48 | QgsMapTool.__init__(self,canvas) 49 | self.Parent = Parent 50 | self.canvas=canvas 51 | self.layer = layer 52 | self.geom = None 53 | self.rb = None 54 | self.x0 = None 55 | self.y0 = None 56 | #our own fancy cursor 57 | self.cursor = QCursor(QPixmap(["16 16 3 1", 58 | " c None", 59 | ". c #FF0000", 60 | "+ c #17a51a", 61 | " ", 62 | " +.+ ", 63 | " ++.++ ", 64 | " +.....+ ", 65 | " +. . .+ ", 66 | " +. . .+ ", 67 | " +. . .+ ", 68 | " ++. . .++", 69 | " ... ...+... ...", 70 | " ++. . .++", 71 | " +. . .+ ", 72 | " +. . .+ ", 73 | " ++. . .+ ", 74 | " ++.....+ ", 75 | " ++.++ ", 76 | " +.+ "])) 77 | 78 | 79 | def canvasPressEvent(self,event): 80 | layer = self.layer 81 | x = event.pos().x() 82 | y = event.pos().y() 83 | point = self.toLayerCoordinates(layer,event.pos()) 84 | pointMap = self.toMapCoordinates(layer, point) 85 | self.x0 = pointMap.x() 86 | self.y0 = pointMap.y() 87 | self.Parent.AddPoint(point.x(),point.y(),-1000) 88 | 89 | def canvasMoveEvent(self,event): 90 | pass 91 | 92 | def canvasReleaseEvent(self,event): 93 | pass 94 | 95 | def showSettingsWarning(self): 96 | pass 97 | 98 | def activate(self): 99 | self.canvas.setCursor(self.cursor) 100 | 101 | def deactivate(self): 102 | pass 103 | 104 | def isZoomTool(self): 105 | return False 106 | 107 | def isTransient(self): 108 | return False 109 | 110 | def isEditTool(self): 111 | return True 112 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/CanvasMarkers.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ''' 3 | Video Uav Tracker v 2.1 (3D) 4 | 5 | Replay a video in sync with a gps track displayed on the map. 6 | 7 | 8 | ------------------- 9 | copyright : (C) 2017 by Salvatore Agosta 10 | email : sagost@katamail.com 11 | 12 | 13 | This program is free software; you can redistribute it and/or modify 14 | it under the terms of the GNU General Public License as published by 15 | the Free Software Foundation; either version 2 of the License, or 16 | (at your option) any later version. 17 | 18 | 19 | INSTRUCTION: 20 | 21 | ATTENTION: 3D IS NOT TESTED ON WINDOWS PLATFORM 22 | - Pixel value query need a .npz archive containing one array data for every frame, it must be named as 'VideoFile.npz' and be in the same folder of 'VideoFile.mp4' 23 | - for 3d options install numpy,panda3d and pypng python3 modules 24 | - Download all files from https://github.com/sagost/Video_UAV_Tracker-3D/Video_UAV_Tracker/FFMPEG and copy them in your Video_Uav_Tracker/FFMPEG folder 25 | 26 | Syncing: 27 | - Create new project 28 | - Select video and .gpx track (1 trkpt per second) 29 | - Create associated shapefile 30 | - Manage 3d options (select dem and image with same extension and cartographic projection) 31 | - Identify first couple Frame/GpsTime and select it. 32 | - Push Synchronize 33 | - Push Start 34 | 35 | Replay: 36 | - Move on map 37 | - Create associated DB shapefile 38 | - Add POI with associated video frame saved 39 | - Add POI directly from video sceen if 3D is active 40 | - Create direct georeferenced mosaic if 3D is active 41 | - Extract frames with associated coordinates for rapid photogrammetry use 42 | ''' 43 | 44 | 45 | from PyQt5 import QtGui 46 | from qgis.core import * 47 | from qgis.gui import * 48 | 49 | 50 | class PositionMarker(QgsMapCanvasItem): 51 | """ marker for current GPS position """ 52 | 53 | def __init__(self, canvas, alpha=255): 54 | QgsMapCanvasItem.__init__(self, canvas) 55 | self.pos = None 56 | self.hasPosition = False 57 | self.d = 20 58 | self.angle = 0 59 | self.setZValue(100) # must be on top 60 | self.alpha=alpha 61 | 62 | def newCoords(self, pos): 63 | if self.pos != pos: 64 | self.pos = QgsPointXY(pos) # copy 65 | self.updatePosition() 66 | 67 | def setHasPosition(self, has): 68 | if self.hasPosition != has: 69 | self.hasPosition = has 70 | self.update() 71 | 72 | def updatePosition(self): 73 | if self.pos: 74 | self.setPos(self.toCanvasCoordinates(self.pos)) 75 | self.update() 76 | 77 | def paint(self, p, xxx, xxx2): 78 | if not self.pos: 79 | return 80 | 81 | path = QtGui.QPainterPath() 82 | path.moveTo(0,-15) 83 | path.lineTo(15,15) 84 | path.lineTo(0,7) 85 | path.lineTo(-15,15) 86 | path.lineTo(0,-15) 87 | 88 | # render position with angle 89 | p.save() 90 | p.setRenderHint(QtGui.QPainter.Antialiasing) 91 | if self.hasPosition: 92 | p.setBrush(QtGui.QBrush(QtGui.QColor(0,0,0, self.alpha))) 93 | else: 94 | p.setBrush(QtGui.QBrush(QtGui.QColor(200,200,200, self.alpha))) 95 | p.setPen(QtGui.QColor(255,255,0, self.alpha)) 96 | p.rotate(self.angle) 97 | p.drawPath(path) 98 | p.restore() 99 | 100 | def boundingRect(self): 101 | return QtCore.QRectF(-self.d,-self.d, self.d*2, self.d*2) 102 | 103 | class ReplayPositionMarker(PositionMarker): 104 | def __init__(self, canvas): 105 | PositionMarker.__init__(self, canvas) 106 | 107 | def paint(self, p, xxx, xxx2): 108 | if not self.pos: 109 | return 110 | 111 | path = QtGui.QPainterPath() 112 | path.moveTo(-10,1) 113 | path.lineTo(10,1) 114 | path.lineTo(10,0) 115 | path.lineTo(1,0) 116 | path.lineTo(1,-5) 117 | path.lineTo(4,-5) 118 | path.lineTo(0,-9) 119 | path.lineTo(-4,-5) 120 | path.lineTo(-1,-5) 121 | path.lineTo(-1,0) 122 | path.lineTo(-10,0) 123 | path.lineTo(-10,1) 124 | 125 | # render position with angle 126 | p.save() 127 | p.setRenderHint(QtGui.QPainter.Antialiasing) 128 | p.setBrush(QtGui.QBrush(QtGui.QColor(255,0,0))) 129 | p.setPen(QtGui.QColor(255,255,0)) 130 | p.rotate(self.angle) 131 | p.drawPath(path) 132 | p.restore() 133 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/CreateMosaic.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ''' 3 | Video Uav Tracker v 2.1 (3D) 4 | 5 | Replay a video in sync with a gps track displayed on the map. 6 | 7 | 8 | ------------------- 9 | copyright : (C) 2017 by Salvatore Agosta 10 | email : sagost@katamail.com 11 | 12 | 13 | This program is free software; you can redistribute it and/or modify 14 | it under the terms of the GNU General Public License as published by 15 | the Free Software Foundation; either version 2 of the License, or 16 | (at your option) any later version. 17 | 18 | 19 | INSTRUCTION: 20 | 21 | ATTENTION: 3D IS NOT TESTED ON WINDOWS PLATFORM 22 | - Pixel value query need a .npz archive containing one array data for every frame, it must be named as 'VideoFile.npz' and be in the same folder of 'VideoFile.mp4' 23 | - for 3d options install numpy,panda3d and pypng python3 modules 24 | - Download all files from https://github.com/sagost/Video_UAV_Tracker-3D/Video_UAV_Tracker/FFMPEG and copy them in your Video_Uav_Tracker/FFMPEG folder 25 | 26 | Syncing: 27 | - Create new project 28 | - Select video and .gpx track (1 trkpt per second) 29 | - Create associated shapefile 30 | - Manage 3d options (select dem and image with same extension and cartographic projection) 31 | - Identify first couple Frame/GpsTime and select it. 32 | - Push Synchronize 33 | - Push Start 34 | 35 | Replay: 36 | - Move on map 37 | - Create associated DB shapefile 38 | - Add POI with associated video frame saved 39 | - Add POI directly from video sceen if 3D is active 40 | - Create direct georeferenced mosaic if 3D is active 41 | - Extract frames with associated coordinates for rapid photogrammetry use 42 | ''' 43 | 44 | import sys 45 | import os 46 | import ast 47 | 48 | def CreateMosaic(VideoFile,OutputFile,Startmseconds,VideoTime,VideoWidth,VideoHeight,PointList,OutEPSG,BoundingBoxString): 49 | 50 | Startmseconds = float(Startmseconds) 51 | VideoTime = float(VideoTime) 52 | VideoWidth = int(float(VideoWidth)) 53 | VideoHeight = int(float(VideoHeight)) 54 | PointList = ast.literal_eval(PointList) 55 | OutEPSG = int(OutEPSG) 56 | 57 | FrameSecond = VideoTime + Startmseconds 58 | if os.name == 'nt': 59 | ffmpeg = ('"'+os.path.dirname(__file__)[0:-18]+'/Video_UAV_Tracker/FFMPEG/ffmpeg.exe'+'"') 60 | a = os.popen(ffmpeg + ' -hide_banner -loglevel quiet -ss ' + str(FrameSecond) + ' -i "' + str( 61 | VideoFile) + '" -t 1 "' + str(OutputFile) + '"') 62 | else: 63 | ffmpeg = os.path.dirname(__file__) + '/FFMPEG/./ffmpeg' 64 | a = os.system( ffmpeg+' -hide_banner -loglevel quiet -ss '+str(FrameSecond)+' -i "'+str(VideoFile)+'" -t 1 "'+str(OutputFile)+'"') 65 | 66 | UL_pixel = (0.1*VideoWidth/2, 0.1*VideoHeight/2) 67 | MU_pixel = (VideoWidth/2, 0.1*VideoHeight/2) 68 | UR_pixel = (1.9*VideoWidth/2, 0.1*VideoHeight/2) 69 | MR_pixel = (1.9*VideoWidth/2, VideoHeight/2) 70 | LR_pixel = (1.9*VideoWidth/2, 1.9*VideoHeight/2 ) 71 | MD_pixel = (VideoWidth/2, 1.9*VideoHeight/2) 72 | LL_pixel = (0.1*VideoWidth/2, 1.9*VideoHeight/2) 73 | ML_pixel = (0.1*VideoWidth/2, VideoHeight/2) 74 | Center_pixel = (VideoWidth/2, VideoHeight/2) 75 | vrtFile = OutputFile.split('.')[0]+'_tmp.vrt' 76 | tifFile = OutputFile.split('.')[0]+'.tif' 77 | a = os.system('gdal_translate -quiet -a_srs EPSG:'+str(OutEPSG)+' -gcp '+str(UL_pixel[0])+' '+str(UL_pixel[1])+' '+str(PointList[0][0])+' '+str(PointList[0][1])+' '+str(PointList[0][2]) 78 | +' -gcp '+str(MU_pixel[0])+' '+str(MU_pixel[1])+' '+str(PointList[1][0])+' '+str(PointList[1][1])+' '+str(PointList[1][2]) 79 | +' -gcp '+str(UR_pixel[0])+' '+str(UR_pixel[1])+' '+str(PointList[2][0])+' '+str(PointList[2][1])+' '+str(PointList[2][2]) 80 | +' -gcp '+str(MR_pixel[0])+' '+str(MR_pixel[1])+' '+str(PointList[3][0])+' '+str(PointList[3][1])+' '+str(PointList[3][2]) 81 | +' -gcp '+str(LR_pixel[0])+' '+str(LR_pixel[1])+' '+str(PointList[4][0])+' '+str(PointList[4][1])+' '+str(PointList[4][2]) 82 | +' -gcp '+str(MD_pixel[0])+' '+str(MD_pixel[1])+' '+str(PointList[5][0])+' '+str(PointList[5][1])+' '+str(PointList[5][2]) 83 | +' -gcp '+str(LL_pixel[0])+' '+str(LL_pixel[1])+' '+str(PointList[6][0])+' '+str(PointList[6][1])+' '+str(PointList[6][2]) 84 | +' -gcp '+str(ML_pixel[0])+' '+str(ML_pixel[1])+' '+str(PointList[7][0])+' '+str(PointList[7][1])+' '+str(PointList[7][2]) 85 | +' -gcp '+str(Center_pixel[0])+' '+str(Center_pixel[1])+' '+str(PointList[8][0])+' '+str(PointList[8][1])+' '+str(PointList[8][2]) 86 | +' -of VRT '+str(OutputFile)+' '+str(vrtFile) ) 87 | 88 | 89 | a = os.system('gdalwarp -quiet -order 2 -dstalpha -overwrite -t_srs EPSG:'+str(OutEPSG)+' '+str(vrtFile)+' '+str(tifFile)) 90 | os.remove(vrtFile) 91 | os.remove(OutputFile) 92 | Dir = VideoFile.split('.')[0] + '_Mosaic/' 93 | a = os.system('gdalbuildvrt '+BoundingBoxString+' -overwrite -srcnodata "0 0 0 0" ' + Dir + str(VideoFile.split('.')[0].split('/')[-1])+'_Video_Mosaic.vrt ' + Dir + '*.tif') 94 | CreateMosaic(sys.argv[1],sys.argv[2],sys.argv[3],sys.argv[4],sys.argv[5],sys.argv[6],sys.argv[7],sys.argv[8],sys.argv[9]) 95 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/Makefile: -------------------------------------------------------------------------------- 1 | #/*************************************************************************** 2 | # VideoGis 3 | # 4 | # Replay a video in sync with a gps track displayed on the map 5 | # ------------------- 6 | # begin : 2017-02-13 7 | # git sha : $Format:%H$ 8 | # copyright : (C) 2017 by Salvatore Agosta 9 | # email : sagost@katamail.com 10 | # ***************************************************************************/ 11 | # 12 | #/*************************************************************************** 13 | # * * 14 | # * This program is free software; you can redistribute it and/or modify * 15 | # * it under the terms of the GNU General Public License as published by * 16 | # * the Free Software Foundation; either version 2 of the License, or * 17 | # * (at your option) any later version. * 18 | # * * 19 | # ***************************************************************************/ 20 | 21 | ################################################# 22 | # Edit the following to match your sources lists 23 | ################################################# 24 | 25 | 26 | #Add iso code for any locales you want to support here (space separated) 27 | # default is no locales 28 | # LOCALES = af 29 | LOCALES = 30 | 31 | # If locales are enabled, set the name of the lrelease binary on your system. If 32 | # you have trouble compiling the translations, you may have to specify the full path to 33 | # lrelease 34 | #LRELEASE = lrelease 35 | #LRELEASE = lrelease-qt4 36 | 37 | 38 | # translation 39 | SOURCES = \ 40 | __init__.py \ 41 | VideoGis.py VideoGis_dockwidget.py 42 | 43 | PLUGINNAME = VideoGis 44 | 45 | PY_FILES = \ 46 | __init__.py \ 47 | VideoGis.py VideoGis_dockwidget.py 48 | 49 | UI_FILES = VideoGis_dockwidget_base.ui 50 | 51 | EXTRAS = metadata.txt icon.png 52 | 53 | EXTRA_DIRS = 54 | 55 | COMPILED_RESOURCE_FILES = resources.py 56 | 57 | PEP8EXCLUDE=pydev,resources.py,conf.py,third_party,ui 58 | 59 | 60 | ################################################# 61 | # Normally you would not need to edit below here 62 | ################################################# 63 | 64 | HELP = help/build/html 65 | 66 | PLUGIN_UPLOAD = $(c)/plugin_upload.py 67 | 68 | RESOURCE_SRC=$(shell grep '^ *@@g;s/.*>//g' | tr '\n' ' ') 69 | 70 | QGISDIR=.qgis2 71 | 72 | default: compile 73 | 74 | compile: $(COMPILED_RESOURCE_FILES) 75 | 76 | %.py : %.qrc $(RESOURCES_SRC) 77 | pyrcc5 -o $*.py $< 78 | 79 | %.qm : %.ts 80 | $(LRELEASE) $< 81 | 82 | test: compile transcompile 83 | @echo 84 | @echo "----------------------" 85 | @echo "Regression Test Suite" 86 | @echo "----------------------" 87 | 88 | @# Preceding dash means that make will continue in case of errors 89 | @-export PYTHONPATH=`pwd`:$(PYTHONPATH); \ 90 | export QGIS_DEBUG=0; \ 91 | export QGIS_LOG_FILE=/dev/null; \ 92 | nosetests -v --with-id --with-coverage --cover-package=. \ 93 | 3>&1 1>&2 2>&3 3>&- || true 94 | @echo "----------------------" 95 | @echo "If you get a 'no module named qgis.core error, try sourcing" 96 | @echo "the helper script we have provided first then run make test." 97 | @echo "e.g. source run-env-linux.sh ; make test" 98 | @echo "----------------------" 99 | 100 | deploy: compile doc transcompile 101 | @echo 102 | @echo "------------------------------------------" 103 | @echo "Deploying plugin to your .qgis2 directory." 104 | @echo "------------------------------------------" 105 | # The deploy target only works on unix like operating system where 106 | # the Python plugin directory is located at: 107 | # $HOME/$(QGISDIR)/python/plugins 108 | mkdir -p $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) 109 | cp -vf $(PY_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) 110 | cp -vf $(UI_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) 111 | cp -vf $(COMPILED_RESOURCE_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) 112 | cp -vf $(EXTRAS) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) 113 | cp -vfr i18n $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) 114 | cp -vfr $(HELP) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)/help 115 | # Copy extra directories if any 116 | (foreach EXTRA_DIR,(EXTRA_DIRS), cp -R (EXTRA_DIR) (HOME)/(QGISDIR)/python/plugins/(PLUGINNAME)/;) 117 | 118 | 119 | # The dclean target removes compiled python files from plugin directory 120 | # also deletes any .git entry 121 | dclean: 122 | @echo 123 | @echo "-----------------------------------" 124 | @echo "Removing any compiled python files." 125 | @echo "-----------------------------------" 126 | find $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) -iname "*.pyc" -delete 127 | find $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) -iname ".git" -prune -exec rm -Rf {} \; 128 | 129 | 130 | derase: 131 | @echo 132 | @echo "-------------------------" 133 | @echo "Removing deployed plugin." 134 | @echo "-------------------------" 135 | rm -Rf $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) 136 | 137 | zip: deploy dclean 138 | @echo 139 | @echo "---------------------------" 140 | @echo "Creating plugin zip bundle." 141 | @echo "---------------------------" 142 | # The zip target deploys the plugin and creates a zip file with the deployed 143 | # content. You can then upload the zip file on http://plugins.qgis.org 144 | rm -f $(PLUGINNAME).zip 145 | cd $(HOME)/$(QGISDIR)/python/plugins; zip -9r $(CURDIR)/$(PLUGINNAME).zip $(PLUGINNAME) 146 | 147 | package: compile 148 | # Create a zip package of the plugin named $(PLUGINNAME).zip. 149 | # This requires use of git (your plugin development directory must be a 150 | # git repository). 151 | # To use, pass a valid commit or tag as follows: 152 | # make package VERSION=Version_0.3.2 153 | @echo 154 | @echo "------------------------------------" 155 | @echo "Exporting plugin to zip package. " 156 | @echo "------------------------------------" 157 | rm -f $(PLUGINNAME).zip 158 | git archive --prefix=$(PLUGINNAME)/ -o $(PLUGINNAME).zip $(VERSION) 159 | echo "Created package: $(PLUGINNAME).zip" 160 | 161 | upload: zip 162 | @echo 163 | @echo "-------------------------------------" 164 | @echo "Uploading plugin to QGIS Plugin repo." 165 | @echo "-------------------------------------" 166 | $(PLUGIN_UPLOAD) $(PLUGINNAME).zip 167 | 168 | transup: 169 | @echo 170 | @echo "------------------------------------------------" 171 | @echo "Updating translation files with any new strings." 172 | @echo "------------------------------------------------" 173 | @chmod +x scripts/update-strings.sh 174 | @scripts/update-strings.sh $(LOCALES) 175 | 176 | transcompile: 177 | @echo 178 | @echo "----------------------------------------" 179 | @echo "Compiled translation files to .qm files." 180 | @echo "----------------------------------------" 181 | @chmod +x scripts/compile-strings.sh 182 | @scripts/compile-strings.sh $(LRELEASE) $(LOCALES) 183 | 184 | transclean: 185 | @echo 186 | @echo "------------------------------------" 187 | @echo "Removing compiled translation files." 188 | @echo "------------------------------------" 189 | rm -f i18n/*.qm 190 | 191 | clean: 192 | @echo 193 | @echo "------------------------------------" 194 | @echo "Removing uic and rcc generated files" 195 | @echo "------------------------------------" 196 | rm $(COMPILED_UI_FILES) $(COMPILED_RESOURCE_FILES) 197 | 198 | doc: 199 | @echo 200 | @echo "------------------------------------" 201 | @echo "Building documentation using sphinx." 202 | @echo "------------------------------------" 203 | cd help; make html 204 | 205 | pylint: 206 | @echo 207 | @echo "-----------------" 208 | @echo "Pylint violations" 209 | @echo "-----------------" 210 | @pylint --reports=n --rcfile=pylintrc . || true 211 | @echo 212 | @echo "----------------------" 213 | @echo "If you get a 'no module named qgis.core' error, try sourcing" 214 | @echo "the helper script we have provided first then run make pylint." 215 | @echo "e.g. source run-env-linux.sh ; make pylint" 216 | @echo "----------------------" 217 | 218 | 219 | # Run pep8 style checking 220 | #http://pypi.python.org/pypi/pep8 221 | pep8: 222 | @echo 223 | @echo "-----------" 224 | @echo "PEP8 issues" 225 | @echo "-----------" 226 | @pep8 --repeat --ignore=E203,E121,E122,E123,E124,E125,E126,E127,E128 --exclude $(PEP8EXCLUDE) . || true 227 | @echo "-----------" 228 | @echo "Ignored in PEP8 check:" 229 | @echo $(PEP8EXCLUDE) 230 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/README.md: -------------------------------------------------------------------------------- 1 | # Video Uav Tracker 3D 2 | A Qgis > 2.99 plugin, synch and display on map a video with a gps track. Fill Geographic Database with information and snapshot. Extract video frame with associated UTM coordinates for rapid photogrammetry use . 3 | 4 | 5 | 6 | Video Uav Tracker v 2.1 (3D) 7 | 8 | Replay a video in sync with a gps track displayed on the map. 9 | 10 | repository: https://github.com/sagost/Video_UAV_Tracker-3D/ 11 | 12 | ---- 13 | copyright : (C) 2017 by Salvatore Agosta 14 | email : sagost@katamail.com 15 | 16 | 17 | This program is free software; you can redistribute it and/or modify 18 | it under the terms of the GNU General Public License as published by 19 | the Free Software Foundation; either version 2 of the License, or 20 | (at your option) any later version. 21 | 22 | ---- 23 | 24 | 25 | INSTRUCTION: 26 | 27 | ATTENTION: 3D IS NOT TESTED ON WINDOWS PLATFORM 28 | - Pixel value query need a .npz archive containing one array data for every frame, it must be named as 'VideoFile.npz' and be in the same folder of 'VideoFile.mp4' 29 | - for 3d options install numpy,panda3d and pypng python3 modules 30 | - Download all files from https://github.com/sagost/Video_UAV_Tracker-3D/Video_UAV_Tracker/FFMPEG and copy them in your Video_Uav_Tracker/FFMPEG folder 31 | 32 | 33 | Syncing: 34 | - Create new project 35 | - Select video and .gpx track (1 trkpt per second) 36 | - Create associated shapefile 37 | - Manage 3d options (select dem and image with same extension and cartographic projection) 38 | - Identify first couple Frame/GpsTime and select it. 39 | - Push Synchronize 40 | - Push Start 41 | 42 | Replay: 43 | - Move on map 44 | - Create associated DB shapefile 45 | - Add POI with associated video frame saved 46 | - Add POI directly from video sceen if 3D is active 47 | - Create direct georeferenced mosaic if 3D is active 48 | - Extract frames with associated coordinates for rapid photogrammetry use 49 | 50 | GPX FIELDS for 3D OPTION: 51 | 52 | - 'course' or 'yaw' for HEADING 53 | - 'pitch' for PITCH 54 | - 'roll' for ROLL 55 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/Setup3D.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ''' 3 | Video Uav Tracker v 2.1 (3D) 4 | 5 | Replay a video in sync with a gps track displayed on the map. 6 | 7 | 8 | ------------------- 9 | copyright : (C) 2017 by Salvatore Agosta 10 | email : sagost@katamail.com 11 | 12 | 13 | This program is free software; you can redistribute it and/or modify 14 | it under the terms of the GNU General Public License as published by 15 | the Free Software Foundation; either version 2 of the License, or 16 | (at your option) any later version. 17 | 18 | 19 | INSTRUCTION: 20 | 21 | ATTENTION: 3D IS NOT TESTED ON WINDOWS PLATFORM 22 | - Pixel value query need a .npz archive containing one array data for every frame, it must be named as 'VideoFile.npz' and be in the same folder of 'VideoFile.mp4' 23 | - for 3d options install numpy,panda3d and pypng python3 modules 24 | - Download all files from https://github.com/sagost/Video_UAV_Tracker-3D/Video_UAV_Tracker/FFMPEG and copy them in your Video_Uav_Tracker/FFMPEG folder 25 | 26 | Syncing: 27 | - Create new project 28 | - Select video and .gpx track (1 trkpt per second) 29 | - Create associated shapefile 30 | - Manage 3d options (select dem and image with same extension and cartographic projection) 31 | - Identify first couple Frame/GpsTime and select it. 32 | - Push Synchronize 33 | - Push Start 34 | 35 | Replay: 36 | - Move on map 37 | - Create associated DB shapefile 38 | - Add POI with associated video frame saved 39 | - Add POI directly from video sceen if 3D is active 40 | - Create direct georeferenced mosaic if 3D is active 41 | - Extract frames with associated coordinates for rapid photogrammetry use 42 | ''' 43 | 44 | 45 | from PyQt5.QtWidgets import QDialog 46 | from PyQt5 import uic 47 | import os 48 | 49 | FORM_CLASS, _ = uic.loadUiType(os.path.join( 50 | os.path.dirname(__file__), 'Setup3D.ui'), resource_suffix='') 51 | 52 | class Setup3D(QDialog, FORM_CLASS): 53 | def __init__(self,QgsProject, parent=None): 54 | super(Setup3D, self).__init__(parent) 55 | self.setupUi(self) 56 | self.buttonBox.accepted.connect(self.SaveParameter) 57 | self.Proj = QgsProject 58 | 59 | LayerRegistryItem = self.Proj.instance().mapLayers() 60 | for id, layer in LayerRegistryItem.items(): 61 | if layer.type() == 1: 62 | self.comboBox.addItem(layer.name(), id) 63 | self.comboBox_2.addItem(layer.name(), id) 64 | 65 | 66 | def SaveParameter(self): 67 | DEMName =self.comboBox.itemData(self.comboBox.currentIndex()) 68 | ImageName = self.comboBox_2.itemData(self.comboBox_2.currentIndex()) 69 | self.DEM = self.Proj.instance().mapLayer(DEMName).source() 70 | self.Image = self.Proj.instance().mapLayer(ImageName).source() 71 | self.HFilmSize = self.doubleSpinBox.value() 72 | self.VFilmSize = self.doubleSpinBox_2.value() 73 | self.FocalLenght = self.doubleSpinBox_3.value() 74 | if self.radioButton.isChecked() == True: 75 | self.GPXMODE = 1 # fixed offset 76 | self.HeadingOffset = self.doubleSpinBox_4.value() 77 | self.PitchOffset = self.doubleSpinBox_5.value() 78 | self.RollOffset = self.doubleSpinBox_6.value() 79 | else: 80 | self.GPXMODE = 2 # fromGPX 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/Setup3D.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Dialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 812 10 | 569 11 | 12 | 13 | 14 | 3D Setup 15 | 16 | 17 | 18 | 19 | 20 | Setup Camera 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | Set Horizontal and Vertical Film size in mm 29 | 30 | 31 | 32 | 33 | 34 | 35 | Qt::Horizontal 36 | 37 | 38 | 39 | 40 | 41 | 42 | 99999.990000000005239 43 | 44 | 45 | 46 | 47 | 48 | 49 | H 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 99999.990000000005239 61 | 62 | 63 | 64 | 65 | 66 | 67 | V 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | Set Focal Lenght in mm 83 | 84 | 85 | 86 | 87 | 88 | 89 | 9999.989999999999782 90 | 91 | 92 | 0.000000000000000 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | true 105 | 106 | 107 | Qt::Horizontal 108 | 109 | 110 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok 111 | 112 | 113 | 114 | 115 | 116 | 117 | Setup Euler Angles 118 | 119 | 120 | 121 | 122 | 123 | Qt::Horizontal 124 | 125 | 126 | 127 | Fixed 128 | 129 | 130 | true 131 | 132 | 133 | 134 | 135 | From GPX 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | Heading offset 146 | 147 | 148 | 149 | 150 | 151 | 152 | -180.000000000000000 153 | 154 | 155 | 180.000000000000000 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | Pitch offset 167 | 168 | 169 | 170 | 171 | 172 | 173 | -180.000000000000000 174 | 175 | 176 | 180.000000000000000 177 | 178 | 179 | -90.000000000000000 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | Roll offset 191 | 192 | 193 | 194 | 195 | 196 | 197 | -180.000000000000000 198 | 199 | 200 | 180.000000000000000 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | Setup 3D Scene 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | Select DEM image (in metric unit) 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | Select Overlay Image 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | buttonBox 252 | accepted() 253 | Dialog 254 | accept() 255 | 256 | 257 | 205 258 | 547 259 | 260 | 261 | 157 262 | 274 263 | 264 | 265 | 266 | 267 | buttonBox 268 | rejected() 269 | Dialog 270 | reject() 271 | 272 | 273 | 205 274 | 547 275 | 276 | 277 | 286 278 | 274 279 | 280 | 281 | 282 | 283 | radioButton_2 284 | toggled(bool) 285 | doubleSpinBox_4 286 | setDisabled(bool) 287 | 288 | 289 | 702 290 | 400 291 | 292 | 293 | 217 294 | 437 295 | 296 | 297 | 298 | 299 | radioButton 300 | toggled(bool) 301 | doubleSpinBox_4 302 | setEnabled(bool) 303 | 304 | 305 | 104 306 | 400 307 | 308 | 309 | 217 310 | 437 311 | 312 | 313 | 314 | 315 | radioButton_2 316 | toggled(bool) 317 | doubleSpinBox_5 318 | setDisabled(bool) 319 | 320 | 321 | 717 322 | 400 323 | 324 | 325 | 217 326 | 475 327 | 328 | 329 | 330 | 331 | radioButton 332 | toggled(bool) 333 | doubleSpinBox_5 334 | setEnabled(bool) 335 | 336 | 337 | 128 338 | 400 339 | 340 | 341 | 217 342 | 475 343 | 344 | 345 | 346 | 347 | radioButton_2 348 | toggled(bool) 349 | doubleSpinBox_6 350 | setDisabled(bool) 351 | 352 | 353 | 699 354 | 400 355 | 356 | 357 | 217 358 | 513 359 | 360 | 361 | 362 | 363 | radioButton 364 | toggled(bool) 365 | doubleSpinBox_6 366 | setEnabled(bool) 367 | 368 | 369 | 86 370 | 400 371 | 372 | 373 | 217 374 | 513 375 | 376 | 377 | 378 | 379 | 380 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/SkipTrackTool.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ''' 3 | Video Uav Tracker v 2.1 (3D) 4 | 5 | Replay a video in sync with a gps track displayed on the map. 6 | 7 | 8 | ------------------- 9 | copyright : (C) 2017 by Salvatore Agosta 10 | email : sagost@katamail.com 11 | 12 | 13 | This program is free software; you can redistribute it and/or modify 14 | it under the terms of the GNU General Public License as published by 15 | the Free Software Foundation; either version 2 of the License, or 16 | (at your option) any later version. 17 | 18 | 19 | INSTRUCTION: 20 | 21 | ATTENTION: 3D IS NOT TESTED ON WINDOWS PLATFORM 22 | - Pixel value query need a .npz archive containing one array data for every frame, it must be named as 'VideoFile.npz' and be in the same folder of 'VideoFile.mp4' 23 | - for 3d options install numpy,panda3d and pypng python3 modules 24 | - Download all files from https://github.com/sagost/Video_UAV_Tracker-3D/Video_UAV_Tracker/FFMPEG and copy them in your Video_Uav_Tracker/FFMPEG folder 25 | 26 | Syncing: 27 | - Create new project 28 | - Select video and .gpx track (1 trkpt per second) 29 | - Create associated shapefile 30 | - Manage 3d options (select dem and image with same extension and cartographic projection) 31 | - Identify first couple Frame/GpsTime and select it. 32 | - Push Synchronize 33 | - Push Start 34 | 35 | Replay: 36 | - Move on map 37 | - Create associated DB shapefile 38 | - Add POI with associated video frame saved 39 | - Add POI directly from video sceen if 3D is active 40 | - Create direct georeferenced mosaic if 3D is active 41 | - Extract frames with associated coordinates for rapid photogrammetry use 42 | ''' 43 | 44 | from qgis.gui import QgsMapTool 45 | from PyQt5.QtGui import QCursor 46 | from PyQt5.QtCore import Qt 47 | 48 | class SkipTrackTool(QgsMapTool): 49 | 50 | def __init__(self, canvas, layer,Parent): 51 | QgsMapTool.__init__(self,canvas) 52 | self.Parent = Parent 53 | self.canvas=canvas 54 | self.layer = layer 55 | self.geom = None 56 | self.rb = None 57 | self.x0 = None 58 | self.y0 = None 59 | #our own fancy cursor 60 | self.cursor = QCursor(Qt.CrossCursor) 61 | 62 | 63 | def canvasPressEvent(self,event): 64 | layer = self.layer 65 | x = event.pos().x() 66 | y = event.pos().y() 67 | point = self.toLayerCoordinates(layer,event.pos()) 68 | pointMap = self.toMapCoordinates(layer, point) 69 | self.x0 = point.x() 70 | self.y0 = point.y() 71 | self.Parent.findNearestPointInRecording(self.x0,self.y0) 72 | 73 | def canvasMoveEvent(self,event): 74 | pass 75 | 76 | def canvasReleaseEvent(self,event): 77 | pass 78 | 79 | def showSettingsWarning(self): 80 | pass 81 | 82 | def activate(self): 83 | self.canvas.setCursor(self.cursor) 84 | 85 | def deactivate(self): 86 | pass 87 | 88 | def isZoomTool(self): 89 | return False 90 | 91 | def isTransient(self): 92 | return False 93 | 94 | def isEditTool(self): 95 | return True 96 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/VideoGis.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ''' 3 | Video Uav Tracker v 2.1 (3D) 4 | 5 | Replay a video in sync with a gps track displayed on the map. 6 | 7 | 8 | ------------------- 9 | copyright : (C) 2017 by Salvatore Agosta 10 | email : sagost@katamail.com 11 | 12 | 13 | This program is free software; you can redistribute it and/or modify 14 | it under the terms of the GNU General Public License as published by 15 | the Free Software Foundation; either version 2 of the License, or 16 | (at your option) any later version. 17 | 18 | 19 | INSTRUCTION: 20 | 21 | ATTENTION: 3D IS NOT TESTED ON WINDOWS PLATFORM 22 | - Pixel value query need a .npz archive containing one array data for every frame, it must be named as 'VideoFile.npz' and be in the same folder of 'VideoFile.mp4' 23 | - for 3d options install numpy,panda3d and pypng python3 modules 24 | - Download all files from https://github.com/sagost/Video_UAV_Tracker-3D/Video_UAV_Tracker/FFMPEG and copy them in your Video_Uav_Tracker/FFMPEG folder 25 | 26 | Syncing: 27 | - Create new project 28 | - Select video and .gpx track (1 trkpt per second) 29 | - Create associated shapefile 30 | - Manage 3d options (select dem and image with same extension and cartographic projection) 31 | - Identify first couple Frame/GpsTime and select it. 32 | - Push Synchronize 33 | - Push Start 34 | 35 | Replay: 36 | - Move on map 37 | - Create associated DB shapefile 38 | - Add POI with associated video frame saved 39 | - Add POI directly from video sceen if 3D is active 40 | - Create direct georeferenced mosaic if 3D is active 41 | - Extract frames with associated coordinates for rapid photogrammetry use 42 | ''' 43 | 44 | import os 45 | import sys 46 | from PyQt5.QtCore import QSettings, QTranslator, qVersion, QCoreApplication, Qt 47 | from PyQt5.QtWidgets import QAction 48 | from PyQt5.QtGui import QIcon 49 | 50 | sys.path.append(os.path.dirname(__file__)) 51 | # Initialize Qt resources from file resources.py 52 | import resources 53 | 54 | # Import the code for the DockWidget 55 | from VideoGis_dockwidget import VideoGisDockWidget 56 | 57 | 58 | 59 | class VideoGis: 60 | """QGIS Plugin Implementation.""" 61 | 62 | def __init__(self, iface): 63 | """Constructor. 64 | 65 | :param iface: An interface instance that will be passed to this class 66 | which provides the hook by which you can manipulate the QGIS 67 | application at run time. 68 | :type iface: QgsInterface 69 | """ 70 | # Save reference to the QGIS interface 71 | self.iface = iface 72 | 73 | # initialize plugin directory 74 | self.plugin_dir = os.path.dirname(__file__) 75 | 76 | # initialize locale 77 | locale = QSettings().value('locale/userLocale')[0:2] 78 | locale_path = os.path.join( 79 | self.plugin_dir, 80 | 'i18n', 81 | 'VideoGis_{}.qm'.format(locale)) 82 | 83 | if os.path.exists(locale_path): 84 | self.translator = QTranslator() 85 | self.translator.load(locale_path) 86 | 87 | if qVersion() > '4.3.3': 88 | QCoreApplication.installTranslator(self.translator) 89 | 90 | # Declare instance attributes 91 | self.actions = [] 92 | self.menu = self.tr(u'&Video_UAV_Tracker') 93 | # TODO: We are going to let the user set this up in a future iteration 94 | self.toolbar = self.iface.addToolBar(u'Video_UAV_Tracker') 95 | self.toolbar.setObjectName(u'Video_UAV_Tracker') 96 | 97 | #print "** INITIALIZING VideoGis" 98 | 99 | self.pluginIsActive = False 100 | self.dockwidget = None 101 | 102 | 103 | # noinspection PyMethodMayBeStatic 104 | def tr(self, message): 105 | """Get the translation for a string using Qt translation API. 106 | 107 | We implement this ourselves since we do not inherit QObject. 108 | 109 | :param message: String for translation. 110 | :type message: str, QString 111 | 112 | :returns: Translated version of message. 113 | :rtype: QString 114 | """ 115 | # noinspection PyTypeChecker,PyArgumentList,PyCallByClass 116 | return QCoreApplication.translate('Video_UAV_Tracker', message) 117 | 118 | 119 | def add_action( 120 | self, 121 | icon_path, 122 | text, 123 | callback, 124 | enabled_flag=True, 125 | add_to_menu=True, 126 | add_to_toolbar=True, 127 | status_tip=None, 128 | whats_this=None, 129 | parent=None): 130 | """Add a toolbar icon to the toolbar. 131 | 132 | :param icon_path: Path to the icon for this action. Can be a resource 133 | path (e.g. ':/plugins/foo/bar.png') or a normal file system path. 134 | :type icon_path: str 135 | 136 | :param text: Text that should be shown in menu items for this action. 137 | :type text: str 138 | 139 | :param callback: Function to be called when the action is triggered. 140 | :type callback: function 141 | 142 | :param enabled_flag: A flag indicating if the action should be enabled 143 | by default. Defaults to True. 144 | :type enabled_flag: bool 145 | 146 | :param add_to_menu: Flag indicating whether the action should also 147 | be added to the menu. Defaults to True. 148 | :type add_to_menu: bool 149 | 150 | :param add_to_toolbar: Flag indicating whether the action should also 151 | be added to the toolbar. Defaults to True. 152 | :type add_to_toolbar: bool 153 | 154 | :param status_tip: Optional text to show in a popup when mouse pointer 155 | hovers over the action. 156 | :type status_tip: str 157 | 158 | :param parent: Parent widget for the new action. Defaults None. 159 | :type parent: QWidget 160 | 161 | :param whats_this: Optional text to show in the status bar when the 162 | mouse pointer hovers over the action. 163 | 164 | :returns: The action that was created. Note that the action is also 165 | added to self.actions list. 166 | :rtype: QAction 167 | """ 168 | 169 | icon = QIcon(icon_path) 170 | action = QAction(icon, text, parent) 171 | action.triggered.connect(callback) 172 | action.setEnabled(enabled_flag) 173 | 174 | if status_tip is not None: 175 | action.setStatusTip(status_tip) 176 | 177 | if whats_this is not None: 178 | action.setWhatsThis(whats_this) 179 | 180 | if add_to_toolbar: 181 | self.toolbar.addAction(action) 182 | 183 | if add_to_menu: 184 | self.iface.addPluginToMenu( 185 | self.menu, 186 | action) 187 | 188 | self.actions.append(action) 189 | 190 | return action 191 | 192 | 193 | def initGui(self): 194 | """Create the menu entries and toolbar icons inside the QGIS GUI.""" 195 | 196 | icon_path = ':/plugins/VideoGis/icon.png' 197 | self.add_action( 198 | icon_path, 199 | text=self.tr(u'Replay a video in sync with a gps track displayed on the map'), 200 | callback=self.run, 201 | parent=self.iface.mainWindow()) 202 | 203 | #-------------------------------------------------------------------------- 204 | 205 | def onClosePlugin(self): 206 | """Cleanup necessary items here when plugin dockwidget is closed""" 207 | 208 | #print "** CLOSING VideoGis" 209 | 210 | # disconnects 211 | self.dockwidget.closingPlugin.disconnect(self.onClosePlugin) 212 | 213 | # remove this statement if dockwidget is to remain 214 | # for reuse if plugin is reopened 215 | # Commented next statement since it causes QGIS crashe 216 | # when closing the docked window: 217 | # self.dockwidget = None 218 | 219 | self.pluginIsActive = False 220 | 221 | 222 | def unload(self): 223 | """Removes the plugin menu item and icon from QGIS GUI.""" 224 | 225 | #print "** UNLOAD VideoGis" 226 | 227 | for action in self.actions: 228 | self.iface.removePluginMenu( 229 | self.tr(u'&VideoGis'), 230 | action) 231 | self.iface.removeToolBarIcon(action) 232 | # remove the toolbar 233 | del self.toolbar 234 | 235 | #-------------------------------------------------------------------------- 236 | 237 | def run(self): 238 | """Run method that loads and starts the plugin""" 239 | 240 | if not self.pluginIsActive: 241 | self.pluginIsActive = True 242 | 243 | #print "** STARTING VideoGis" 244 | 245 | # dockwidget may not exist if: 246 | # first run of plugin 247 | # removed on close (see self.onClosePlugin method) 248 | if self.dockwidget == None: 249 | # Create the dockwidget (after translation) and keep reference 250 | self.dockwidget = VideoGisDockWidget(self.iface) 251 | 252 | # connect to provide cleanup on closing of dockwidget 253 | self.dockwidget.closingPlugin.connect(self.onClosePlugin) 254 | 255 | # show the dockwidget 256 | # TODO: fix to allow choice of dock location 257 | self.iface.addDockWidget(Qt.LeftDockWidgetArea, self.dockwidget) 258 | self.dockwidget.show() 259 | 260 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/VideoGis_dockwidget.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ''' 3 | Video Uav Tracker 3D v 2.1 4 | 5 | Replay a video in sync with a gps track displayed on the map. 6 | 7 | 8 | ------------------- 9 | copyright : (C) 2017 by Salvatore Agosta 10 | email : sagost@katamail.com 11 | 12 | 13 | This program is free software; you can redistribute it and/or modify 14 | it under the terms of the GNU General Public License as published by 15 | the Free Software Foundation; either version 2 of the License, or 16 | (at your option) any later version. 17 | 18 | 19 | INSTRUCTION: 20 | 21 | ATTENTION: 3D IS NOT TESTED ON WINDOWS PLATFORM 22 | - Pixel value query need a .npz archive containing one array data for every frame, it must be named as 'VideoFile.npz' and be in the same folder of 'VideoFile.mp4' 23 | - for 3d options install numpy,panda3d and pypng python3 modules 24 | - Download all files from https://github.com/sagost/Video_UAV_Tracker-3D/Video_UAV_Tracker/FFMPEG and copy them in your Video_Uav_Tracker/FFMPEG folder 25 | 26 | Syncing: 27 | - Create new project 28 | - Select video and .gpx track (1 trkpt per second) 29 | - Identify first couple Frame/GpsTime and select it. 30 | - Push Synchronize 31 | - Push Start 32 | 33 | Replay: 34 | - Move on map 35 | - Create associated DB shapefile 36 | - Add POI with associated video frame saved 37 | - Extract frames with associated coordinates for rapid photogrammetry use 38 | ''' 39 | 40 | import os 41 | import sys 42 | from PyQt5 import QtGui, uic , QtWidgets 43 | from PyQt5.QtCore import pyqtSignal 44 | from PyQt5.QtWidgets import QFileDialog 45 | from NewProject import NewProject 46 | from QGisMap import QGisMap 47 | import resources 48 | 49 | FORM_CLASS, _ = uic.loadUiType(os.path.join( 50 | os.path.dirname(__file__), 'VideoGis_dockwidget_base.ui'), resource_suffix='') 51 | 52 | 53 | class VideoGisDockWidget(QtWidgets.QDockWidget, FORM_CLASS): 54 | 55 | closingPlugin = pyqtSignal() 56 | 57 | def __init__(self,iface, parent=None): 58 | """Constructor.""" 59 | super(VideoGisDockWidget, self).__init__(parent) 60 | # Set up the user interface from Designer. 61 | # After setupUI you can access any designer object by doing 62 | # self., and you can use autoconnect slots - see 63 | # http://qt-project.org/doc/qt-4.8/designer-using-a-ui-file.html 64 | # #widgets-and-dialogs-with-auto-connect 65 | self.setupUi(self) 66 | self.iface = iface 67 | self.pushButton_2.setEnabled(False) 68 | self.lineEdit_2.setEnabled(False) 69 | self.pushButton_8.clicked.connect(self.close) 70 | self.pushButton_7.clicked.connect(self.NewProj) 71 | self.pushButton_5.clicked.connect(self.LoadProj) 72 | self.pushButton_2.clicked.connect(self.Start) 73 | 74 | self.QGisMapWindow = None 75 | self.NewProjectWindow = None 76 | self.groupBox.hide() 77 | 78 | def closeEvent(self, event): 79 | if self.QGisMapWindow != None: 80 | self.QGisMapWindow.close() 81 | if self.NewProjectWindow != None: 82 | self.NewProjectWindow.close() 83 | self.closingPlugin.emit() 84 | event.accept() 85 | 86 | def NewProj(self): 87 | self.projectfile = None 88 | self.pushButton_2.setEnabled(False) 89 | self.lineEdit_2.clear() 90 | projectfile, _ = QFileDialog.getSaveFileName(caption = 'Save project file', filter = "VUT Project (*.vut)") 91 | if projectfile: 92 | self.NewProjectWindow = NewProject(projectfile,self) 93 | #self.NewProjectWindow.setWindowModality(2) 94 | self.NewProjectWindow.show() 95 | 96 | 97 | 98 | def LoadProjFromNew(self,VutPrj): 99 | self.NewProjectWindow = None 100 | self.lineEdit_2.setText(VutPrj) 101 | self.projectfile = VutPrj 102 | self.pushButton_2.setEnabled(True) 103 | 104 | 105 | def LoadProj(self): 106 | 107 | 108 | self.pushButton_2.setEnabled(False) 109 | self.lineEdit_2.clear() 110 | self.projectfile, _ = QFileDialog.getOpenFileName(caption = "Select project file",filter = "VUT Project (*.vut)") 111 | if self.projectfile != '': 112 | with open(self.projectfile,'r') as File: 113 | for line in File: 114 | if line[0:23] == 'Video start at msecond:': 115 | self.lineEdit_2.setText(self.projectfile) 116 | self.pushButton_2.setEnabled(True) 117 | break 118 | 119 | 120 | def Start(self): 121 | 122 | 123 | self.QGisMapWindow = QGisMap(self.projectfile,self) 124 | #self.QGisMapWindow.setWindowModality(2) 125 | self.QGisMapWindow.show() 126 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/VideoGis_dockwidget_base.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | VideoGisDockWidgetBase 4 | 5 | 6 | 7 | 0 8 | 0 9 | 719 10 | 376 11 | 12 | 13 | 14 | Video UAV Tracker 3D 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 16777215 23 | 104 24 | 25 | 26 | 27 | Project 28 | 29 | 30 | false 31 | 32 | 33 | 34 | 35 | 36 | Qt::Horizontal 37 | 38 | 39 | 40 | 41 | 0 42 | 28 43 | 44 | 45 | 46 | Load Project 47 | 48 | 49 | 50 | 51 | 52 | 0 53 | 28 54 | 55 | 56 | 57 | New Project 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | Qt::Horizontal 66 | 67 | 68 | 69 | 70 | 0 71 | 29 72 | 73 | 74 | 75 | Loaded Project 76 | 77 | 78 | 79 | 80 | true 81 | 82 | 83 | 84 | 0 85 | 29 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | Start 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | Quit 116 | 117 | 118 | 119 | 120 | 121 | 122 | Qt::Horizontal 123 | 124 | 125 | 126 | 40 127 | 20 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | Telemetry 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | GpsTime 148 | 149 | 150 | 151 | 152 | 153 | 154 | Course 155 | 156 | 157 | 158 | 159 | 160 | 161 | Ele 162 | 163 | 164 | 165 | 166 | 167 | 168 | Speed m/s 169 | 170 | 171 | 172 | 173 | 174 | 175 | Lat 176 | 177 | 178 | 179 | 180 | 181 | 182 | Lon 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ''' 3 | Video Uav Tracker 3D v 2.1 4 | 5 | Replay a video in sync with a gps track displayed on the map. 6 | 7 | 8 | ------------------- 9 | copyright : (C) 2017 by Salvatore Agosta 10 | email : sagost@katamail.com 11 | 12 | 13 | This program is free software; you can redistribute it and/or modify 14 | it under the terms of the GNU General Public License as published by 15 | the Free Software Foundation; either version 2 of the License, or 16 | (at your option) any later version. 17 | 18 | 19 | INSTRUCTION: 20 | 21 | - for 3d options install numpy and panda3d python3 modules 22 | - Download all files from https://github.com/sagost/Video_UAV_Tracker-3D/Video_UAV_Tracker/FFMPEG and copy them in your Video_Uav_Tracker/FFMPEG folder 23 | 24 | Syncing: 25 | - Create new project 26 | - Select video and .gpx track (1 trkpt per second) 27 | - Identify first couple Frame/GpsTime and select it. 28 | - Push Synchronize 29 | - Push Start 30 | 31 | Replay: 32 | - Move on map 33 | - Create associated DB shapefile 34 | - Add POI with associated video frame saved 35 | - Extract frames with associated coordinates for rapid photogrammetry use 36 | ''' 37 | 38 | # noinspection PyPep8Naming 39 | def classFactory(iface): # pylint: disable=invalid-name 40 | """Load VideoGis class from file VideoGis. 41 | 42 | :param iface: A QGIS interface instance. 43 | :type iface: QgsInterface 44 | """ 45 | # 46 | from .VideoGis import VideoGis 47 | return VideoGis(iface) 48 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/AddPoint.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/AddPoint.cpython-35.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/AddPoint.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/AddPoint.cpython-36.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/AddPoint.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/AddPoint.cpython-39.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/CanvasMarkers.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/CanvasMarkers.cpython-35.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/CanvasMarkers.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/CanvasMarkers.cpython-36.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/CanvasMarkers.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/CanvasMarkers.cpython-39.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/NewProject.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/NewProject.cpython-35.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/NewProject.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/NewProject.cpython-36.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/NewProject.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/NewProject.cpython-39.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/QGisMap.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/QGisMap.cpython-35.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/QGisMap.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/QGisMap.cpython-36.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/QGisMap.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/QGisMap.cpython-39.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/Setup3D.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/Setup3D.cpython-35.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/Setup3D.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/Setup3D.cpython-36.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/Setup3D.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/Setup3D.cpython-39.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/SkipTrackTool.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/SkipTrackTool.cpython-35.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/SkipTrackTool.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/SkipTrackTool.cpython-36.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/SkipTrackTool.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/SkipTrackTool.cpython-39.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/VideoGis.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/VideoGis.cpython-35.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/VideoGis.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/VideoGis.cpython-36.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/VideoGis.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/VideoGis.cpython-39.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/VideoGis_dockwidget.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/VideoGis_dockwidget.cpython-35.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/VideoGis_dockwidget.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/VideoGis_dockwidget.cpython-36.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/VideoGis_dockwidget.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/VideoGis_dockwidget.cpython-39.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/__init__.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/__init__.cpython-35.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/__init__.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/__init__.cpython-39.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/resources.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/resources.cpython-35.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/resources.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/resources.cpython-36.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/resources.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/resources.cpython-39.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/tableManagerUi.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/tableManagerUi.cpython-35.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/tableManagerUi.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/tableManagerUi.cpython-36.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/tableManagerUi.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/tableManagerUi.cpython-39.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/tableManagerUiClone.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/tableManagerUiClone.cpython-35.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/tableManagerUiClone.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/tableManagerUiClone.cpython-36.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/tableManagerUiClone.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/tableManagerUiClone.cpython-39.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/tableManagerUiInsert.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/tableManagerUiInsert.cpython-35.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/tableManagerUiInsert.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/tableManagerUiInsert.cpython-36.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/tableManagerUiInsert.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/tableManagerUiInsert.cpython-39.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/tableManagerUiRename.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/tableManagerUiRename.cpython-35.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/tableManagerUiRename.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/tableManagerUiRename.cpython-36.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/tableManagerUiRename.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/tableManagerUiRename.cpython-39.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/vut_newproject.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/vut_newproject.cpython-35.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/vut_newproject.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/vut_newproject.cpython-36.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/vut_newproject.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/vut_newproject.cpython-39.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/vut_qgismap.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/vut_qgismap.cpython-35.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/vut_qgismap.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/vut_qgismap.cpython-36.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/__pycache__/vut_qgismap.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/__pycache__/vut_qgismap.cpython-39.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/geographiclib/__init__.py: -------------------------------------------------------------------------------- 1 | """geographiclib: geodesic routines from GeographicLib""" 2 | 3 | __version_info__ = (1, 47, 0) 4 | """GeographicLib version as a tuple""" 5 | 6 | __version__ = "1.47" 7 | """GeographicLib version as a string""" 8 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/geographiclib/__pycache__/__init__.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/geographiclib/__pycache__/__init__.cpython-35.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/geographiclib/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/geographiclib/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/geographiclib/__pycache__/__init__.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/geographiclib/__pycache__/__init__.cpython-39.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/geographiclib/__pycache__/constants.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/geographiclib/__pycache__/constants.cpython-35.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/geographiclib/__pycache__/constants.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/geographiclib/__pycache__/constants.cpython-36.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/geographiclib/__pycache__/constants.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/geographiclib/__pycache__/constants.cpython-39.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/geographiclib/__pycache__/geodesic.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/geographiclib/__pycache__/geodesic.cpython-35.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/geographiclib/__pycache__/geodesic.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/geographiclib/__pycache__/geodesic.cpython-36.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/geographiclib/__pycache__/geodesic.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/geographiclib/__pycache__/geodesic.cpython-39.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/geographiclib/__pycache__/geodesiccapability.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/geographiclib/__pycache__/geodesiccapability.cpython-35.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/geographiclib/__pycache__/geodesiccapability.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/geographiclib/__pycache__/geodesiccapability.cpython-36.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/geographiclib/__pycache__/geodesiccapability.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/geographiclib/__pycache__/geodesiccapability.cpython-39.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/geographiclib/__pycache__/geodesicline.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/geographiclib/__pycache__/geodesicline.cpython-35.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/geographiclib/__pycache__/geodesicline.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/geographiclib/__pycache__/geodesicline.cpython-36.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/geographiclib/__pycache__/geomath.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/geographiclib/__pycache__/geomath.cpython-35.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/geographiclib/__pycache__/geomath.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/geographiclib/__pycache__/geomath.cpython-36.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/geographiclib/__pycache__/geomath.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/geographiclib/__pycache__/geomath.cpython-39.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/geographiclib/accumulator.py: -------------------------------------------------------------------------------- 1 | """accumulator.py: transcription of GeographicLib::Accumulator class.""" 2 | # accumulator.py 3 | # 4 | # This is a rather literal translation of the GeographicLib::Accumulator class 5 | # from to python. See the documentation for the C++ class for more information 6 | # at 7 | # 8 | # http://geographiclib.sourceforge.net/html/annotated.html 9 | # 10 | # Copyright (c) Charles Karney (2011) and licensed under 11 | # the MIT/X11 License. For more information, see 12 | # http://geographiclib.sourceforge.net/ 13 | ###################################################################### 14 | 15 | from geographiclib.geomath import Math 16 | 17 | class Accumulator(object): 18 | """Like math.fsum, but allows a running sum""" 19 | 20 | def Set(self, y): 21 | """Set value from argument""" 22 | if type(self) == type(y): 23 | self._s, self._t = y._s, y._t 24 | else: 25 | self._s, self._t = float(y), 0.0 26 | 27 | def __init__(self, y = 0.0): 28 | """Constructor""" 29 | self.Set(y) 30 | 31 | def Add(self, y): 32 | """Add a value""" 33 | # Here's Shewchuk's solution... 34 | # hold exact sum as [s, t, u] 35 | y, u = Math.sum(y, self._t) # Accumulate starting at 36 | self._s, self._t = Math.sum(y, self._s) # least significant end 37 | # Start is _s, _t decreasing and non-adjacent. Sum is now (s + t + u) 38 | # exactly with s, t, u non-adjacent and in decreasing order (except 39 | # for possible zeros). The following code tries to normalize the 40 | # result. Ideally, we want _s = round(s+t+u) and _u = round(s+t+u - 41 | # _s). The follow does an approximate job (and maintains the 42 | # decreasing non-adjacent property). Here are two "failures" using 43 | # 3-bit floats: 44 | # 45 | # Case 1: _s is not equal to round(s+t+u) -- off by 1 ulp 46 | # [12, -1] - 8 -> [4, 0, -1] -> [4, -1] = 3 should be [3, 0] = 3 47 | # 48 | # Case 2: _s+_t is not as close to s+t+u as it shold be 49 | # [64, 5] + 4 -> [64, 8, 1] -> [64, 8] = 72 (off by 1) 50 | # should be [80, -7] = 73 (exact) 51 | # 52 | # "Fixing" these problems is probably not worth the expense. The 53 | # representation inevitably leads to small errors in the accumulated 54 | # values. The additional errors illustrated here amount to 1 ulp of 55 | # the less significant word during each addition to the Accumulator 56 | # and an additional possible error of 1 ulp in the reported sum. 57 | # 58 | # Incidentally, the "ideal" representation described above is not 59 | # canonical, because _s = round(_s + _t) may not be true. For 60 | # example, with 3-bit floats: 61 | # 62 | # [128, 16] + 1 -> [160, -16] -- 160 = round(145). 63 | # But [160, 0] - 16 -> [128, 16] -- 128 = round(144). 64 | # 65 | if self._s == 0: # This implies t == 0, 66 | self._s = u # so result is u 67 | else: 68 | self._t += u # otherwise just accumulate u to t. 69 | 70 | def Sum(self, y = 0.0): 71 | """Return sum + y""" 72 | if y == 0.0: 73 | return self._s 74 | else: 75 | b = Accumulator(self) 76 | b.Add(y) 77 | return b._s 78 | 79 | def Negate(self): 80 | """Negate sum""" 81 | self._s *= -1 82 | self._t *= -1 83 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/geographiclib/constants.py: -------------------------------------------------------------------------------- 1 | """Define the WGS84 ellipsoid""" 2 | # constants.py 3 | # 4 | # This is a translation of the GeographicLib::Constants class to python. See 5 | # the documentation for the C++ class for more information at 6 | # 7 | # http://geographiclib.sourceforge.net/html/annotated.html 8 | # 9 | # Copyright (c) Charles Karney (2011-2016) and 10 | # licensed under the MIT/X11 License. For more information, see 11 | # http://geographiclib.sourceforge.net/ 12 | ###################################################################### 13 | 14 | class Constants(object): 15 | """ 16 | Constants describing the WGS84 ellipsoid 17 | """ 18 | 19 | WGS84_a = 6378137.0 # meters 20 | """the equatorial radius in meters of the WGS84 ellipsoid in meters""" 21 | WGS84_f = 1/298.257223563 22 | """the flattening of the WGS84 ellipsoid, 1/298.257223563""" 23 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/geographiclib/geodesiccapability.py: -------------------------------------------------------------------------------- 1 | """geodesiccapability.py: capability constants for geodesic{,line}.py""" 2 | # geodesiccapability.py 3 | # 4 | # This gathers the capability constants need by geodesic.py and 5 | # geodesicline.py. See the documentation for the GeographicLib::Geodesic class 6 | # for more information at 7 | # 8 | # http://geographiclib.sourceforge.net/html/annotated.html 9 | # 10 | # Copyright (c) Charles Karney (2011-2014) and licensed 11 | # under the MIT/X11 License. For more information, see 12 | # http://geographiclib.sourceforge.net/ 13 | ###################################################################### 14 | 15 | class GeodesicCapability(object): 16 | """ 17 | Capability constants shared between Geodesic and GeodesicLine. 18 | """ 19 | 20 | CAP_NONE = 0 21 | CAP_C1 = 1 << 0 22 | CAP_C1p = 1 << 1 23 | CAP_C2 = 1 << 2 24 | CAP_C3 = 1 << 3 25 | CAP_C4 = 1 << 4 26 | CAP_ALL = 0x1F 27 | CAP_MASK = CAP_ALL 28 | OUT_ALL = 0x7F80 29 | OUT_MASK = 0xFF80 # Includes LONG_UNROLL 30 | EMPTY = 0 31 | LATITUDE = 1 << 7 | CAP_NONE 32 | LONGITUDE = 1 << 8 | CAP_C3 33 | AZIMUTH = 1 << 9 | CAP_NONE 34 | DISTANCE = 1 << 10 | CAP_C1 35 | STANDARD = LATITUDE | LONGITUDE | AZIMUTH | DISTANCE 36 | DISTANCE_IN = 1 << 11 | CAP_C1 | CAP_C1p 37 | REDUCEDLENGTH = 1 << 12 | CAP_C1 | CAP_C2 38 | GEODESICSCALE = 1 << 13 | CAP_C1 | CAP_C2 39 | AREA = 1 << 14 | CAP_C4 40 | LONG_UNROLL = 1 << 15 41 | ALL = OUT_ALL | CAP_ALL # Does not include LONG_UNROLL 42 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/geographiclib/geographiclib_LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT); this license applies to GeographicLib, 2 | versions 1.12 and later. 3 | 4 | Copyright (c) 2008-2016, Charles Karney 5 | 6 | Permission is hereby granted, free of charge, to any person 7 | obtaining a copy of this software and associated documentation 8 | files (the "Software"), to deal in the Software without 9 | restriction, including without limitation the rights to use, copy, 10 | modify, merge, publish, distribute, sublicense, and/or sell copies 11 | of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | DEALINGS IN THE SOFTWARE. 25 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/geographiclib/geomath.py: -------------------------------------------------------------------------------- 1 | """geomath.py: transcription of GeographicLib::Math class.""" 2 | # geomath.py 3 | # 4 | # This is a rather literal translation of the GeographicLib::Math class to 5 | # python. See the documentation for the C++ class for more information at 6 | # 7 | # http://geographiclib.sourceforge.net/html/annotated.html 8 | # 9 | # Copyright (c) Charles Karney (2011-2016) and 10 | # licensed under the MIT/X11 License. For more information, see 11 | # http://geographiclib.sourceforge.net/ 12 | ###################################################################### 13 | 14 | import sys 15 | import math 16 | 17 | class Math(object): 18 | """ 19 | Additional math routines for GeographicLib. 20 | 21 | This defines constants: 22 | epsilon, difference between 1 and the next bigger number 23 | digits, the number of digits in the fraction of a real number 24 | minval, minimum normalized positive number 25 | maxval, maximum finite number 26 | nan, not a number 27 | inf, infinity 28 | """ 29 | 30 | digits = 53 31 | epsilon = math.pow(2.0, 1-digits) 32 | minval = math.pow(2.0, -1022) 33 | maxval = math.pow(2.0, 1023) * (2 - epsilon) 34 | inf = float("inf") if sys.version_info > (2, 6) else 2 * maxval 35 | nan = float("nan") if sys.version_info > (2, 6) else inf - inf 36 | 37 | def sq(x): 38 | """Square a number""" 39 | 40 | return x * x 41 | sq = staticmethod(sq) 42 | 43 | def cbrt(x): 44 | """Real cube root of a number""" 45 | 46 | y = math.pow(abs(x), 1/3.0) 47 | return y if x >= 0 else -y 48 | cbrt = staticmethod(cbrt) 49 | 50 | def log1p(x): 51 | """log(1 + x) accurate for small x (missing from python 2.5.2)""" 52 | 53 | if sys.version_info > (2, 6): 54 | return math.log1p(x) 55 | 56 | y = 1 + x 57 | z = y - 1 58 | # Here's the explanation for this magic: y = 1 + z, exactly, and z 59 | # approx x, thus log(y)/z (which is nearly constant near z = 0) returns 60 | # a good approximation to the true log(1 + x)/x. The multiplication x * 61 | # (log(y)/z) introduces little additional error. 62 | return x if z == 0 else x * math.log(y) / z 63 | log1p = staticmethod(log1p) 64 | 65 | def atanh(x): 66 | """atanh(x) (missing from python 2.5.2)""" 67 | 68 | if sys.version_info > (2, 6): 69 | return math.atanh(x) 70 | 71 | y = abs(x) # Enforce odd parity 72 | y = Math.log1p(2 * y/(1 - y))/2 73 | return -y if x < 0 else y 74 | atanh = staticmethod(atanh) 75 | 76 | def copysign(x, y): 77 | """return x with the sign of y (missing from python 2.5.2)""" 78 | 79 | if sys.version_info > (2, 6): 80 | return math.copysign(x, y) 81 | 82 | return math.fabs(x) * (-1 if y < 0 or (y == 0 and 1/y < 0) else 1) 83 | copysign = staticmethod(copysign) 84 | 85 | def norm(x, y): 86 | """Private: Normalize a two-vector.""" 87 | r = math.hypot(x, y) 88 | return x/r, y/r 89 | norm = staticmethod(norm) 90 | 91 | def sum(u, v): 92 | """Error free transformation of a sum.""" 93 | # Error free transformation of a sum. Note that t can be the same as one 94 | # of the first two arguments. 95 | s = u + v 96 | up = s - v 97 | vpp = s - up 98 | up -= u 99 | vpp -= v 100 | t = -(up + vpp) 101 | # u + v = s + t 102 | # = round(u + v) + t 103 | return s, t 104 | sum = staticmethod(sum) 105 | 106 | def polyval(N, p, s, x): 107 | """Evaluate a polynomial.""" 108 | y = float(0 if N < 0 else p[s]) # make sure the returned value is a float 109 | while N > 0: 110 | N -= 1; s += 1 111 | y = y * x + p[s] 112 | return y 113 | polyval = staticmethod(polyval) 114 | 115 | def AngRound(x): 116 | """Private: Round an angle so that small values underflow to zero.""" 117 | # The makes the smallest gap in x = 1/16 - nextafter(1/16, 0) = 1/2^57 118 | # for reals = 0.7 pm on the earth if x is an angle in degrees. (This 119 | # is about 1000 times more resolution than we get with angles around 90 120 | # degrees.) We use this to avoid having to deal with near singular 121 | # cases when x is non-zero but tiny (e.g., 1.0e-200). 122 | z = 1/16.0 123 | y = abs(x) 124 | # The compiler mustn't "simplify" z - (z - y) to y 125 | if y < z: y = z - (z - y) 126 | return 0.0 if x == 0 else (-y if x < 0 else y) 127 | AngRound = staticmethod(AngRound) 128 | 129 | def AngNormalize(x): 130 | """reduce angle to [-180,180)""" 131 | 132 | x = math.fmod(x, 360) 133 | return (x + 360 if x < -180 else 134 | (x if x < 180 else x - 360)) 135 | AngNormalize = staticmethod(AngNormalize) 136 | 137 | def LatFix(x): 138 | """replace angles outside [-90,90] by NaN""" 139 | 140 | return Math.nan if abs(x) > 90 else x 141 | LatFix = staticmethod(LatFix) 142 | 143 | def AngDiff(x, y): 144 | """compute y - x and reduce to [-180,180] accurately""" 145 | 146 | d, t = Math.sum(Math.AngNormalize(x), Math.AngNormalize(-y)) 147 | d = - Math.AngNormalize(d) 148 | return Math.sum(-180 if d == 180 and t < 0 else d, -t) 149 | AngDiff = staticmethod(AngDiff) 150 | 151 | def sincosd(x): 152 | """Compute sine and cosine of x in degrees.""" 153 | 154 | r = math.fmod(x, 360) 155 | q = Math.nan if Math.isnan(r) else int(math.floor(r / 90 + 0.5)) 156 | r -= 90 * q; r = math.radians(r) 157 | s = math.sin(r); c = math.cos(r) 158 | q = q % 4 159 | if q == 1: 160 | s, c = c, 0.0-s 161 | elif q == 2: 162 | s, c = 0.0-s, 0.0-c 163 | elif q == 3: 164 | s, c = 0.0-c, s 165 | return s, c 166 | sincosd = staticmethod(sincosd) 167 | 168 | def atan2d(y, x): 169 | """compute atan2(y, x) with the result in degrees""" 170 | 171 | if abs(y) > abs(x): 172 | q = 2; x, y = y, x 173 | else: 174 | q = 0 175 | if x < 0: 176 | q += 1; x = -x 177 | ang = math.degrees(math.atan2(y, x)) 178 | if q == 1: 179 | ang = (180 if y > 0 else -180) - ang 180 | elif q == 2: 181 | ang = 90 - ang 182 | elif q == 3: 183 | ang = -90 + ang 184 | return ang 185 | atan2d = staticmethod(atan2d) 186 | 187 | def isfinite(x): 188 | """Test for finiteness""" 189 | 190 | return abs(x) <= Math.maxval 191 | isfinite = staticmethod(isfinite) 192 | 193 | def isnan(x): 194 | """Test if nan""" 195 | 196 | return math.isnan(x) if sys.version_info > (2, 6) else x != x 197 | isnan = staticmethod(isnan) 198 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/geographiclib/test/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | 3 | test_geodesic: test the geodesic routines from GeographicLib 4 | 5 | Run these tests with one of 6 | 7 | python2 -m unittest -v geographiclib.test.test_geodesic 8 | python3 -m unittest -v geographiclib.test.test_geodesic 9 | 10 | executed in this directory's parent directory. 11 | 12 | """ 13 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/help/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | PAPER = 8 | BUILDDIR = build 9 | 10 | # Internal variables. 11 | PAPEROPT_a4 = -D latex_paper_size=a4 12 | PAPEROPT_letter = -D latex_paper_size=letter 13 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source 14 | 15 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest 16 | 17 | help: 18 | @echo "Please use \`make ' where is one of" 19 | @echo " html to make standalone HTML files" 20 | @echo " dirhtml to make HTML files named index.html in directories" 21 | @echo " singlehtml to make a single large HTML file" 22 | @echo " pickle to make pickle files" 23 | @echo " json to make JSON files" 24 | @echo " htmlhelp to make HTML files and a HTML help project" 25 | @echo " qthelp to make HTML files and a qthelp project" 26 | @echo " devhelp to make HTML files and a Devhelp project" 27 | @echo " epub to make an epub" 28 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 29 | @echo " latexpdf to make LaTeX files and run them through pdflatex" 30 | @echo " text to make text files" 31 | @echo " man to make manual pages" 32 | @echo " changes to make an overview of all changed/added/deprecated items" 33 | @echo " linkcheck to check all external links for integrity" 34 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" 35 | 36 | clean: 37 | -rm -rf $(BUILDDIR)/* 38 | 39 | html: 40 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 41 | @echo 42 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 43 | 44 | dirhtml: 45 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 46 | @echo 47 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 48 | 49 | singlehtml: 50 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 51 | @echo 52 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 53 | 54 | pickle: 55 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 56 | @echo 57 | @echo "Build finished; now you can process the pickle files." 58 | 59 | json: 60 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 61 | @echo 62 | @echo "Build finished; now you can process the JSON files." 63 | 64 | htmlhelp: 65 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 66 | @echo 67 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 68 | ".hhp project file in $(BUILDDIR)/htmlhelp." 69 | 70 | qthelp: 71 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 72 | @echo 73 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 74 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 75 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/template_class.qhcp" 76 | @echo "To view the help file:" 77 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/template_class.qhc" 78 | 79 | devhelp: 80 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 81 | @echo 82 | @echo "Build finished." 83 | @echo "To view the help file:" 84 | @echo "# mkdir -p $$HOME/.local/share/devhelp/template_class" 85 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/template_class" 86 | @echo "# devhelp" 87 | 88 | epub: 89 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 90 | @echo 91 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 92 | 93 | latex: 94 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 95 | @echo 96 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 97 | @echo "Run \`make' in that directory to run these through (pdf)latex" \ 98 | "(use \`make latexpdf' here to do that automatically)." 99 | 100 | latexpdf: 101 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 102 | @echo "Running LaTeX files through pdflatex..." 103 | make -C $(BUILDDIR)/latex all-pdf 104 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 105 | 106 | text: 107 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 108 | @echo 109 | @echo "Build finished. The text files are in $(BUILDDIR)/text." 110 | 111 | man: 112 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 113 | @echo 114 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 115 | 116 | changes: 117 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 118 | @echo 119 | @echo "The overview file is in $(BUILDDIR)/changes." 120 | 121 | linkcheck: 122 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 123 | @echo 124 | @echo "Link check complete; look for any errors in the above output " \ 125 | "or in $(BUILDDIR)/linkcheck/output.txt." 126 | 127 | doctest: 128 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 129 | @echo "Testing of doctests in the sources finished, look at the " \ 130 | "results in $(BUILDDIR)/doctest/output.txt." 131 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/help/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | REM Command file for Sphinx documentation 4 | 5 | if "%SPHINXBUILD%" == "" ( 6 | set SPHINXBUILD=sphinx-build 7 | ) 8 | set BUILDDIR=build 9 | set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source 10 | if NOT "%PAPER%" == "" ( 11 | set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% 12 | ) 13 | 14 | if "%1" == "" goto help 15 | 16 | if "%1" == "help" ( 17 | :help 18 | echo.Please use `make ^` where ^ is one of 19 | echo. html to make standalone HTML files 20 | echo. dirhtml to make HTML files named index.html in directories 21 | echo. singlehtml to make a single large HTML file 22 | echo. pickle to make pickle files 23 | echo. json to make JSON files 24 | echo. htmlhelp to make HTML files and a HTML help project 25 | echo. qthelp to make HTML files and a qthelp project 26 | echo. devhelp to make HTML files and a Devhelp project 27 | echo. epub to make an epub 28 | echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter 29 | echo. text to make text files 30 | echo. man to make manual pages 31 | echo. changes to make an overview over all changed/added/deprecated items 32 | echo. linkcheck to check all external links for integrity 33 | echo. doctest to run all doctests embedded in the documentation if enabled 34 | goto end 35 | ) 36 | 37 | if "%1" == "clean" ( 38 | for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i 39 | del /q /s %BUILDDIR%\* 40 | goto end 41 | ) 42 | 43 | if "%1" == "html" ( 44 | %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html 45 | echo. 46 | echo.Build finished. The HTML pages are in %BUILDDIR%/html. 47 | goto end 48 | ) 49 | 50 | if "%1" == "dirhtml" ( 51 | %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml 52 | echo. 53 | echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. 54 | goto end 55 | ) 56 | 57 | if "%1" == "singlehtml" ( 58 | %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml 59 | echo. 60 | echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. 61 | goto end 62 | ) 63 | 64 | if "%1" == "pickle" ( 65 | %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle 66 | echo. 67 | echo.Build finished; now you can process the pickle files. 68 | goto end 69 | ) 70 | 71 | if "%1" == "json" ( 72 | %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json 73 | echo. 74 | echo.Build finished; now you can process the JSON files. 75 | goto end 76 | ) 77 | 78 | if "%1" == "htmlhelp" ( 79 | %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp 80 | echo. 81 | echo.Build finished; now you can run HTML Help Workshop with the ^ 82 | .hhp project file in %BUILDDIR%/htmlhelp. 83 | goto end 84 | ) 85 | 86 | if "%1" == "qthelp" ( 87 | %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp 88 | echo. 89 | echo.Build finished; now you can run "qcollectiongenerator" with the ^ 90 | .qhcp project file in %BUILDDIR%/qthelp, like this: 91 | echo.^> qcollectiongenerator %BUILDDIR%\qthelp\template_class.qhcp 92 | echo.To view the help file: 93 | echo.^> assistant -collectionFile %BUILDDIR%\qthelp\template_class.ghc 94 | goto end 95 | ) 96 | 97 | if "%1" == "devhelp" ( 98 | %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp 99 | echo. 100 | echo.Build finished. 101 | goto end 102 | ) 103 | 104 | if "%1" == "epub" ( 105 | %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub 106 | echo. 107 | echo.Build finished. The epub file is in %BUILDDIR%/epub. 108 | goto end 109 | ) 110 | 111 | if "%1" == "latex" ( 112 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 113 | echo. 114 | echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. 115 | goto end 116 | ) 117 | 118 | if "%1" == "text" ( 119 | %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text 120 | echo. 121 | echo.Build finished. The text files are in %BUILDDIR%/text. 122 | goto end 123 | ) 124 | 125 | if "%1" == "man" ( 126 | %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man 127 | echo. 128 | echo.Build finished. The manual pages are in %BUILDDIR%/man. 129 | goto end 130 | ) 131 | 132 | if "%1" == "changes" ( 133 | %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes 134 | echo. 135 | echo.The overview file is in %BUILDDIR%/changes. 136 | goto end 137 | ) 138 | 139 | if "%1" == "linkcheck" ( 140 | %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck 141 | echo. 142 | echo.Link check complete; look for any errors in the above output ^ 143 | or in %BUILDDIR%/linkcheck/output.txt. 144 | goto end 145 | ) 146 | 147 | if "%1" == "doctest" ( 148 | %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest 149 | echo. 150 | echo.Testing of doctests in the sources finished, look at the ^ 151 | results in %BUILDDIR%/doctest/output.txt. 152 | goto end 153 | ) 154 | 155 | :end 156 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/help/source/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # VideoGis documentation build configuration file, created by 4 | # sphinx-quickstart on Sun Feb 12 17:11:03 2012. 5 | # 6 | # This file is execfile()d with the current directory set to its containing dir. 7 | # 8 | # Note that not all possible configuration values are present in this 9 | # autogenerated file. 10 | # 11 | # All configuration values have a default; values that are commented out 12 | # serve to show the default. 13 | 14 | import sys, os 15 | 16 | # If extensions (or modules to document with autodoc) are in another directory, 17 | # add these directories to sys.path here. If the directory is relative to the 18 | # documentation root, use os.path.abspath to make it absolute, like shown here. 19 | #sys.path.insert(0, os.path.abspath('.')) 20 | 21 | # -- General configuration ----------------------------------------------------- 22 | 23 | # If your documentation needs a minimal Sphinx version, state it here. 24 | #needs_sphinx = '1.0' 25 | 26 | # Add any Sphinx extension module names here, as strings. They can be extensions 27 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. 28 | extensions = ['sphinx.ext.todo', 'sphinx.ext.pngmath', 'sphinx.ext.viewcode'] 29 | 30 | # Add any paths that contain templates here, relative to this directory. 31 | templates_path = ['_templates'] 32 | 33 | # The suffix of source filenames. 34 | source_suffix = '.rst' 35 | 36 | # The encoding of source files. 37 | #source_encoding = 'utf-8-sig' 38 | 39 | # The master toctree document. 40 | master_doc = 'index' 41 | 42 | # General information about the project. 43 | project = u'VideoGis' 44 | copyright = u'2013, Salvatore Agosta' 45 | 46 | # The version info for the project you're documenting, acts as replacement for 47 | # |version| and |release|, also used in various other places throughout the 48 | # built documents. 49 | # 50 | # The short X.Y version. 51 | version = '0.1' 52 | # The full version, including alpha/beta/rc tags. 53 | release = '0.1' 54 | 55 | # The language for content autogenerated by Sphinx. Refer to documentation 56 | # for a list of supported languages. 57 | #language = None 58 | 59 | # There are two options for replacing |today|: either, you set today to some 60 | # non-false value, then it is used: 61 | #today = '' 62 | # Else, today_fmt is used as the format for a strftime call. 63 | #today_fmt = '%B %d, %Y' 64 | 65 | # List of patterns, relative to source directory, that match files and 66 | # directories to ignore when looking for source files. 67 | exclude_patterns = [] 68 | 69 | # The reST default role (used for this markup: `text`) to use for all documents. 70 | #default_role = None 71 | 72 | # If true, '()' will be appended to :func: etc. cross-reference text. 73 | #add_function_parentheses = True 74 | 75 | # If true, the current module name will be prepended to all description 76 | # unit titles (such as .. function::). 77 | #add_TemplateModuleNames = True 78 | 79 | # If true, sectionauthor and moduleauthor directives will be shown in the 80 | # output. They are ignored by default. 81 | #show_authors = False 82 | 83 | # The name of the Pygments (syntax highlighting) style to use. 84 | pygments_style = 'sphinx' 85 | 86 | # A list of ignored prefixes for module index sorting. 87 | #modindex_common_prefix = [] 88 | 89 | 90 | # -- Options for HTML output --------------------------------------------------- 91 | 92 | # The theme to use for HTML and HTML Help pages. See the documentation for 93 | # a list of builtin themes. 94 | html_theme = 'default' 95 | 96 | # Theme options are theme-specific and customize the look and feel of a theme 97 | # further. For a list of options available for each theme, see the 98 | # documentation. 99 | #html_theme_options = {} 100 | 101 | # Add any paths that contain custom themes here, relative to this directory. 102 | #html_theme_path = [] 103 | 104 | # The name for this set of Sphinx documents. If None, it defaults to 105 | # " v documentation". 106 | #html_title = None 107 | 108 | # A shorter title for the navigation bar. Default is the same as html_title. 109 | #html_short_title = None 110 | 111 | # The name of an image file (relative to this directory) to place at the top 112 | # of the sidebar. 113 | #html_logo = None 114 | 115 | # The name of an image file (within the static path) to use as favicon of the 116 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 117 | # pixels large. 118 | #html_favicon = None 119 | 120 | # Add any paths that contain custom static files (such as style sheets) here, 121 | # relative to this directory. They are copied after the builtin static files, 122 | # so a file named "default.css" will overwrite the builtin "default.css". 123 | html_static_path = ['_static'] 124 | 125 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 126 | # using the given strftime format. 127 | #html_last_updated_fmt = '%b %d, %Y' 128 | 129 | # If true, SmartyPants will be used to convert quotes and dashes to 130 | # typographically correct entities. 131 | #html_use_smartypants = True 132 | 133 | # Custom sidebar templates, maps document names to template names. 134 | #html_sidebars = {} 135 | 136 | # Additional templates that should be rendered to pages, maps page names to 137 | # template names. 138 | #html_additional_pages = {} 139 | 140 | # If false, no module index is generated. 141 | #html_domain_indices = True 142 | 143 | # If false, no index is generated. 144 | #html_use_index = True 145 | 146 | # If true, the index is split into individual pages for each letter. 147 | #html_split_index = False 148 | 149 | # If true, links to the reST sources are added to the pages. 150 | #html_show_sourcelink = True 151 | 152 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. 153 | #html_show_sphinx = True 154 | 155 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 156 | #html_show_copyright = True 157 | 158 | # If true, an OpenSearch description file will be output, and all pages will 159 | # contain a tag referring to it. The value of this option must be the 160 | # base URL from which the finished HTML is served. 161 | #html_use_opensearch = '' 162 | 163 | # This is the file name suffix for HTML files (e.g. ".xhtml"). 164 | #html_file_suffix = None 165 | 166 | # Output file base name for HTML help builder. 167 | htmlhelp_basename = 'TemplateClassdoc' 168 | 169 | 170 | # -- Options for LaTeX output -------------------------------------------------- 171 | 172 | # The paper size ('letter' or 'a4'). 173 | #latex_paper_size = 'letter' 174 | 175 | # The font size ('10pt', '11pt' or '12pt'). 176 | #latex_font_size = '10pt' 177 | 178 | # Grouping the document tree into LaTeX files. List of tuples 179 | # (source start file, target name, title, author, documentclass [howto/manual]). 180 | latex_documents = [ 181 | ('index', 'VideoGis.tex', u'VideoGis Documentation', 182 | u'Salvatore Agosta', 'manual'), 183 | ] 184 | 185 | # The name of an image file (relative to this directory) to place at the top of 186 | # the title page. 187 | #latex_logo = None 188 | 189 | # For "manual" documents, if this is true, then toplevel headings are parts, 190 | # not chapters. 191 | #latex_use_parts = False 192 | 193 | # If true, show page references after internal links. 194 | #latex_show_pagerefs = False 195 | 196 | # If true, show URL addresses after external links. 197 | #latex_show_urls = False 198 | 199 | # Additional stuff for the LaTeX preamble. 200 | #latex_preamble = '' 201 | 202 | # Documents to append as an appendix to all manuals. 203 | #latex_appendices = [] 204 | 205 | # If false, no module index is generated. 206 | #latex_domain_indices = True 207 | 208 | 209 | # -- Options for manual page output -------------------------------------------- 210 | 211 | # One entry per manual page. List of tuples 212 | # (source start file, name, description, authors, manual section). 213 | man_pages = [ 214 | ('index', 'TemplateClass', u'VideoGis Documentation', 215 | [u'Salvatore Agosta'], 1) 216 | ] 217 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/help/source/index.rst: -------------------------------------------------------------------------------- 1 | .. VideoGis documentation master file, created by 2 | sphinx-quickstart on Sun Feb 12 17:11:03 2012. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to VideoGis's documentation! 7 | ============================================ 8 | 9 | Contents: 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | Indices and tables 15 | ================== 16 | 17 | * :ref:`genindex` 18 | * :ref:`modindex` 19 | * :ref:`search` 20 | 21 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/i18n/af.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | @default 5 | 6 | 7 | Good morning 8 | Goeie more 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/icon.png -------------------------------------------------------------------------------- /Video_UAV_Tracker/iconNewTabEditorConsole.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/iconNewTabEditorConsole.png -------------------------------------------------------------------------------- /Video_UAV_Tracker/mIconFormSelect.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/metadata.txt: -------------------------------------------------------------------------------- 1 | # This file contains metadata for your plugin. Since 2 | # version 2.0 of QGIS this is the proper way to supply 3 | # information about a plugin. The old method of 4 | # embedding metadata in __init__.py will 5 | # is no longer supported since version 2.0. 6 | 7 | # This file should be included when you package your plugin.# Mandatory items: 8 | 9 | [general] 10 | name=Video Uav Tracker 11 | qgisMinimumVersion=2.99 12 | qgisMaximumVersion=3.99 13 | description= Replay a video in sync with a gps track displayed on the map (3d OPTIONS with 'panda3d' module installed) 14 | version=2.1 15 | author=Salvatore Agosta 16 | email=sagost@katamail.com 17 | 18 | about= see README file in repository for instructions and details 19 | 20 | tracker=https://github.com/sagost/Video_UAV_Tracker-3D/issues 21 | repository=https://github.com/sagost/Video_UAV_Tracker-3D/ 22 | # End of mandatory metadata 23 | 24 | # Recommended items: 25 | 26 | # Uncomment the following line and add your changelog: 27 | # changelog= 28 | 29 | # Tags are comma separated with spaces allowed 30 | tags=python,3D,uav,drone,direct georefencing, video,mosaic,photogrammetry,database,inspection,georeferenced video,rov,thermographic video 31 | 32 | homepage=https://github.com/sagost/Video_UAV_Tracker-3D/ 33 | category=Plugins 34 | icon=icon.png 35 | # experimental flag 36 | experimental=False 37 | 38 | # deprecated flag (applies to the whole plugin, not just a single version) 39 | deprecated=False 40 | 41 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/pb_tool.cfg: -------------------------------------------------------------------------------- 1 | #/*************************************************************************** 2 | # VideoGis 3 | # 4 | # Configuration file for plugin builder tool (pb_tool) 5 | # ------------------- 6 | # begin : 2017-02-13 7 | # copyright : (C) 2017 by Salvatore Agosta 8 | # email : sagost@katamail.com 9 | # ***************************************************************************/ 10 | # 11 | #/*************************************************************************** 12 | # * * 13 | # * This program is free software; you can redistribute it and/or modify * 14 | # * it under the terms of the GNU General Public License as published by * 15 | # * the Free Software Foundation; either version 2 of the License, or * 16 | # * (at your option) any later version. * 17 | # * * 18 | # ***************************************************************************/ 19 | # 20 | # 21 | # You can install pb_tool using: 22 | # pip install http://geoapt.net/files/pb_tool.zip 23 | # 24 | # Consider doing your development (and install of pb_tool) in a virtualenv. 25 | # 26 | # For details on setting up and using pb_tool, see: 27 | # http://spatialgalaxy.net/qgis-plugin-development-with-pb_tool 28 | # 29 | # Issues and pull requests here: 30 | # https://github.com/g-sherman/plugin_build_tool: 31 | # 32 | # Sane defaults for your plugin generated by the Plugin Builder are 33 | # already set below. 34 | # 35 | # As you add Python source files and UI files to your plugin, add 36 | # them to the appropriate [files] section below. 37 | 38 | [plugin] 39 | # Name of the plugin. This is the name of the directory that will 40 | # be created in .qgis2/python/plugins 41 | name: Video_UAV_Tracker 42 | 43 | [files] 44 | # Python files that should be deployed with the plugin 45 | python_files: __init__.py VideoGis.py VideoGis_dockwidget.py 46 | 47 | # The main dialog file that is loaded (not compiled) 48 | main_dialog: VideoGis_dockwidget_base.ui 49 | 50 | # Other ui files for dialogs you create (these will be compiled) 51 | compiled_ui_files: 52 | 53 | # Resource file(s) that will be compiled 54 | resource_files: resources.qrc 55 | 56 | # Other files required for the plugin 57 | extras: metadata.txt icon.png 58 | 59 | # Other directories to be deployed with the plugin. 60 | # These must be subdirectories under the plugin directory 61 | extra_dirs: 62 | 63 | # ISO code(s) for any locales (translations), separated by spaces. 64 | # Corresponding .ts files must exist in the i18n directory 65 | locales: 66 | 67 | [help] 68 | # the built help directory that should be deployed with the plugin 69 | dir: help/build/html 70 | # the name of the directory to target in the deployed plugin 71 | target: help 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/plugin_upload.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding=utf-8 3 | """This script uploads a plugin package on the server. 4 | Authors: A. Pasotti, V. Picavet 5 | git sha : $TemplateVCSFormat 6 | """ 7 | 8 | import sys 9 | import getpass 10 | import xmlrpc.client 11 | from optparse import OptionParser 12 | 13 | # Configuration 14 | PROTOCOL = 'http' 15 | SERVER = 'plugins.qgis.org' 16 | PORT = '80' 17 | ENDPOINT = '/plugins/RPC2/' 18 | VERBOSE = False 19 | 20 | 21 | def main(parameters, arguments): 22 | """Main entry point. 23 | 24 | :param parameters: Command line parameters. 25 | :param arguments: Command line arguments. 26 | """ 27 | address = "%s://%s:%s@%s:%s%s" % ( 28 | PROTOCOL, 29 | parameters.username, 30 | parameters.password, 31 | parameters.server, 32 | parameters.port, 33 | ENDPOINT) 34 | print("Connecting to: %s" % hide_password(address)) 35 | 36 | server = xmlrpc.client.ServerProxy(address, verbose=VERBOSE) 37 | 38 | try: 39 | plugin_id, version_id = server.plugin.upload( 40 | xmlrpc.client.Binary(open(arguments[0]).read())) 41 | print("Plugin ID: %s" % plugin_id) 42 | print("Version ID: %s" % version_id) 43 | except xmlrpc.client.ProtocolError as err: 44 | print("A protocol error occurred") 45 | print("URL: %s" % hide_password(err.url, 0)) 46 | print("HTTP/HTTPS headers: %s" % err.headers) 47 | print("Error code: %d" % err.errcode) 48 | print("Error message: %s" % err.errmsg) 49 | except xmlrpc.client.Fault as err: 50 | print("A fault occurred") 51 | print("Fault code: %d" % err.faultCode) 52 | print("Fault string: %s" % err.faultString) 53 | 54 | 55 | def hide_password(url, start=6): 56 | """Returns the http url with password part replaced with '*'. 57 | 58 | :param url: URL to upload the plugin to. 59 | :type url: str 60 | 61 | :param start: Position of start of password. 62 | :type start: int 63 | """ 64 | start_position = url.find(':', start) + 1 65 | end_position = url.find('@') 66 | return "%s%s%s" % ( 67 | url[:start_position], 68 | '*' * (end_position - start_position), 69 | url[end_position:]) 70 | 71 | 72 | if __name__ == "__main__": 73 | parser = OptionParser(usage="%prog [options] plugin.zip") 74 | parser.add_option( 75 | "-w", "--password", dest="password", 76 | help="Password for plugin site", metavar="******") 77 | parser.add_option( 78 | "-u", "--username", dest="username", 79 | help="Username of plugin site", metavar="user") 80 | parser.add_option( 81 | "-p", "--port", dest="port", 82 | help="Server port to connect to", metavar="80") 83 | parser.add_option( 84 | "-s", "--server", dest="server", 85 | help="Specify server name", metavar="plugins.qgis.org") 86 | options, args = parser.parse_args() 87 | if len(args) != 1: 88 | print("Please specify zip file.\n") 89 | parser.print_help() 90 | sys.exit(1) 91 | if not options.server: 92 | options.server = SERVER 93 | if not options.port: 94 | options.port = PORT 95 | if not options.username: 96 | # interactive mode 97 | username = getpass.getuser() 98 | print("Please enter user name [%s] :" % username, end=' ') 99 | res = input() 100 | if res != "": 101 | options.username = res 102 | else: 103 | options.username = username 104 | if not options.password: 105 | # interactive mode 106 | options.password = getpass.getpass() 107 | main(options, args) 108 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/pylintrc: -------------------------------------------------------------------------------- 1 | [MASTER] 2 | 3 | # Specify a configuration file. 4 | #rcfile= 5 | 6 | # Python code to execute, usually for sys.path manipulation such as 7 | # pygtk.require(). 8 | #init-hook= 9 | 10 | # Profiled execution. 11 | profile=no 12 | 13 | # Add files or directories to the blacklist. They should be base names, not 14 | # paths. 15 | ignore=CVS 16 | 17 | # Pickle collected data for later comparisons. 18 | persistent=yes 19 | 20 | # List of plugins (as comma separated values of python modules names) to load, 21 | # usually to register additional checkers. 22 | load-plugins= 23 | 24 | 25 | [MESSAGES CONTROL] 26 | 27 | # Enable the message, report, category or checker with the given id(s). You can 28 | # either give multiple identifier separated by comma (,) or put this option 29 | # multiple time. See also the "--disable" option for examples. 30 | #enable= 31 | 32 | # Disable the message, report, category or checker with the given id(s). You 33 | # can either give multiple identifiers separated by comma (,) or put this 34 | # option multiple times (only on the command line, not in the configuration 35 | # file where it should appear only once).You can also use "--disable=all" to 36 | # disable everything first and then reenable specific checks. For example, if 37 | # you want to run only the similarities checker, you can use "--disable=all 38 | # --enable=similarities". If you want to run only the classes checker, but have 39 | # no Warning level messages displayed, use"--disable=all --enable=classes 40 | # --disable=W" 41 | # see http://stackoverflow.com/questions/21487025/pylint-locally-defined-disables-still-give-warnings-how-to-suppress-them 42 | disable=locally-disabled,C0103 43 | 44 | 45 | [REPORTS] 46 | 47 | # Set the output format. Available formats are text, parseable, colorized, msvs 48 | # (visual studio) and html. You can also give a reporter class, eg 49 | # mypackage.mymodule.MyReporterClass. 50 | output-format=text 51 | 52 | # Put messages in a separate file for each module / package specified on the 53 | # command line instead of printing them on stdout. Reports (if any) will be 54 | # written in a file name "pylint_global.[txt|html]". 55 | files-output=no 56 | 57 | # Tells whether to display a full report or only the messages 58 | reports=yes 59 | 60 | # Python expression which should return a note less than 10 (10 is the highest 61 | # note). You have access to the variables errors warning, statement which 62 | # respectively contain the number of errors / warnings messages and the total 63 | # number of statements analyzed. This is used by the global evaluation report 64 | # (RP0004). 65 | evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) 66 | 67 | # Add a comment according to your evaluation note. This is used by the global 68 | # evaluation report (RP0004). 69 | comment=no 70 | 71 | # Template used to display messages. This is a python new-style format string 72 | # used to format the message information. See doc for all details 73 | #msg-template= 74 | 75 | 76 | [BASIC] 77 | 78 | # Required attributes for module, separated by a comma 79 | required-attributes= 80 | 81 | # List of builtins function names that should not be used, separated by a comma 82 | bad-functions=map,filter,apply,input 83 | 84 | # Regular expression which should only match correct module names 85 | module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ 86 | 87 | # Regular expression which should only match correct module level names 88 | const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$ 89 | 90 | # Regular expression which should only match correct class names 91 | class-rgx=[A-Z_][a-zA-Z0-9]+$ 92 | 93 | # Regular expression which should only match correct function names 94 | function-rgx=[a-z_][a-z0-9_]{2,30}$ 95 | 96 | # Regular expression which should only match correct method names 97 | method-rgx=[a-z_][a-z0-9_]{2,30}$ 98 | 99 | # Regular expression which should only match correct instance attribute names 100 | attr-rgx=[a-z_][a-z0-9_]{2,30}$ 101 | 102 | # Regular expression which should only match correct argument names 103 | argument-rgx=[a-z_][a-z0-9_]{2,30}$ 104 | 105 | # Regular expression which should only match correct variable names 106 | variable-rgx=[a-z_][a-z0-9_]{2,30}$ 107 | 108 | # Regular expression which should only match correct attribute names in class 109 | # bodies 110 | class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$ 111 | 112 | # Regular expression which should only match correct list comprehension / 113 | # generator expression variable names 114 | inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ 115 | 116 | # Good variable names which should always be accepted, separated by a comma 117 | good-names=i,j,k,ex,Run,_ 118 | 119 | # Bad variable names which should always be refused, separated by a comma 120 | bad-names=foo,bar,baz,toto,tutu,tata 121 | 122 | # Regular expression which should only match function or class names that do 123 | # not require a docstring. 124 | no-docstring-rgx=__.*__ 125 | 126 | # Minimum line length for functions/classes that require docstrings, shorter 127 | # ones are exempt. 128 | docstring-min-length=-1 129 | 130 | 131 | [MISCELLANEOUS] 132 | 133 | # List of note tags to take in consideration, separated by a comma. 134 | notes=FIXME,XXX,TODO 135 | 136 | 137 | [TYPECHECK] 138 | 139 | # Tells whether missing members accessed in mixin class should be ignored. A 140 | # mixin class is detected if its name ends with "mixin" (case insensitive). 141 | ignore-mixin-members=yes 142 | 143 | # List of classes names for which member attributes should not be checked 144 | # (useful for classes with attributes dynamically set). 145 | ignored-classes=SQLObject 146 | 147 | # When zope mode is activated, add a predefined set of Zope acquired attributes 148 | # to generated-members. 149 | zope=no 150 | 151 | # List of members which are set dynamically and missed by pylint inference 152 | # system, and so shouldn't trigger E0201 when accessed. Python regular 153 | # expressions are accepted. 154 | generated-members=REQUEST,acl_users,aq_parent 155 | 156 | 157 | [VARIABLES] 158 | 159 | # Tells whether we should check for unused import in __init__ files. 160 | init-import=no 161 | 162 | # A regular expression matching the beginning of the name of dummy variables 163 | # (i.e. not used). 164 | dummy-variables-rgx=_$|dummy 165 | 166 | # List of additional names supposed to be defined in builtins. Remember that 167 | # you should avoid to define new builtins when possible. 168 | additional-builtins= 169 | 170 | 171 | [FORMAT] 172 | 173 | # Maximum number of characters on a single line. 174 | max-line-length=80 175 | 176 | # Regexp for a line that is allowed to be longer than the limit. 177 | ignore-long-lines=^\s*(# )??$ 178 | 179 | # Allow the body of an if to be on the same line as the test if there is no 180 | # else. 181 | single-line-if-stmt=no 182 | 183 | # List of optional constructs for which whitespace checking is disabled 184 | no-space-check=trailing-comma,dict-separator 185 | 186 | # Maximum number of lines in a module 187 | max-module-lines=1000 188 | 189 | # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 190 | # tab). 191 | indent-string=' ' 192 | 193 | 194 | [SIMILARITIES] 195 | 196 | # Minimum lines number of a similarity. 197 | min-similarity-lines=4 198 | 199 | # Ignore comments when computing similarities. 200 | ignore-comments=yes 201 | 202 | # Ignore docstrings when computing similarities. 203 | ignore-docstrings=yes 204 | 205 | # Ignore imports when computing similarities. 206 | ignore-imports=no 207 | 208 | 209 | [IMPORTS] 210 | 211 | # Deprecated modules which should not be used, separated by a comma 212 | deprecated-modules=regsub,TERMIOS,Bastion,rexec 213 | 214 | # Create a graph of every (i.e. internal and external) dependencies in the 215 | # given file (report RP0402 must not be disabled) 216 | import-graph= 217 | 218 | # Create a graph of external dependencies in the given file (report RP0402 must 219 | # not be disabled) 220 | ext-import-graph= 221 | 222 | # Create a graph of internal dependencies in the given file (report RP0402 must 223 | # not be disabled) 224 | int-import-graph= 225 | 226 | 227 | [DESIGN] 228 | 229 | # Maximum number of arguments for function / method 230 | max-args=5 231 | 232 | # Argument names that match this expression will be ignored. Default to name 233 | # with leading underscore 234 | ignored-argument-names=_.* 235 | 236 | # Maximum number of locals for function / method body 237 | max-locals=15 238 | 239 | # Maximum number of return / yield for function / method body 240 | max-returns=6 241 | 242 | # Maximum number of branch for function / method body 243 | max-branches=12 244 | 245 | # Maximum number of statements in function / method body 246 | max-statements=50 247 | 248 | # Maximum number of parents for a class (see R0901). 249 | max-parents=7 250 | 251 | # Maximum number of attributes for a class (see R0902). 252 | max-attributes=7 253 | 254 | # Minimum number of public methods for a class (see R0903). 255 | min-public-methods=2 256 | 257 | # Maximum number of public methods for a class (see R0904). 258 | max-public-methods=20 259 | 260 | 261 | [CLASSES] 262 | 263 | # List of interface methods to ignore, separated by a comma. This is used for 264 | # instance to not check methods defines in Zope's Interface base class. 265 | ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by 266 | 267 | # List of method names used to declare (i.e. assign) instance attributes. 268 | defining-attr-methods=__init__,__new__,setUp 269 | 270 | # List of valid names for the first argument in a class method. 271 | valid-classmethod-first-arg=cls 272 | 273 | # List of valid names for the first argument in a metaclass class method. 274 | valid-metaclass-classmethod-first-arg=mcs 275 | 276 | 277 | [EXCEPTIONS] 278 | 279 | # Exceptions that will emit a warning when being caught. Defaults to 280 | # "Exception" 281 | overgeneral-exceptions=Exception 282 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/resources.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | iconNewTabEditorConsole.png 4 | mIconFormSelect.svg 5 | icon.png 6 | 7 | 8 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/scripts/compile-strings.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | LRELEASE=$1 3 | LOCALES=$2 4 | 5 | 6 | for LOCALE in ${LOCALES} 7 | do 8 | echo "Processing: ${LOCALE}.ts" 9 | # Note we don't use pylupdate with qt .pro file approach as it is flakey 10 | # about what is made available. 11 | $LRELEASE i18n/${LOCALE}.ts 12 | done 13 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/scripts/run-env-linux.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | QGIS_PREFIX_PATH=/usr/local/qgis-2.0 4 | if [ -n "$1" ]; then 5 | QGIS_PREFIX_PATH=$1 6 | fi 7 | 8 | echo ${QGIS_PREFIX_PATH} 9 | 10 | 11 | export QGIS_PREFIX_PATH=${QGIS_PREFIX_PATH} 12 | export QGIS_PATH=${QGIS_PREFIX_PATH} 13 | export LD_LIBRARY_PATH=${QGIS_PREFIX_PATH}/lib 14 | export PYTHONPATH=${QGIS_PREFIX_PATH}/share/qgis/python:${QGIS_PREFIX_PATH}/share/qgis/python/plugins:${PYTHONPATH} 15 | 16 | echo "QGIS PATH: $QGIS_PREFIX_PATH" 17 | export QGIS_DEBUG=0 18 | export QGIS_LOG_FILE=/tmp/inasafe/realtime/logs/qgis.log 19 | 20 | export PATH=${QGIS_PREFIX_PATH}/bin:$PATH 21 | 22 | echo "This script is intended to be sourced to set up your shell to" 23 | echo "use a QGIS 2.0 built in $QGIS_PREFIX_PATH" 24 | echo 25 | echo "To use it do:" 26 | echo "source $BASH_SOURCE /your/optional/install/path" 27 | echo 28 | echo "Then use the make file supplied here e.g. make guitest" 29 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/scripts/update-strings.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | LOCALES=$* 3 | 4 | # Get newest .py files so we don't update strings unnecessarily 5 | 6 | CHANGED_FILES=0 7 | PYTHON_FILES=`find . -regex ".*\(ui\|py\)$" -type f` 8 | for PYTHON_FILE in $PYTHON_FILES 9 | do 10 | CHANGED=$(stat -c %Y $PYTHON_FILE) 11 | if [ ${CHANGED} -gt ${CHANGED_FILES} ] 12 | then 13 | CHANGED_FILES=${CHANGED} 14 | fi 15 | done 16 | 17 | # Qt translation stuff 18 | # for .ts file 19 | UPDATE=false 20 | for LOCALE in ${LOCALES} 21 | do 22 | TRANSLATION_FILE="i18n/$LOCALE.ts" 23 | if [ ! -f ${TRANSLATION_FILE} ] 24 | then 25 | # Force translation string collection as we have a new language file 26 | touch ${TRANSLATION_FILE} 27 | UPDATE=true 28 | break 29 | fi 30 | 31 | MODIFICATION_TIME=$(stat -c %Y ${TRANSLATION_FILE}) 32 | if [ ${CHANGED_FILES} -gt ${MODIFICATION_TIME} ] 33 | then 34 | # Force translation string collection as a .py file has been updated 35 | UPDATE=true 36 | break 37 | fi 38 | done 39 | 40 | if [ ${UPDATE} == true ] 41 | # retrieve all python files 42 | then 43 | print ${PYTHON_FILES} 44 | # update .ts 45 | echo "Please provide translations by editing the translation files below:" 46 | for LOCALE in ${LOCALES} 47 | do 48 | echo "i18n/"${LOCALE}".ts" 49 | # Note we don't use pylupdate with qt .pro file approach as it is flakey 50 | # about what is made available. 51 | pylupdate4 -noobsolete ${PYTHON_FILES} -ts i18n/${LOCALE}.ts 52 | done 53 | else 54 | echo "No need to edit any translation files (.ts) because no python files" 55 | echo "has been updated since the last update translation. " 56 | fi 57 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/tableManagerUiClone.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | 4 | 5 | from PyQt5 import QtCore, QtGui, QtWidgets 6 | 7 | class Ui_Clone(object): 8 | def setupUi(self, Clone): 9 | Clone.setObjectName("Clone") 10 | Clone.resize(375, 210) 11 | self.gridlayout = QtWidgets.QGridLayout(Clone) 12 | self.gridlayout.setObjectName("gridlayout") 13 | self.vboxlayout = QtWidgets.QVBoxLayout() 14 | self.vboxlayout.setObjectName("vboxlayout") 15 | spacerItem = QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.MinimumExpanding) 16 | self.vboxlayout.addItem(spacerItem) 17 | self.label = QtWidgets.QLabel(Clone) 18 | sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) 19 | sizePolicy.setHorizontalStretch(0) 20 | sizePolicy.setVerticalStretch(0) 21 | sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth()) 22 | self.label.setSizePolicy(sizePolicy) 23 | self.label.setObjectName("label") 24 | self.vboxlayout.addWidget(self.label) 25 | self.lineDsn = QtWidgets.QLineEdit(Clone) 26 | self.lineDsn.setMouseTracking(False) 27 | self.lineDsn.setInputMask("") 28 | self.lineDsn.setMaxLength(10) 29 | self.lineDsn.setFrame(True) 30 | self.lineDsn.setObjectName("lineDsn") 31 | self.vboxlayout.addWidget(self.lineDsn) 32 | self.label_3 = QtWidgets.QLabel(Clone) 33 | self.label_3.setObjectName("label_3") 34 | self.vboxlayout.addWidget(self.label_3) 35 | self.comboDsn = QtWidgets.QComboBox(Clone) 36 | self.comboDsn.setObjectName("comboDsn") 37 | self.vboxlayout.addWidget(self.comboDsn) 38 | self.gridlayout.addLayout(self.vboxlayout, 0, 0, 1, 1) 39 | self.buttonBox = QtWidgets.QDialogButtonBox(Clone) 40 | self.buttonBox.setOrientation(QtCore.Qt.Horizontal) 41 | self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) 42 | self.buttonBox.setCenterButtons(True) 43 | self.buttonBox.setObjectName("buttonBox") 44 | self.gridlayout.addWidget(self.buttonBox, 2, 0, 1, 1) 45 | spacerItem1 = QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.MinimumExpanding) 46 | self.gridlayout.addItem(spacerItem1, 1, 0, 1, 1) 47 | 48 | self.retranslateUi(Clone) 49 | self.buttonBox.accepted.connect(Clone.accept) 50 | self.buttonBox.rejected.connect(Clone.reject) 51 | QtCore.QMetaObject.connectSlotsByName(Clone) 52 | Clone.setTabOrder(self.lineDsn, self.comboDsn) 53 | Clone.setTabOrder(self.comboDsn, self.buttonBox) 54 | 55 | def retranslateUi(self, Clone): 56 | _translate = QtCore.QCoreApplication.translate 57 | Clone.setWindowTitle(_translate("Clone", "Clone field")) 58 | self.label.setText(_translate("Clone", "A name for the new field:")) 59 | self.label_3.setText(_translate("Clone", "Insert at position:")) 60 | 61 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/tableManagerUiClone.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Clone 4 | 5 | 6 | 7 | 0 8 | 0 9 | 375 10 | 210 11 | 12 | 13 | 14 | Clone field 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | Qt::Vertical 23 | 24 | 25 | QSizePolicy::MinimumExpanding 26 | 27 | 28 | 29 | 20 30 | 20 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 0 40 | 0 41 | 42 | 43 | 44 | A name for the new field: 45 | 46 | 47 | 48 | 49 | 50 | 51 | false 52 | 53 | 54 | 55 | 56 | 57 | 10 58 | 59 | 60 | true 61 | 62 | 63 | 64 | 65 | 66 | 67 | Insert at position: 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | Qt::Horizontal 80 | 81 | 82 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok 83 | 84 | 85 | true 86 | 87 | 88 | 89 | 90 | 91 | 92 | Qt::Vertical 93 | 94 | 95 | QSizePolicy::MinimumExpanding 96 | 97 | 98 | 99 | 20 100 | 20 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | lineDsn 109 | comboDsn 110 | buttonBox 111 | 112 | 113 | 114 | 115 | buttonBox 116 | accepted() 117 | Clone 118 | accept() 119 | 120 | 121 | 248 122 | 254 123 | 124 | 125 | 157 126 | 274 127 | 128 | 129 | 130 | 131 | buttonBox 132 | rejected() 133 | Clone 134 | reject() 135 | 136 | 137 | 316 138 | 260 139 | 140 | 141 | 286 142 | 274 143 | 144 | 145 | 146 | 147 | 148 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/tableManagerUiInsert.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | 4 | from PyQt5 import QtCore, QtGui, QtWidgets 5 | 6 | class Ui_Insert(object): 7 | def setupUi(self, Insert): 8 | Insert.setObjectName("Insert") 9 | Insert.resize(420, 260) 10 | self.gridlayout = QtWidgets.QGridLayout(Insert) 11 | self.gridlayout.setObjectName("gridlayout") 12 | self.vboxlayout = QtWidgets.QVBoxLayout() 13 | self.vboxlayout.setObjectName("vboxlayout") 14 | self.label = QtWidgets.QLabel(Insert) 15 | sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) 16 | sizePolicy.setHorizontalStretch(0) 17 | sizePolicy.setVerticalStretch(0) 18 | sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth()) 19 | self.label.setSizePolicy(sizePolicy) 20 | self.label.setObjectName("label") 21 | self.vboxlayout.addWidget(self.label) 22 | self.lineName = QtWidgets.QLineEdit(Insert) 23 | self.lineName.setMouseTracking(False) 24 | self.lineName.setInputMask("") 25 | self.lineName.setMaxLength(10) 26 | self.lineName.setFrame(True) 27 | self.lineName.setObjectName("lineName") 28 | self.vboxlayout.addWidget(self.lineName) 29 | spacerItem = QtWidgets.QSpacerItem(20, 10, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) 30 | self.vboxlayout.addItem(spacerItem) 31 | self.label_2 = QtWidgets.QLabel(Insert) 32 | sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) 33 | sizePolicy.setHorizontalStretch(0) 34 | sizePolicy.setVerticalStretch(0) 35 | sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth()) 36 | self.label_2.setSizePolicy(sizePolicy) 37 | self.label_2.setObjectName("label_2") 38 | self.vboxlayout.addWidget(self.label_2) 39 | self.comboType = QtWidgets.QComboBox(Insert) 40 | self.comboType.setMaxVisibleItems(3) 41 | self.comboType.setObjectName("comboType") 42 | self.vboxlayout.addWidget(self.comboType) 43 | spacerItem1 = QtWidgets.QSpacerItem(20, 10, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) 44 | self.vboxlayout.addItem(spacerItem1) 45 | self.label_3 = QtWidgets.QLabel(Insert) 46 | sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) 47 | sizePolicy.setHorizontalStretch(0) 48 | sizePolicy.setVerticalStretch(0) 49 | sizePolicy.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth()) 50 | self.label_3.setSizePolicy(sizePolicy) 51 | self.label_3.setObjectName("label_3") 52 | self.vboxlayout.addWidget(self.label_3) 53 | self.comboPos = QtWidgets.QComboBox(Insert) 54 | self.comboPos.setObjectName("comboPos") 55 | self.vboxlayout.addWidget(self.comboPos) 56 | self.gridlayout.addLayout(self.vboxlayout, 0, 0, 1, 1) 57 | self.buttonBox = QtWidgets.QDialogButtonBox(Insert) 58 | self.buttonBox.setOrientation(QtCore.Qt.Horizontal) 59 | self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) 60 | self.buttonBox.setCenterButtons(True) 61 | self.buttonBox.setObjectName("buttonBox") 62 | self.gridlayout.addWidget(self.buttonBox, 3, 0, 1, 1) 63 | spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) 64 | self.gridlayout.addItem(spacerItem2, 1, 0, 1, 1) 65 | 66 | self.retranslateUi(Insert) 67 | self.comboType.setCurrentIndex(-1) 68 | self.buttonBox.accepted.connect(Insert.accept) 69 | self.buttonBox.rejected.connect(Insert.reject) 70 | QtCore.QMetaObject.connectSlotsByName(Insert) 71 | Insert.setTabOrder(self.lineName, self.comboType) 72 | Insert.setTabOrder(self.comboType, self.comboPos) 73 | Insert.setTabOrder(self.comboPos, self.buttonBox) 74 | 75 | def retranslateUi(self, Insert): 76 | _translate = QtCore.QCoreApplication.translate 77 | Insert.setWindowTitle(_translate("Insert", "Insert field")) 78 | self.label.setText(_translate("Insert", "Field name:")) 79 | self.label_2.setText(_translate("Insert", "Field type:")) 80 | self.label_3.setText(_translate("Insert", "Insert at position:")) 81 | 82 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/tableManagerUiInsert.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Insert 4 | 5 | 6 | 7 | 0 8 | 0 9 | 420 10 | 260 11 | 12 | 13 | 14 | Insert field 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 0 24 | 0 25 | 26 | 27 | 28 | Field name: 29 | 30 | 31 | 32 | 33 | 34 | 35 | false 36 | 37 | 38 | 39 | 40 | 41 | 10 42 | 43 | 44 | true 45 | 46 | 47 | 48 | 49 | 50 | 51 | Qt::Vertical 52 | 53 | 54 | QSizePolicy::Fixed 55 | 56 | 57 | 58 | 20 59 | 10 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 0 69 | 0 70 | 71 | 72 | 73 | Field type: 74 | 75 | 76 | 77 | 78 | 79 | 80 | -1 81 | 82 | 83 | 3 84 | 85 | 86 | 87 | 88 | 89 | 90 | Qt::Vertical 91 | 92 | 93 | QSizePolicy::Fixed 94 | 95 | 96 | 97 | 20 98 | 10 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 0 108 | 0 109 | 110 | 111 | 112 | Insert at position: 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | Qt::Horizontal 125 | 126 | 127 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok 128 | 129 | 130 | true 131 | 132 | 133 | 134 | 135 | 136 | 137 | Qt::Vertical 138 | 139 | 140 | 141 | 20 142 | 40 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | lineName 151 | comboType 152 | comboPos 153 | buttonBox 154 | 155 | 156 | 157 | 158 | buttonBox 159 | accepted() 160 | Insert 161 | accept() 162 | 163 | 164 | 248 165 | 254 166 | 167 | 168 | 157 169 | 274 170 | 171 | 172 | 173 | 174 | buttonBox 175 | rejected() 176 | Insert 177 | reject() 178 | 179 | 180 | 316 181 | 260 182 | 183 | 184 | 286 185 | 274 186 | 187 | 188 | 189 | 190 | 191 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/tableManagerUiRename.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | 4 | 5 | from PyQt5 import QtCore, QtGui, QtWidgets 6 | 7 | class Ui_Rename(object): 8 | def setupUi(self, Rename): 9 | Rename.setObjectName("Rename") 10 | Rename.resize(397, 126) 11 | self.gridlayout = QtWidgets.QGridLayout(Rename) 12 | self.gridlayout.setObjectName("gridlayout") 13 | self.vboxlayout = QtWidgets.QVBoxLayout() 14 | self.vboxlayout.setObjectName("vboxlayout") 15 | self.label = QtWidgets.QLabel(Rename) 16 | sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) 17 | sizePolicy.setHorizontalStretch(0) 18 | sizePolicy.setVerticalStretch(0) 19 | sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth()) 20 | self.label.setSizePolicy(sizePolicy) 21 | self.label.setObjectName("label") 22 | self.vboxlayout.addWidget(self.label) 23 | self.lineEdit = QtWidgets.QLineEdit(Rename) 24 | self.lineEdit.setMouseTracking(False) 25 | self.lineEdit.setInputMask("") 26 | self.lineEdit.setMaxLength(10) 27 | self.lineEdit.setFrame(True) 28 | self.lineEdit.setObjectName("lineEdit") 29 | self.vboxlayout.addWidget(self.lineEdit) 30 | self.gridlayout.addLayout(self.vboxlayout, 0, 0, 1, 1) 31 | self.buttonBox = QtWidgets.QDialogButtonBox(Rename) 32 | self.buttonBox.setOrientation(QtCore.Qt.Horizontal) 33 | self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) 34 | self.buttonBox.setCenterButtons(True) 35 | self.buttonBox.setObjectName("buttonBox") 36 | self.gridlayout.addWidget(self.buttonBox, 2, 0, 1, 1) 37 | spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) 38 | self.gridlayout.addItem(spacerItem, 1, 0, 1, 1) 39 | 40 | self.retranslateUi(Rename) 41 | self.buttonBox.accepted.connect(Rename.accept) 42 | self.buttonBox.rejected.connect(Rename.reject) 43 | QtCore.QMetaObject.connectSlotsByName(Rename) 44 | 45 | def retranslateUi(self, Rename): 46 | _translate = QtCore.QCoreApplication.translate 47 | Rename.setWindowTitle(_translate("Rename", "Rename field")) 48 | self.label.setText(_translate("Rename", "Enter new field name:")) 49 | 50 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/tableManagerUiRename.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Rename 4 | 5 | 6 | 7 | 0 8 | 0 9 | 397 10 | 126 11 | 12 | 13 | 14 | Rename field 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 0 24 | 0 25 | 26 | 27 | 28 | Enter new field name: 29 | 30 | 31 | 32 | 33 | 34 | 35 | false 36 | 37 | 38 | 39 | 40 | 41 | 10 42 | 43 | 44 | true 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | Qt::Horizontal 54 | 55 | 56 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok 57 | 58 | 59 | true 60 | 61 | 62 | 63 | 64 | 65 | 66 | Qt::Vertical 67 | 68 | 69 | QSizePolicy::Expanding 70 | 71 | 72 | 73 | 20 74 | 40 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | buttonBox 85 | accepted() 86 | Rename 87 | accept() 88 | 89 | 90 | 248 91 | 254 92 | 93 | 94 | 157 95 | 274 96 | 97 | 98 | 99 | 100 | buttonBox 101 | rejected() 102 | Rename 103 | reject() 104 | 105 | 106 | 316 107 | 260 108 | 109 | 110 | 286 111 | 274 112 | 113 | 114 | 115 | 116 | 117 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/terrain.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | // This is the terrain fragment shader. There is a lot of code in here 4 | // which is not necessary to render the terrain, but included for convenience - 5 | // Like generating normals from the heightmap or a simple fog effect. 6 | 7 | // Most of the time you want to adjust this shader to get your terrain the look 8 | // you want. The vertex shader most likely will stay the same. 9 | 10 | in vec2 terrain_uv; 11 | in vec3 vtx_pos; 12 | out vec4 color; 13 | 14 | uniform struct { 15 | sampler2D data_texture; 16 | sampler2D heightfield; 17 | int view_index; 18 | int terrain_size; 19 | int chunk_size; 20 | } ShaderTerrainMesh; 21 | 22 | uniform sampler2D p3d_Texture0; 23 | uniform vec3 wspos_camera; 24 | 25 | // Compute normal from the heightmap, this assumes the terrain is facing z-up 26 | vec3 get_terrain_normal() { 27 | const float terrain_height = 15.0; 28 | vec3 pixel_size = vec3(1.0, -1.0, 0) / textureSize(ShaderTerrainMesh.heightfield, 0).xxx; 29 | float u0 = texture(ShaderTerrainMesh.heightfield, terrain_uv + pixel_size.yz).x * terrain_height; 30 | float u1 = texture(ShaderTerrainMesh.heightfield, terrain_uv + pixel_size.xz).x * terrain_height; 31 | float v0 = texture(ShaderTerrainMesh.heightfield, terrain_uv + pixel_size.zy).x * terrain_height; 32 | float v1 = texture(ShaderTerrainMesh.heightfield, terrain_uv + pixel_size.zx).x * terrain_height; 33 | vec3 tangent = normalize(vec3(1.0, 0, u1 - u0)); 34 | vec3 binormal = normalize(vec3(0, 1.0, v1 - v0)); 35 | return normalize(cross(tangent, binormal)); 36 | } 37 | 38 | 39 | 40 | void main() { 41 | vec3 diffuse = texture(p3d_Texture0, terrain_uv).xyz; 42 | vec3 normal = get_terrain_normal(); 43 | 44 | // Add some fake lighting - you usually want to use your own lighting code here 45 | vec3 fake_sun = normalize(vec3(0.7, 0.2, 0.6)); 46 | vec3 shading = max(0.0, dot(normal, fake_sun)) * diffuse; 47 | shading += vec3(0.07, 0.07, 0.1); 48 | 49 | 50 | 51 | color = vec4(shading, 1.0); 52 | } 53 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/terrain.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | // This is the default terrain vertex shader. Most of the time you can just copy 4 | // this and reuse it, and just modify the fragment shader. 5 | 6 | in vec4 p3d_Vertex; 7 | uniform mat4 p3d_ModelViewProjectionMatrix; 8 | uniform mat4 p3d_ModelMatrix; 9 | 10 | uniform struct { 11 | sampler2D data_texture; 12 | sampler2D heightfield; 13 | int view_index; 14 | int terrain_size; 15 | int chunk_size; 16 | } ShaderTerrainMesh; 17 | 18 | out vec2 terrain_uv; 19 | out vec3 vtx_pos; 20 | 21 | void main() { 22 | 23 | // Terrain data has the layout: 24 | // x: x-pos, y: y-pos, z: size, w: clod 25 | vec4 terrain_data = texelFetch(ShaderTerrainMesh.data_texture, 26 | ivec2(gl_InstanceID, ShaderTerrainMesh.view_index), 0); 27 | 28 | // Get initial chunk position in the (0, 0, 0), (1, 1, 0) range 29 | vec3 chunk_position = p3d_Vertex.xyz; 30 | 31 | // CLOD implementation 32 | float clod_factor = smoothstep(0, 1, terrain_data.w); 33 | chunk_position.xy -= clod_factor * fract(chunk_position.xy * ShaderTerrainMesh.chunk_size / 2.0) 34 | * 2.0 / ShaderTerrainMesh.chunk_size; 35 | 36 | // Scale the chunk 37 | chunk_position *= terrain_data.z * float(ShaderTerrainMesh.chunk_size) 38 | / float(ShaderTerrainMesh.terrain_size); 39 | chunk_position.z *= ShaderTerrainMesh.chunk_size; 40 | 41 | // Offset the chunk, it is important that this happens after the scale 42 | chunk_position.xy += terrain_data.xy / float(ShaderTerrainMesh.terrain_size); 43 | 44 | // Compute the terrain UV coordinates 45 | terrain_uv = chunk_position.xy; 46 | 47 | // Sample the heightfield and offset the terrain - we do not need to multiply 48 | // the height with anything since the terrain transform is included in the 49 | // model view projection matrix. 50 | chunk_position.z += texture(ShaderTerrainMesh.heightfield, terrain_uv).x; 51 | gl_Position = p3d_ModelViewProjectionMatrix * vec4(chunk_position, 1); 52 | 53 | // Output the vertex world space position - in this case we use this to render 54 | // the fog. 55 | // vtx_pos = (p3d_ModelMatrix * vec4(chunk_position, 1)).xyz; 56 | } 57 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/test/__init__.py: -------------------------------------------------------------------------------- 1 | # import qgis libs so that ve set the correct sip api version 2 | import qgis # pylint: disable=W0611 # NOQA -------------------------------------------------------------------------------- /Video_UAV_Tracker/test/__pycache__/qgis_interface.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/test/__pycache__/qgis_interface.cpython-39.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/test/__pycache__/test_VideoGis_dockwidget.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/test/__pycache__/test_VideoGis_dockwidget.cpython-39.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/test/__pycache__/test_init.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/test/__pycache__/test_init.cpython-39.pyc -------------------------------------------------------------------------------- /Video_UAV_Tracker/test/qgis_interface.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | """QGIS plugin implementation. 3 | 4 | .. note:: This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | .. note:: This source code was copied from the 'postgis viewer' application 10 | with original authors: 11 | Copyright (c) 2010 by Ivan Mincik, ivan.mincik@gista.sk 12 | Copyright (c) 2011 German Carrillo, geotux_tuxman@linuxmail.org 13 | Copyright (c) 2014 Tim Sutton, tim@linfiniti.com 14 | 15 | """ 16 | 17 | __author__ = 'tim@linfiniti.com' 18 | __revision__ = '$Format:%H$' 19 | __date__ = '10/01/2011' 20 | __copyright__ = ( 21 | 'Copyright (c) 2010 by Ivan Mincik, ivan.mincik@gista.sk and ' 22 | 'Copyright (c) 2011 German Carrillo, geotux_tuxman@linuxmail.org' 23 | 'Copyright (c) 2014 Tim Sutton, tim@linfiniti.com' 24 | ) 25 | 26 | import logging 27 | from PyQt5.QtCore import QObject, pyqtSlot, pyqtSignal 28 | from qgis.core import QgsMapLayerRegistry 29 | from qgis.gui import QgsMapCanvasLayer 30 | LOGGER = logging.getLogger('QGIS') 31 | 32 | 33 | #noinspection PyMethodMayBeStatic,PyPep8Naming 34 | class QgisInterface(QObject): 35 | """Class to expose QGIS objects and functions to plugins. 36 | 37 | This class is here for enabling us to run unit tests only, 38 | so most methods are simply stubs. 39 | """ 40 | currentLayerChanged = pyqtSignal(QgsMapCanvasLayer) 41 | 42 | def __init__(self, canvas): 43 | """Constructor 44 | :param canvas: 45 | """ 46 | QObject.__init__(self) 47 | self.canvas = canvas 48 | # Set up slots so we can mimic the behaviour of QGIS when layers 49 | # are added. 50 | LOGGER.debug('Initialising canvas...') 51 | # noinspection PyArgumentList 52 | QgsMapLayerRegistry.instance().layersAdded.connect(self.addLayers) 53 | # noinspection PyArgumentList 54 | QgsMapLayerRegistry.instance().layerWasAdded.connect(self.addLayer) 55 | # noinspection PyArgumentList 56 | QgsMapLayerRegistry.instance().removeAll.connect(self.removeAllLayers) 57 | 58 | # For processing module 59 | self.destCrs = None 60 | 61 | @pyqtSlot('QStringList') 62 | def addLayers(self, layers): 63 | """Handle layers being added to the registry so they show up in canvas. 64 | 65 | :param layers: list list of map layers that were added 66 | 67 | .. note:: The QgsInterface api does not include this method, 68 | it is added here as a helper to facilitate testing. 69 | """ 70 | #LOGGER.debug('addLayers called on qgis_interface') 71 | #LOGGER.debug('Number of layers being added: %s' % len(layers)) 72 | #LOGGER.debug('Layer Count Before: %s' % len(self.canvas.layers())) 73 | current_layers = self.canvas.layers() 74 | final_layers = [] 75 | for layer in current_layers: 76 | final_layers.append(QgsMapCanvasLayer(layer)) 77 | for layer in layers: 78 | final_layers.append(QgsMapCanvasLayer(layer)) 79 | 80 | self.canvas.setLayerSet(final_layers) 81 | #LOGGER.debug('Layer Count After: %s' % len(self.canvas.layers())) 82 | 83 | @pyqtSlot('QgsMapLayer') 84 | def addLayer(self, layer): 85 | """Handle a layer being added to the registry so it shows up in canvas. 86 | 87 | :param layer: list list of map layers that were added 88 | 89 | .. note: The QgsInterface api does not include this method, it is added 90 | here as a helper to facilitate testing. 91 | 92 | .. note: The addLayer method was deprecated in QGIS 1.8 so you should 93 | not need this method much. 94 | """ 95 | pass 96 | 97 | @pyqtSlot() 98 | def removeAllLayers(self): 99 | """Remove layers from the canvas before they get deleted.""" 100 | self.canvas.setLayerSet([]) 101 | 102 | def newProject(self): 103 | """Create new project.""" 104 | # noinspection PyArgumentList 105 | QgsMapLayerRegistry.instance().removeAllMapLayers() 106 | 107 | # ---------------- API Mock for QgsInterface follows ------------------- 108 | 109 | def zoomFull(self): 110 | """Zoom to the map full extent.""" 111 | pass 112 | 113 | def zoomToPrevious(self): 114 | """Zoom to previous view extent.""" 115 | pass 116 | 117 | def zoomToNext(self): 118 | """Zoom to next view extent.""" 119 | pass 120 | 121 | def zoomToActiveLayer(self): 122 | """Zoom to extent of active layer.""" 123 | pass 124 | 125 | def addVectorLayer(self, path, base_name, provider_key): 126 | """Add a vector layer. 127 | 128 | :param path: Path to layer. 129 | :type path: str 130 | 131 | :param base_name: Base name for layer. 132 | :type base_name: str 133 | 134 | :param provider_key: Provider key e.g. 'ogr' 135 | :type provider_key: str 136 | """ 137 | pass 138 | 139 | def addRasterLayer(self, path, base_name): 140 | """Add a raster layer given a raster layer file name 141 | 142 | :param path: Path to layer. 143 | :type path: str 144 | 145 | :param base_name: Base name for layer. 146 | :type base_name: str 147 | """ 148 | pass 149 | 150 | def activeLayer(self): 151 | """Get pointer to the active layer (layer selected in the legend).""" 152 | # noinspection PyArgumentList 153 | layers = QgsMapLayerRegistry.instance().mapLayers() 154 | for item in layers: 155 | return layers[item] 156 | 157 | def addToolBarIcon(self, action): 158 | """Add an icon to the plugins toolbar. 159 | 160 | :param action: Action to add to the toolbar. 161 | :type action: QAction 162 | """ 163 | pass 164 | 165 | def removeToolBarIcon(self, action): 166 | """Remove an action (icon) from the plugin toolbar. 167 | 168 | :param action: Action to add to the toolbar. 169 | :type action: QAction 170 | """ 171 | pass 172 | 173 | def addToolBar(self, name): 174 | """Add toolbar with specified name. 175 | 176 | :param name: Name for the toolbar. 177 | :type name: str 178 | """ 179 | pass 180 | 181 | def mapCanvas(self): 182 | """Return a pointer to the map canvas.""" 183 | return self.canvas 184 | 185 | def mainWindow(self): 186 | """Return a pointer to the main window. 187 | 188 | In case of QGIS it returns an instance of QgisApp. 189 | """ 190 | pass 191 | 192 | def addDockWidget(self, area, dock_widget): 193 | """Add a dock widget to the main window. 194 | 195 | :param area: Where in the ui the dock should be placed. 196 | :type area: 197 | 198 | :param dock_widget: A dock widget to add to the UI. 199 | :type dock_widget: QDockWidget 200 | """ 201 | pass 202 | 203 | def legendInterface(self): 204 | """Get the legend.""" 205 | return self.canvas 206 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/test/tenbytenraster.asc: -------------------------------------------------------------------------------- 1 | NCOLS 10 2 | NROWS 10 3 | XLLCENTER 1535380.000000 4 | YLLCENTER 5083260.000000 5 | DX 10 6 | DY 10 7 | NODATA_VALUE -9999 8 | 0 1 2 3 4 5 6 7 8 9 9 | 0 1 2 3 4 5 6 7 8 9 10 | 0 1 2 3 4 5 6 7 8 9 11 | 0 1 2 3 4 5 6 7 8 9 12 | 0 1 2 3 4 5 6 7 8 9 13 | 0 1 2 3 4 5 6 7 8 9 14 | 0 1 2 3 4 5 6 7 8 9 15 | 0 1 2 3 4 5 6 7 8 9 16 | 0 1 2 3 4 5 6 7 8 9 17 | 0 1 2 3 4 5 6 7 8 9 18 | CRS 19 | NOTES 20 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/test/tenbytenraster.asc.aux.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Point 4 | 5 | 6 | 7 | 9 8 | 4.5 9 | 0 10 | 2.872281323269 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/test/tenbytenraster.keywords: -------------------------------------------------------------------------------- 1 | title: Tenbytenraster 2 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/test/tenbytenraster.lic: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tim Sutton, Linfiniti Consulting CC 5 | 6 | 7 | 8 | tenbytenraster.asc 9 | 2700044251 10 | Yes 11 | Tim Sutton 12 | Tim Sutton (QGIS Source Tree) 13 | Tim Sutton 14 | This data is publicly available from QGIS Source Tree. The original 15 | file was created and contributed to QGIS by Tim Sutton. 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/test/tenbytenraster.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /Video_UAV_Tracker/test/tenbytenraster.qml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 0 26 | 27 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/test/test_VideoGis_dockwidget.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | """DockWidget test. 3 | 4 | .. note:: This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | """ 10 | 11 | __author__ = 'sagost@katamail.com' 12 | __date__ = '2017-02-13' 13 | __copyright__ = 'Copyright 2017, Salvatore Agosta' 14 | 15 | import unittest 16 | 17 | from PyQt5.QtGui import QDockWidget 18 | 19 | from VideoGis_dockwidget import VideoGisDockWidget 20 | 21 | from utilities import get_qgis_app 22 | 23 | QGIS_APP = get_qgis_app() 24 | 25 | 26 | class VideoGisDockWidgetTest(unittest.TestCase): 27 | """Test dockwidget works.""" 28 | 29 | def setUp(self): 30 | """Runs before each test.""" 31 | self.dockwidget = VideoGisDockWidget(None) 32 | 33 | def tearDown(self): 34 | """Runs after each test.""" 35 | self.dockwidget = None 36 | 37 | def test_dockwidget_ok(self): 38 | """Test we can click OK.""" 39 | pass 40 | 41 | if __name__ == "__main__": 42 | suite = unittest.makeSuite(VideoGisDialogTest) 43 | runner = unittest.TextTestRunner(verbosity=2) 44 | runner.run(suite) 45 | 46 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/test/test_init.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | """Tests QGIS plugin init.""" 3 | 4 | __author__ = 'Tim Sutton ' 5 | __revision__ = '$Format:%H$' 6 | __date__ = '17/10/2010' 7 | __license__ = "GPL" 8 | __copyright__ = 'Copyright 2012, Australia Indonesia Facility for ' 9 | __copyright__ += 'Disaster Reduction' 10 | 11 | import os 12 | import unittest 13 | import logging 14 | import configparser 15 | 16 | LOGGER = logging.getLogger('QGIS') 17 | 18 | 19 | class TestInit(unittest.TestCase): 20 | """Test that the plugin init is usable for QGIS. 21 | 22 | Based heavily on the validator class by Alessandro 23 | Passoti available here: 24 | 25 | http://github.com/qgis/qgis-django/blob/master/qgis-app/ 26 | plugins/validator.py 27 | 28 | """ 29 | 30 | def test_read_init(self): 31 | """Test that the plugin __init__ will validate on plugins.qgis.org.""" 32 | 33 | # You should update this list according to the latest in 34 | # https://github.com/qgis/qgis-django/blob/master/qgis-app/ 35 | # plugins/validator.py 36 | 37 | required_metadata = [ 38 | 'name', 39 | 'description', 40 | 'version', 41 | 'qgisMinimumVersion', 42 | 'email', 43 | 'author'] 44 | 45 | file_path = os.path.abspath(os.path.join( 46 | os.path.dirname(__file__), os.pardir, 47 | 'metadata.txt')) 48 | LOGGER.info(file_path) 49 | metadata = [] 50 | parser = configparser.ConfigParser() 51 | parser.optionxform = str 52 | parser.read(file_path) 53 | message = 'Cannot find a section named "general" in %s' % file_path 54 | assert parser.has_section('general'), message 55 | metadata.extend(parser.items('general')) 56 | 57 | for expectation in required_metadata: 58 | message = ('Cannot find metadata "%s" in metadata source (%s).' % ( 59 | expectation, file_path)) 60 | 61 | self.assertIn(expectation, dict(metadata), message) 62 | 63 | if __name__ == '__main__': 64 | unittest.main() 65 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/test/test_qgis_environment.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | """Tests for QGIS functionality. 3 | 4 | 5 | .. note:: This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | """ 11 | __author__ = 'tim@linfiniti.com' 12 | __date__ = '20/01/2011' 13 | __copyright__ = ('Copyright 2012, Australia Indonesia Facility for ' 14 | 'Disaster Reduction') 15 | 16 | import os 17 | import unittest 18 | from qgis.core import ( 19 | QgsProviderRegistry, 20 | QgsCoordinateReferenceSystem, 21 | QgsRasterLayer) 22 | 23 | from .utilities import get_qgis_app 24 | QGIS_APP = get_qgis_app() 25 | 26 | 27 | class QGISTest(unittest.TestCase): 28 | """Test the QGIS Environment""" 29 | 30 | def test_qgis_environment(self): 31 | """QGIS environment has the expected providers""" 32 | 33 | r = QgsProviderRegistry.instance() 34 | self.assertIn('gdal', r.providerList()) 35 | self.assertIn('ogr', r.providerList()) 36 | self.assertIn('postgres', r.providerList()) 37 | 38 | def test_projection(self): 39 | """Test that QGIS properly parses a wkt string. 40 | """ 41 | crs = QgsCoordinateReferenceSystem() 42 | wkt = ( 43 | 'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",' 44 | 'SPHEROID["WGS_1984",6378137.0,298.257223563]],' 45 | 'PRIMEM["Greenwich",0.0],UNIT["Degree",' 46 | '0.0174532925199433]]') 47 | crs.createFromWkt(wkt) 48 | auth_id = crs.authid() 49 | expected_auth_id = 'EPSG:4326' 50 | self.assertEqual(auth_id, expected_auth_id) 51 | 52 | # now test for a loaded layer 53 | path = os.path.join(os.path.dirname(__file__), 'tenbytenraster.asc') 54 | title = 'TestRaster' 55 | layer = QgsRasterLayer(path, title) 56 | auth_id = layer.crs().authid() 57 | self.assertEqual(auth_id, expected_auth_id) 58 | 59 | if __name__ == '__main__': 60 | unittest.main() 61 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/test/test_resources.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | """Resources test. 3 | 4 | .. note:: This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | """ 10 | 11 | __author__ = 'sagost@katamail.com' 12 | __date__ = '2017-02-13' 13 | __copyright__ = 'Copyright 2017, Salvatore Agosta' 14 | 15 | import unittest 16 | 17 | from PyQt5.QtGui import QIcon 18 | 19 | 20 | 21 | class VideoGisDialogTest(unittest.TestCase): 22 | """Test rerources work.""" 23 | 24 | def setUp(self): 25 | """Runs before each test.""" 26 | pass 27 | 28 | def tearDown(self): 29 | """Runs after each test.""" 30 | pass 31 | 32 | def test_icon_png(self): 33 | """Test we can click OK.""" 34 | path = ':/plugins/VideoGis/icon.png' 35 | icon = QIcon(path) 36 | self.assertFalse(icon.isNull()) 37 | 38 | if __name__ == "__main__": 39 | suite = unittest.makeSuite(VideoGisResourcesTest) 40 | runner = unittest.TextTestRunner(verbosity=2) 41 | runner.run(suite) 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/test/test_translations.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | """Safe Translations Test. 3 | 4 | .. note:: This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | """ 10 | from .utilities import get_qgis_app 11 | 12 | __author__ = 'ismailsunni@yahoo.co.id' 13 | __date__ = '12/10/2011' 14 | __copyright__ = ('Copyright 2012, Australia Indonesia Facility for ' 15 | 'Disaster Reduction') 16 | import unittest 17 | import os 18 | 19 | from PyQt5.QtCore import QCoreApplication, QTranslator 20 | 21 | QGIS_APP = get_qgis_app() 22 | 23 | 24 | class SafeTranslationsTest(unittest.TestCase): 25 | """Test translations work.""" 26 | 27 | def setUp(self): 28 | """Runs before each test.""" 29 | if 'LANG' in iter(os.environ.keys()): 30 | os.environ.__delitem__('LANG') 31 | 32 | def tearDown(self): 33 | """Runs after each test.""" 34 | if 'LANG' in iter(os.environ.keys()): 35 | os.environ.__delitem__('LANG') 36 | 37 | def test_qgis_translations(self): 38 | """Test that translations work.""" 39 | parent_path = os.path.join(__file__, os.path.pardir, os.path.pardir) 40 | dir_path = os.path.abspath(parent_path) 41 | file_path = os.path.join( 42 | dir_path, 'i18n', 'af.qm') 43 | translator = QTranslator() 44 | translator.load(file_path) 45 | QCoreApplication.installTranslator(translator) 46 | 47 | expected_message = 'Goeie more' 48 | real_message = QCoreApplication.translate("@default", 'Good morning') 49 | self.assertEqual(real_message, expected_message) 50 | 51 | 52 | if __name__ == "__main__": 53 | suite = unittest.makeSuite(SafeTranslationsTest) 54 | runner = unittest.TextTestRunner(verbosity=2) 55 | runner.run(suite) 56 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/test/utilities.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | """Common functionality used by regression tests.""" 3 | 4 | import sys 5 | import logging 6 | 7 | 8 | LOGGER = logging.getLogger('QGIS') 9 | QGIS_APP = None # Static variable used to hold hand to running QGIS app 10 | CANVAS = None 11 | PARENT = None 12 | IFACE = None 13 | 14 | 15 | def get_qgis_app(): 16 | """ Start one QGIS application to test against. 17 | 18 | :returns: Handle to QGIS app, canvas, iface and parent. If there are any 19 | errors the tuple members will be returned as None. 20 | :rtype: (QgsApplication, CANVAS, IFACE, PARENT) 21 | 22 | If QGIS is already running the handle to that app will be returned. 23 | """ 24 | 25 | try: 26 | from PyQt5 import QtGui, QtCore 27 | from qgis.core import QgsApplication 28 | from qgis.gui import QgsMapCanvas 29 | from .qgis_interface import QgisInterface 30 | except ImportError: 31 | return None, None, None, None 32 | 33 | global QGIS_APP # pylint: disable=W0603 34 | 35 | if QGIS_APP is None: 36 | gui_flag = True # All test will run qgis in gui mode 37 | #noinspection PyPep8Naming 38 | QGIS_APP = QgsApplication(sys.argv, gui_flag) 39 | # Make sure QGIS_PREFIX_PATH is set in your env if needed! 40 | QGIS_APP.initQgis() 41 | s = QGIS_APP.showSettings() 42 | LOGGER.debug(s) 43 | 44 | global PARENT # pylint: disable=W0603 45 | if PARENT is None: 46 | #noinspection PyPep8Naming 47 | PARENT = QtGui.QWidget() 48 | 49 | global CANVAS # pylint: disable=W0603 50 | if CANVAS is None: 51 | #noinspection PyPep8Naming 52 | CANVAS = QgsMapCanvas(PARENT) 53 | CANVAS.resize(QtCore.QSize(400, 400)) 54 | 55 | global IFACE # pylint: disable=W0603 56 | if IFACE is None: 57 | # QgisInterface is a stub implementation of the QGIS plugin interface 58 | #noinspection PyPep8Naming 59 | IFACE = QgisInterface(CANVAS) 60 | 61 | return QGIS_APP, CANVAS, IFACE, PARENT 62 | -------------------------------------------------------------------------------- /Video_UAV_Tracker/vut_newproject.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ''' 3 | Video Uav Tracker v 2.1 (3D) 4 | 5 | Replay a video in sync with a gps track displayed on the map. 6 | 7 | 8 | ------------------- 9 | copyright : (C) 2017 by Salvatore Agosta 10 | email : sagost@katamail.com 11 | 12 | 13 | This program is free software; you can redistribute it and/or modify 14 | it under the terms of the GNU General Public License as published by 15 | the Free Software Foundation; either version 2 of the License, or 16 | (at your option) any later version. 17 | 18 | 19 | INSTRUCTION: 20 | 21 | ATTENTION: 3D IS NOT TESTED ON WINDOWS PLATFORM 22 | - Pixel value query need a .npz archive containing one array data for every frame, it must be named as 'VideoFile.npz' and be in the same folder of 'VideoFile.mp4' 23 | - for 3d options install numpy,panda3d and pypng python3 modules 24 | - Download all files from https://github.com/sagost/Video_UAV_Tracker-3D/Video_UAV_Tracker/FFMPEG and copy them in your Video_Uav_Tracker/FFMPEG folder 25 | 26 | Syncing: 27 | - Create new project 28 | - Select video and .gpx track (1 trkpt per second) 29 | - Create associated shapefile 30 | - Manage 3d options (select dem and image with same extension and cartographic projection) 31 | - Identify first couple Frame/GpsTime and select it. 32 | - Push Synchronize 33 | - Push Start 34 | 35 | Replay: 36 | - Move on map 37 | - Create associated DB shapefile 38 | - Add POI with associated video frame saved 39 | - Add POI directly from video sceen if 3D is active 40 | - Create direct georeferenced mosaic if 3D is active 41 | - Extract frames with associated coordinates for rapid photogrammetry use 42 | ''' 43 | 44 | 45 | import sys 46 | import os 47 | from PyQt5 import QtCore, QtGui, QtWidgets 48 | from PyQt5.QtMultimediaWidgets import QVideoWidget 49 | 50 | import resources 51 | 52 | class Ui_NewProject(object): 53 | def setupUi(self, NewProject): 54 | NewProject.setObjectName("NewProject") 55 | NewProject.resize(736, 625) 56 | icon = QtGui.QIcon() 57 | icon.addPixmap(QtGui.QPixmap(":/plugins/VideoGis/icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 58 | NewProject.setWindowIcon(icon) 59 | self.gridLayout_2 = QtWidgets.QGridLayout(NewProject) 60 | self.gridLayout_2.setObjectName("gridLayout_2") 61 | self.gridLayout = QtWidgets.QGridLayout() 62 | self.gridLayout.setObjectName("gridLayout") 63 | self.horizontalLayout = QtWidgets.QHBoxLayout() 64 | self.horizontalLayout.setObjectName("horizontalLayout") 65 | self.video_frame_2 = QVideoWidget(NewProject) 66 | p = self.video_frame_2.palette() 67 | p.setColor(QtGui.QPalette.Window, QtCore.Qt.black) 68 | self.video_frame_2.setPalette(p) 69 | self.video_frame_2.setAttribute(QtCore.Qt.WA_OpaquePaintEvent) 70 | sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) 71 | sizePolicy.setHorizontalStretch(0) 72 | sizePolicy.setVerticalStretch(0) 73 | sizePolicy.setHeightForWidth(self.video_frame_2.sizePolicy().hasHeightForWidth()) 74 | self.video_frame_2.setSizePolicy(sizePolicy) 75 | self.video_frame_2.setStyleSheet("background-color: rgb(0, 0, 10);") 76 | self.video_frame_2.setObjectName("video_frame_2") 77 | 78 | # self.scroll = QtWidgets.QScrollArea()#+ 79 | # self.scroll.setWidget(self.video_frame_2)#+ 80 | # self.video_frame_2.setGeometry(0,0,736,625) 81 | # self.horizontalLayout.addWidget(self.scroll) 82 | 83 | self.horizontalLayout.addWidget(self.video_frame_2) 84 | 85 | 86 | 87 | 88 | 89 | self.gridLayout.addLayout(self.horizontalLayout, 0, 0, 1, 16) 90 | self.horizontalSlider = QtWidgets.QSlider(NewProject) 91 | self.horizontalSlider.setOrientation(QtCore.Qt.Horizontal) 92 | self.horizontalSlider.setObjectName("horizontalSlider") 93 | self.gridLayout.addWidget(self.horizontalSlider, 1, 0, 1, 16) 94 | self.replayPlay_pushButton = QtWidgets.QPushButton(NewProject) 95 | sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) 96 | sizePolicy.setHorizontalStretch(0) 97 | sizePolicy.setVerticalStretch(0) 98 | sizePolicy.setHeightForWidth(self.replayPlay_pushButton.sizePolicy().hasHeightForWidth()) 99 | self.replayPlay_pushButton.setSizePolicy(sizePolicy) 100 | self.replayPlay_pushButton.setCheckable(False) 101 | self.replayPlay_pushButton.setChecked(False) 102 | self.replayPlay_pushButton.setObjectName("replayPlay_pushButton") 103 | self.gridLayout.addWidget(self.replayPlay_pushButton, 3, 1, 1, 1) 104 | self.replayPosition_label = QtWidgets.QLabel(NewProject) 105 | self.replayPosition_label.setObjectName("replayPosition_label") 106 | self.gridLayout.addWidget(self.replayPosition_label, 3, 4, 1, 1) 107 | self.muteButton = QtWidgets.QToolButton(NewProject) 108 | self.muteButton.setText("") 109 | self.muteButton.setObjectName("muteButton") 110 | self.gridLayout.addWidget(self.muteButton, 3, 2, 1, 1) 111 | self.comboBox = QtWidgets.QComboBox(NewProject) 112 | self.comboBox.setObjectName("comboBox") 113 | self.gridLayout.addWidget(self.comboBox, 3, 15, 1, 1) 114 | self.pushButton_2 = QtWidgets.QPushButton(NewProject) 115 | self.pushButton_2.setObjectName("pushButton_2") 116 | self.gridLayout.addWidget(self.pushButton_2, 3, 13, 1, 1) 117 | self.toolButton_3 = QtWidgets.QToolButton(NewProject) 118 | icon1 = QtGui.QIcon() 119 | icon1.addPixmap(QtGui.QPixmap(":/plugins/VideoGis/mIconFormSelect.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 120 | self.toolButton_3.setIcon(icon1) 121 | self.toolButton_3.setObjectName("toolButton_3") 122 | self.gridLayout.addWidget(self.toolButton_3, 3, 11, 1, 1) 123 | 124 | # << 125 | self.toolButton = QtWidgets.QToolButton(NewProject) 126 | icon5 = QtGui.QIcon() 127 | icon5.addPixmap(QtGui.QPixmap(":/VgisIcon/mActionAtlasPrev.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 128 | self.toolButton.setIcon(icon5) 129 | self.toolButton.setObjectName("toolButton") 130 | self.gridLayout.addWidget(self.toolButton, 3, 6, 1, 1) 131 | 132 | # >> 133 | self.toolButton_2 = QtWidgets.QToolButton(NewProject) 134 | icon2 = QtGui.QIcon() 135 | icon2.addPixmap(QtGui.QPixmap(":/VgisIcon/mActionAtlasNext.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 136 | self.toolButton_2.setIcon(icon2) 137 | self.toolButton_2.setObjectName("toolButton_2") 138 | self.gridLayout.addWidget(self.toolButton_2, 3, 9, 1, 1) 139 | 140 | # <<< 141 | self.toolButton_6 = QtWidgets.QToolButton(NewProject) 142 | icon2 = QtGui.QIcon() 143 | icon2.addPixmap(QtGui.QPixmap(":/VgisIcon/mActionAtlasNext.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 144 | self.toolButton_6.setIcon(icon2) 145 | self.toolButton_6.setObjectName("toolButton_6") 146 | self.gridLayout.addWidget(self.toolButton_6, 3, 5, 1, 1) 147 | 148 | # >>> 149 | self.toolButton_5 = QtWidgets.QToolButton(NewProject) 150 | icon2 = QtGui.QIcon() 151 | icon2.addPixmap(QtGui.QPixmap(":/VgisIcon/mActionAtlasNext.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 152 | self.toolButton_5.setIcon(icon2) 153 | self.toolButton_5.setObjectName("toolButton_5") 154 | self.gridLayout.addWidget(self.toolButton_5, 3, 10, 1, 1) 155 | 156 | # > 157 | self.SkipFortoolButton_8 = QtWidgets.QToolButton(NewProject) 158 | self.SkipFortoolButton_8.setStyleSheet("") 159 | icon3 = QtGui.QIcon() 160 | icon3.addPixmap(QtGui.QPixmap(":/VgisIcon/mActionArrowRight.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 161 | self.SkipFortoolButton_8.setIcon(icon3) 162 | self.SkipFortoolButton_8.setObjectName("SkipFortoolButton_8") 163 | self.gridLayout.addWidget(self.SkipFortoolButton_8, 3, 8, 1, 1) 164 | 165 | self.SkipBacktoolButton_7 = QtWidgets.QToolButton(NewProject) 166 | self.SkipBacktoolButton_7.setStyleSheet("") 167 | icon4 = QtGui.QIcon() 168 | icon4.addPixmap(QtGui.QPixmap(":/VgisIcon/mActionArrowLeft.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 169 | self.SkipBacktoolButton_7.setIcon(icon4) 170 | self.SkipBacktoolButton_7.setObjectName("SkipBacktoolButton_7") 171 | self.gridLayout.addWidget(self.SkipBacktoolButton_7, 3, 7, 1, 1) 172 | 173 | 174 | self.pushButton = QtWidgets.QPushButton(NewProject) 175 | self.pushButton.setObjectName("pushButton") 176 | self.gridLayout.addWidget(self.pushButton, 3, 0, 1, 1) 177 | self.toolButton_4 = QtWidgets.QToolButton(NewProject) 178 | self.toolButton_4.setObjectName("toolButton_4") 179 | self.gridLayout.addWidget(self.toolButton_4, 3, 12, 1, 1) 180 | self.checkBox = QtWidgets.QCheckBox(NewProject) 181 | self.checkBox.setObjectName("checkBox") 182 | self.gridLayout.addWidget(self.checkBox, 3, 14, 1, 1) 183 | self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1) 184 | 185 | self.retranslateUi(NewProject) 186 | QtCore.QMetaObject.connectSlotsByName(NewProject) 187 | 188 | def retranslateUi(self, NewProject): 189 | _translate = QtCore.QCoreApplication.translate 190 | NewProject.setWindowTitle(_translate("NewProject", "Video UAV Tracker - New Project")) 191 | self.replayPlay_pushButton.setText(_translate("NewProject", "Play/Pause")) 192 | self.replayPosition_label.setText(_translate("NewProject", "-:- / -:-")) 193 | self.pushButton_2.setToolTip(_translate("NewProject", "

Synchronize actual video frame with selected GPS time

")) 194 | self.comboBox.setToolTip(_translate("NewProject", "

GPS time

")) 195 | self.pushButton_2.setText(_translate("NewProject", "Synchronize!")) 196 | self.toolButton_3.setToolTip(_translate("NewProject", "

Add point shape database to project

")) 197 | #self.toolButton_3.setText(_translate("NewProject", "DB")) 198 | 199 | self.toolButton_2.setToolTip(_translate("NewProject", "

Next second

")) 200 | self.toolButton_2.setText(_translate("NewProject", ">>")) 201 | 202 | self.toolButton_6.setToolTip(_translate("NewProject", "

Previous 1min

")) 203 | self.toolButton_6.setText(_translate("NewProject", "<<<")) 204 | 205 | self.toolButton_5.setToolTip(_translate("NewProject", "

Next 1min

")) 206 | self.toolButton_5.setText(_translate("NewProject", ">>>")) 207 | 208 | self.SkipFortoolButton_8.setToolTip(_translate("NewProject", "

Next frame

")) 209 | self.SkipFortoolButton_8.setText(_translate("NewProject", ">")) 210 | self.SkipBacktoolButton_7.setToolTip(_translate("NewProject", "

Previous frame

")) 211 | self.SkipBacktoolButton_7.setText(_translate("NewProject", "<")) 212 | self.toolButton.setToolTip(_translate("NewProject", "

Previous second

")) 213 | self.toolButton.setText(_translate("NewProject", "<<")) 214 | self.pushButton.setToolTip(_translate("NewProject", "

Select video and relative gpx

")) 215 | self.pushButton.setText(_translate("NewProject", "Select Video and GPX")) 216 | self.toolButton_4.setText(_translate("NewProject", "3D")) 217 | self.checkBox.setToolTip(_translate("NewProject","

Activate Pixel value conversion and display (see README)

")) -------------------------------------------------------------------------------- /Video_UAV_Tracker/vut_newproject.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | NewProject 4 | 5 | 6 | 7 | 0 8 | 0 9 | 912 10 | 458 11 | 12 | 13 | 14 | VUT 3D - New Project 15 | 16 | 17 | 18 | :/plugins/VideoGis/icon.png:/plugins/VideoGis/icon.png 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 0 30 | 0 31 | 32 | 33 | 34 | background-color: rgb(0, 0, 0); 35 | 36 | 37 | 38 | 39 | 0 40 | 0 41 | 891 42 | 381 43 | 44 | 45 | 46 | true 47 | 48 | 49 | 50 | 51 | 0 52 | 0 53 | 889 54 | 379 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | Qt::Horizontal 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 0 75 | 0 76 | 77 | 78 | 79 | Play/Pause 80 | 81 | 82 | false 83 | 84 | 85 | false 86 | 87 | 88 | 89 | 90 | 91 | 92 | -:- / -:- 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | <html><head/><body><p>Synchronize actual video frame with selected GPS time</p></body></html> 110 | 111 | 112 | Synchronize! 113 | 114 | 115 | 116 | 117 | 118 | 119 | <html><head/><body><p>Add point shape database to project</p></body></html> 120 | 121 | 122 | DB 123 | 124 | 125 | 126 | :/plugins/VideoGis/mIconFormSelect.svg:/plugins/VideoGis/mIconFormSelect.svg 127 | 128 | 129 | 130 | 131 | 132 | 133 | <html><head/><body><p>Next 10sec</p></body></html> 134 | 135 | 136 | >> 137 | 138 | 139 | 140 | :/VgisIcon/mActionAtlasNext.svg:/VgisIcon/mActionAtlasNext.svg 141 | 142 | 143 | 144 | 145 | 146 | 147 | <html><head/><body><p>Next 5sec</p></body></html> 148 | 149 | 150 | 151 | 152 | 153 | > 154 | 155 | 156 | 157 | :/VgisIcon/mActionArrowRight.svg:/VgisIcon/mActionArrowRight.svg 158 | 159 | 160 | 161 | 162 | 163 | 164 | <html><head/><body><p>Previous 5sec</p></body></html> 165 | 166 | 167 | 168 | 169 | 170 | < 171 | 172 | 173 | 174 | :/VgisIcon/mActionArrowLeft.svg:/VgisIcon/mActionArrowLeft.svg 175 | 176 | 177 | 178 | 179 | 180 | 181 | <html><head/><body><p>Previous 10sec</p></body></html> 182 | 183 | 184 | << 185 | 186 | 187 | 188 | :/VgisIcon/mActionAtlasPrev.svg:/VgisIcon/mActionAtlasPrev.svg 189 | 190 | 191 | 192 | 193 | 194 | 195 | <html><head/><body><p>Select video and relative gpx</p></body></html> 196 | 197 | 198 | Select Video and GPX 199 | 200 | 201 | 202 | 203 | 204 | 205 | 3D 206 | 207 | 208 | 209 | 210 | 211 | 212 | <html><head/><body><p>Activate Pixel value conversion and display (see README)</p></body></html> 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | <html><head/><body><p>Next 60min</p></body></html> 223 | 224 | 225 | >>> 226 | 227 | 228 | 229 | 230 | 231 | 232 | <html><head/><body><p>Previous 60min</p></body></html> 233 | 234 | 235 | <<< 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | --------------------------------------------------------------------------------