From 8eea8786c8b03d626916aa1360ac911733c3f88d Mon Sep 17 00:00:00 2001 From: Yossi Date: Tue, 31 May 2016 08:52:26 +0300 Subject: [PATCH] Added run w/ GPS file --- .DS_Store | Bin 10244 -> 10244 bytes .gitignore | 1 + mainGPS.py | 33 +++++++++++++++++++++++++++++++++ modules/.DS_Store | Bin 6148 -> 6148 bytes modules/video/.DS_Store | Bin 10244 -> 10244 bytes training/.DS_Store | Bin 14340 -> 14340 bytes 6 files changed, 34 insertions(+) create mode 100644 mainGPS.py diff --git a/.DS_Store b/.DS_Store index c314f8e0555b69d4342bfd38eb685d17847fea8f..aeb605120b13b582dabb26ea6d6b2c5ba0d881b2 100644 GIT binary patch delta 216 zcmZn(XbIS`O`OBb(n3eU$kKH4KJh6`ldT0ea2T4KfkX@^?-N&=EGncr*@TNhv9r$%!Ijlh;Zgla3eQFV4s>_e{>u3n)r0%Sg(Qc7}iqKMe! z_0q?rBQlfo^MW(0QsV{qi!<`eJ%QYSqSUg?)bhy_WYi{?i3(YAGH@_xGdME%GK4W? zGgL85WSGmao?$n`35L52?-_nFvNH-WDluv^nlRcj+B14EdNO)51~3LPMom5`stmGq VvxDq$rilf-o7olCvm?974FJRCGr<4= diff --git a/.gitignore b/.gitignore index 0d20b64..08334e3 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ *.pyc +wGPS \ No newline at end of file diff --git a/mainGPS.py b/mainGPS.py new file mode 100644 index 0000000..dfbc952 --- /dev/null +++ b/mainGPS.py @@ -0,0 +1,33 @@ +import cv2 +from classes import frameAnalyzer +from config import * +from classes.capture import capture +from classes.gps import GPS +import time + +# # load image +# image = cv2.imread('training/set6/1.png') +# frameAnalyzer.analyze_frame(image, True, False, True) + + +# load video file +filename = '1464525240' + + +gps = GPS() +cap = cv2.VideoCapture(PARENT_DIR + "/training/wGPS/clip/"+filename+".avi") +capture = capture(int(cap.get(3)), int(cap.get(4))) +start = time.clock() +c = 0 +while True: + # if c >0: + # cv2.waitKey(0) + c +=1 + # # print c + if cap.grab(): + gps.updateSystemPositionData(int(time.clock() - start), filename) + + flag, frame = cap.retrieve() + + frameAnalyzer.analyze_frame(frame, True, True) + diff --git a/modules/.DS_Store b/modules/.DS_Store index 8df568f85f00a1ede9a9fc7cecffa95d1ec88ad6..1c9d148818e989c60dad5113802f0e4a31e15b99 100644 GIT binary patch delta 50 zcmZoMXffEJ%fcu;S&!v7hnb~?j)IY;>EypG&l!a#KV?15VQgRw5;6x0xo`f@#wrK^ De@YLK delta 50 wcmZoMXffEJ%fiSzS&!v7hmo0?j)I|u(d54@&l&k9KV?0QEablVKO3tc0DM#rc>n+a diff --git a/modules/video/.DS_Store b/modules/video/.DS_Store index f73db639a6e622459330f976d4a977e963ab0e7e..18c66e734754ea5f44dfc89b9852fa8809e9a17e 100644 GIT binary patch delta 81 zcmZn(XbIS$FTkif*+AeVhp~aNj)IY;`DRAJ9ZZb+lXnRphl@>S6m;KwL1ZQqqu%5! P@zbc{EfP=pz~Zw2rM?#v delta 81 zcmZn(XbIS$FTkii*+AeVhmo0?j)I|u(Pl=$9ZZaxlXnRphl@>S6m;KwL1ZQqqsHVc P@zbc{EfP=pz~Zw2qU{#` diff --git a/training/.DS_Store b/training/.DS_Store index 7f25da78a89559f134e69fcc0f0b29ceed19f02f..fc1c2256f54eef37c28e34fd26bf9c2d81ce8290 100644 GIT binary patch delta 564 zcmZoEXepTB&uG3eU^hRb{A3;hRmS4UMgpffj17!+6pSp*Co?L#Z}t&vWM?k<|9`Tf zl-T5F5<5|3C%==t#8^7{pcJa6$+x8^8L}{xGq^JZFa&$%TPvOFbDv#3j+hA zHxQTq{}1FbFu>JKKB&5z!_eFeWVa#EZl%e~)YRFbhD;7r6pe?7F7&YboC|71fcvB}RQc5)aR znd>MRn_Em~RCJ&GPVy3C!Q_KdV6~HPOHbNtAa|Q_