From 9589193bda3f7f85aa2a65f7fc28c84e71443cdc Mon Sep 17 00:00:00 2001 From: orichcasperkevin Date: Tue, 7 Nov 2023 10:40:24 +0000 Subject: [PATCH] convert to python3 --- linux/osmbundler/__init__.py | 46 +++++++++--------- .../__pycache__/__init__.cpython-310.pyc | Bin 0 -> 10977 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 11032 bytes .../__pycache__/defaults.cpython-310.pyc | Bin 0 -> 527 bytes .../__pycache__/defaults.cpython-38.pyc | Bin 0 -> 525 bytes .../__pycache__/__init__.cpython-310.pyc | Bin 0 -> 214 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 212 bytes .../__pycache__/extractor.cpython-310.pyc | Bin 0 -> 614 bytes .../__pycache__/extractor.cpython-38.pyc | Bin 0 -> 616 bytes .../features/__pycache__/sift.cpython-310.pyc | Bin 0 -> 933 bytes .../features/__pycache__/sift.cpython-38.pyc | Bin 0 -> 929 bytes .../__pycache__/siftlowe.cpython-310.pyc | Bin 0 -> 1141 bytes .../__pycache__/siftlowe.cpython-38.pyc | Bin 0 -> 1133 bytes .../__pycache__/siftvlfeat.cpython-310.pyc | Bin 0 -> 1505 bytes .../__pycache__/siftvlfeat.cpython-38.pyc | Bin 0 -> 1499 bytes linux/osmbundler/features/sift.py | 2 +- linux/osmbundler/features/siftlowe.py | 4 +- linux/osmbundler/features/siftvlfeat.py | 4 +- .../__pycache__/__init__.cpython-310.pyc | Bin 0 -> 209 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 207 bytes .../__pycache__/bundler.cpython-310.pyc | Bin 0 -> 1118 bytes .../__pycache__/bundler.cpython-38.pyc | Bin 0 -> 1114 bytes .../__pycache__/engine.cpython-310.pyc | Bin 0 -> 643 bytes .../__pycache__/engine.cpython-38.pyc | Bin 0 -> 645 bytes .../__pycache__/manual.cpython-310.pyc | Bin 0 -> 672 bytes .../__pycache__/manual.cpython-38.pyc | Bin 0 -> 674 bytes linux/osmbundler/matching/bundler.py | 2 +- linux/osmbundler/matching/manual.py | 2 +- linux/osmcmvs/__init__.py | 24 ++++----- linux/osmpmvs/__init__.py | 22 ++++----- ppt_gui_start | 4 +- to_jpg.py | 13 +++++ 32 files changed, 69 insertions(+), 54 deletions(-) create mode 100644 linux/osmbundler/__pycache__/__init__.cpython-310.pyc create mode 100644 linux/osmbundler/__pycache__/__init__.cpython-38.pyc create mode 100644 linux/osmbundler/__pycache__/defaults.cpython-310.pyc create mode 100644 linux/osmbundler/__pycache__/defaults.cpython-38.pyc create mode 100644 linux/osmbundler/features/__pycache__/__init__.cpython-310.pyc create mode 100644 linux/osmbundler/features/__pycache__/__init__.cpython-38.pyc create mode 100644 linux/osmbundler/features/__pycache__/extractor.cpython-310.pyc create mode 100644 linux/osmbundler/features/__pycache__/extractor.cpython-38.pyc create mode 100644 linux/osmbundler/features/__pycache__/sift.cpython-310.pyc create mode 100644 linux/osmbundler/features/__pycache__/sift.cpython-38.pyc create mode 100644 linux/osmbundler/features/__pycache__/siftlowe.cpython-310.pyc create mode 100644 linux/osmbundler/features/__pycache__/siftlowe.cpython-38.pyc create mode 100644 linux/osmbundler/features/__pycache__/siftvlfeat.cpython-310.pyc create mode 100644 linux/osmbundler/features/__pycache__/siftvlfeat.cpython-38.pyc create mode 100644 linux/osmbundler/matching/__pycache__/__init__.cpython-310.pyc create mode 100644 linux/osmbundler/matching/__pycache__/__init__.cpython-38.pyc create mode 100644 linux/osmbundler/matching/__pycache__/bundler.cpython-310.pyc create mode 100644 linux/osmbundler/matching/__pycache__/bundler.cpython-38.pyc create mode 100644 linux/osmbundler/matching/__pycache__/engine.cpython-310.pyc create mode 100644 linux/osmbundler/matching/__pycache__/engine.cpython-38.pyc create mode 100644 linux/osmbundler/matching/__pycache__/manual.cpython-310.pyc create mode 100644 linux/osmbundler/matching/__pycache__/manual.cpython-38.pyc create mode 100644 to_jpg.py diff --git a/linux/osmbundler/__init__.py b/linux/osmbundler/__init__.py index 9f0569e..4f48466 100755 --- a/linux/osmbundler/__init__.py +++ b/linux/osmbundler/__init__.py @@ -5,13 +5,13 @@ from PIL import Image from PIL.ExifTags import TAGS -import defaults +from . import defaults -import matching -from matching import * +from . import matching +from .matching import * -import features -from features import * +from . import features +from .features import * # a helper function to get list of photos from a directory def getPhotosFromDirectory(photoDir): @@ -86,7 +86,7 @@ def __init__(self): logging.info("Working directory created: "+self.workDir) if not (os.path.isdir(self.photosArg) or os.path.isfile(self.photosArg)): - raise Exception, "'%s' is neither directory nor a file name" % self.photosArg + raise Exception(f"{self.photosArg} is neither directory nor a file name") # initialize mathing engine based on command line arguments self.initMatchingEngine() @@ -152,7 +152,7 @@ def preparePhotos(self, *kargs, **kwargs): if os.path.isdir(self.photosArg): # directory with images photos = getPhotosFromDirectory(self.photosArg) - if len(photos)<3: raise Exception, "The directory with images should contain at least 3 .jpg photos" + if len(photos)<3: raise Exception("The directory with images should contain at least 3 .jpg photos") for photo in photos: photoInfo = dict(dirname=self.photosArg, basename=photo) self._preparePhoto(photoInfo) @@ -208,8 +208,8 @@ def checkCameraInDatabase(self, photoPath): ccdWidth = self.getCcdWidthFromDatabase(exifMake, exifModel) if ccdWidth==None: while True: - print "Type CCD width in mm for the camera %s, %s. Press Enter to skip the camera." % (exifMake, exifModel) - userInput = raw_input("CCD width in mm: ") + print("Type CCD width in mm for the camera %s, %s. Press Enter to skip the camera." % (exifMake, exifModel)) + userInput = input("CCD width in mm: ") # Enter key was pressed if not userInput: return try: @@ -217,17 +217,17 @@ def checkCameraInDatabase(self, photoPath): if ccdWidth==0: raise ZeroValueException self.dbCursor.execute("insert into cameras(make, model, ccd_width, source) values(?, ?, ?, 2)", (exifMake, exifModel, ccdWidth)) except ZeroValueException: - print "\nCCD width can not be equal to zero." + print("\nCCD width can not be equal to zero.") except ValueError: - print "\nIncorrect value for the CCD width. Please enter CCD width in mm." + print("\nIncorrect value for the CCD width. Please enter CCD width in mm.") except: - print "\nCan not insert CCD width to the database." + print("\nCan not insert CCD width to the database.") else: - print "CCD width %s for the cameras %s,%s has been successively inserted to the database" % (ccdWidth, exifMake, exifModel) + print("CCD width %s for the cameras %s,%s has been successively inserted to the database" % (ccdWidth, exifMake, exifModel)) return - else: - print "Camera is already inserted into the database" - return + else: + print("Camera is already inserted into the database") + return def _preparePhoto(self, photoInfo): photo = photoInfo['basename'] @@ -288,7 +288,7 @@ def _getExif(self, photoHandle): exif = {} info = photoHandle._getexif() if info: - for attr, value in info.items(): + for attr, value in list(info.items()): decodedAttr = TAGS.get(attr, attr) if decodedAttr in exifAttrs: exif[decodedAttr] = value if 'FocalLength' in exif: exif['FocalLength'] = float(exif['FocalLength'][0])/float(exif['FocalLength'][1]) @@ -321,7 +321,7 @@ def initMatchingEngine(self): matchingEngineClass = getattr(matchingEngine, matchingEngine.className) self.matchingEngine = matchingEngineClass(os.path.join(distrPath, "software")) except: - raise Exception, "Unable initialize matching engine %s" % self.featureExtractor + raise Exception("Unable initialize matching engine %s" % self.featureExtractor) def initFeatureExtractor(self): try: @@ -329,7 +329,7 @@ def initFeatureExtractor(self): featureExtractorClass = getattr(featureExtractor, featureExtractor.className) self.featureExtractor = featureExtractorClass(os.path.join(distrPath, "software")) except: - raise Exception, "Unable initialize feature extractor %s" % self.featureExtractor + raise Exception("Unable initialize feature extractor %s" % self.featureExtractor) def extractFeatures(self, photo): # let self.featureExtractor do its job @@ -368,12 +368,14 @@ def printHelpExit(self): def openResult(self): if sys.platform == "win32": subprocess.call(["explorer", self.workDir]) - if sys.platform == "linux2": subprocess.call(["xdg-open", self.workDir]) - else: print "Thanks" + if sys.platform == "linux2": + subprocess.call(["xdg-open", self.workDir]) + else: + print("Thanks") def printHelp(self): helpFile = open(os.path.join(distrPath, "osmbundler/help.txt"), "r") - print helpFile.read() + print(helpFile.read()) helpFile.close() # a helper function to get CCD width from sqlite database diff --git a/linux/osmbundler/__pycache__/__init__.cpython-310.pyc b/linux/osmbundler/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..34cad693e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MDX!=pc{N1`*#qXhJE)})QsBo+fwN=h@>^c_Ax}9KPEkoXlm>d$m7V5q=+Q+#` zYW54lZI!3xS@!i56LLPKx2eo9;FX$j;(IzK^3~L4(c_d13#5mpFEhvOmK#jI!lc23 zPPnAose%$RW{&hn(w0kFG5H5f{)7n?NdANgRYCrk$w-owE#zKHZeU8KM~k3x^u*-T zNG{?RUO|EYone{yG3B47@`iKVIp?f6i_VkIb57ZDonsFF&0k z47Jt6D~8%S2Tg_70v4M_)^vK4@(j_fphs*w#8%PI(F8fS zq^P{epiTn%;YfsC95Ts2M}x}Q6zA3YslMMpt-QoUt>hi#eDn6rTPj@SmylZlAg$l! z2PG77b-u4mK+1;|n_J`!I;+a7N%FOOAwLR~tE^It?vI&M8&+cOcbL4-M4jgdtRwwP!@ArnHSjTU9`0n~Tu#5zB3DjN*c|;?;6CUwV;3stn2xmskHpn@qHgIH Z4sHxkYW4TuR({Tyv8TSReOr6~e*qsQjtT$( literal 0 HcmV?d00001 diff --git a/linux/osmbundler/__pycache__/defaults.cpython-310.pyc b/linux/osmbundler/__pycache__/defaults.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..030388fb0a7067283296a0ce414fbc9cc796751d GIT binary patch literal 527 zcmZXRy-ve05Xarpipo+eK!Dij+QCWL5n?D30|F$rERh>u6HAUA+2_*c4R`_GfsNc>B3}Or3!S8#RlWuUId3S)CXFhFqRqZ z&~mA_CulwXr=_nT^8&}yXgZx<(fXXRJtCBMXe>&jX+31jdYx{sPah|}=D6gm=fa?w z$r7{+Sol6bPQQIGH;cgXfkp)&W+BNX0YO(Hv*nVjF#{E3Rg()G%i4s1M6 zR%Tv+38xT6C@#`lXOHk>55*` z6a6PL-jSbuLXy1~uZ04eP$y?NS2N%^ru8{vCC98tk-sPyt=8ZosU=3ZKw1wOGaf6C zqctE35v@U4vj@=G_41WS+CRe_38b%-yD^E@mLr% zH?jonLRNFIdb!m3ROeDdbJ+IBTbM4wEwaFB4mJ&Zs9LQ1Aa*CTeC2-b;=+^=XWUg_ z;~SItz(p5Z&;o3r##LJ`x4bL??J`zU`$cSAxq-$4X51@uQMGLLFH0l5f~#)(vAeSj1A2TvJco~KV&~D7x4~WiPqW+Sh;KEBr|WO zn7q+txg-IP_W@VozGC=C8p1Bn7C{(cNuSn)r6*El^V0IpT}6kDtMllEzTvS-<^@0_ z1i+J+EYyDTInzN)q-|qIG<2_9FHt#54Jw9)tDcU7cDgr>l<3Sv1y}w~wUrmImyKWxJ}~9IJY2Q?CCs> literal 0 HcmV?d00001 diff --git a/linux/osmbundler/features/__pycache__/__init__.cpython-38.pyc b/linux/osmbundler/features/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6dd03f7dcca82a7cf1cb80292ad48e048d27c89a GIT binary patch literal 212 zcmYjKI}US3=Pc&*#~U0AF>~ni+BgGL~CtjXXV4nN#<8f zrp)to1(fW&Qq4rfeXKAi*ETU<_SS=-E z4`LIX{p3^9-YB3=?FO)PZ!-IrvgimiI`2t|SJmmlY literal 0 HcmV?d00001 diff --git a/linux/osmbundler/features/__pycache__/extractor.cpython-310.pyc b/linux/osmbundler/features/__pycache__/extractor.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7a7209e8cdefa3d7fba653b80d4a08f951e430aa GIT binary patch literal 614 zcmZuty>7xV5Vn(00s^UGYNftF7V-jBg;e^tupo8FVx_TxNJ&i3i3F@geT2RPuavcO zC$>(#OGy7uy6^7n`+VP7_xoLj_VRYCo-w{s@!f1JM(AdMaKj{%e2e~M1x#8~=GhUR z|1b-y5xO};P%Pk*1(xK}+OoiwwsbH$vW48E^7vYXc>(Hbl|vZi8X{shMma~nMBh6I zl1VR=P4aIgDcfy075<-e2fc`B7+=3jDE-id1E}@j+!$L7dI~&&lRb%Z_~!KY2E(Q+qPE5; zZ&m@K0-aQPJsVn>m#s=w*{Q-^Hq&1#L7N)d2Q^2;>>zAT{tQ2~OuQD!&B9a(QFet$ zwJZ|KdqO-GVN&0KOHcI(KEJQdXdsYa(rRd;%Us^GtFwv6tN0(ObkFNq7sNJ1AMg(h ClZvMR literal 0 HcmV?d00001 diff --git a/linux/osmbundler/features/__pycache__/extractor.cpython-38.pyc b/linux/osmbundler/features/__pycache__/extractor.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4643671b4cdcc91c6451515ca817ad5021ac8e40 GIT binary patch literal 616 zcmZvay-ve05P+SZwxOaDVgiX5$Wp%mLX{|gOP30UELMo!Hd102JCRyeDjtD%=qq_; zW@2OF&TT}YoOFNAUGBR$_q|@1fV_R&idXROnCwab$pF+GgSjD`aBl_r;wOarV-g1$ zoc|IZvH_?$10zV{agzAl7v=oflE@P$Qb%F6A wV^4KjY@X;2V&HGEGtGTYoT3pMLEQ~RUKF^KQS3SYUyF^-HKgknD$S+)M8;8YvaPt~K5J78_ z^&`!wU$cw}CW1O>c*ZIDNCX$*4H2Q_--9d^^pqsgJ)9=PG*=xM^Lr-Q^ZJsMT^=wM)mVcA*mHxRLe3#iBA+A65D%(K9IT&zJOEH8L#=vz9tN zQf1f3)|ynyR!9v2()GErYN?B+kydX~FO(|NoOP|J;mo4HD3cl}?Qp$uah_LgW%GQ3 zO^g9XbVhgCj9yK!{KH4S41jwyoa5d5&f^vM&e6F~GYRxAY`M@URM&`L2<$0q-SL1w~=U=;`eqbhxs>Y8`wx&|8egg3{ z)}yBgdkD`EP-qJ<360r@;08~{gfn<3r!gB3JeNcoyQ1;8(mMdz@F6>;HTJ>3wH4Ki V`1<0veZKFoRVD)1Cu25ae*xs?;28h_ literal 0 HcmV?d00001 diff --git a/linux/osmbundler/features/__pycache__/sift.cpython-38.pyc b/linux/osmbundler/features/__pycache__/sift.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..eb18d2ff956a5d1a862212e9eeee7f7b38f235cd GIT binary patch literal 929 zcmYjQO>fgc5Zzs`6DLY&Rh6n-P%j)Tp<03qLI@#|7Pv%06&GJD*Skrb+TO6c7EP5K z{Q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s~e=d7v0E+M-cg5Ze~Prk!tQoDy;*49FojZ|33AZEn72yuI-@#lscUIKm^qlnE z2e3rW9w=as8v8uG)Fyb7U5Z%aJVEu-#y~iRu08`01l@v5itZwtTj(Hiz>y21%Uj^W zlSsSz=xt+kFiMNT{P19)z8*r}kv4RNgtut5 z^C67=HLV0$u3HBtnDFLcf58L~#_2t!M6;z;lPjCEn(h*eD~@Bk(LoxURp*W^EbT5K z+Kt@0XA8TwmaTiTaI{xDcXZ*__R{BG?d}r%w{}j*&tEQDb!!>GF0b~uzeg56jKLm3 z>4?;gbVRtn2zVRzZ!g-7l@8xnwrj5r>h`Z}59~eKY%hZAAFdB!Pv@S14{J5*jb(Sm zv|){B>#lh;Y1=%jj{TQ6TE>ZnxQFYwhVxWULOl`T`Rmh*5V9~Sd3Y(yJbd%xDFi>v z(vghiZNJ~If_>G$nvVO^abB^n%gP1$7jbK-to+rqKdvG+*Hvp@g)a`i2_zP~#3c2+ z2P~|Ij}g8?I7YZYm>|>$?*J-mUj^@JSZ({KC6qx3w$^leo2HeO<1rk;*lBTDnn2A) zQ&}cLDPt#bmYD!5J(=lvlnG;(Q&AXuT%}XvOA&J@FrkcR&4s_~oQHF%D?t8%;$H~KWqMAXU3xp)Ph8maq8`CMb2 ztEgSfa*QVybF}dvrSaCsGnUS$5ldefmL4=$XaznpXn`Y4Ul#=R1wcTb(=OYh9(-Mf z=&=r<4gEQFDf`>AP_s>|?I-u+(ac$|g;%(Ub1@v6U^vW6KFe_484j;!akkP#oAb0d zJb3wUOry=_l73idE~ES$2t8qp*Iy#-=0(B?D!hIku^G@~9Sh#7Pf@*#@Cm{*fXK$T jYW2SONfs-02K*Wu|7YBIM=RFfVx1{;8j=pP*)#eN3l4%| literal 0 HcmV?d00001 diff --git a/linux/osmbundler/features/__pycache__/siftvlfeat.cpython-38.pyc b/linux/osmbundler/features/__pycache__/siftvlfeat.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..90bb87c04dee021ad7b844502c1b130599485bba GIT binary patch literal 1499 zcmZuxOK%%D5GMB_?XDgU5;UpN92P|kR6r{s&ZP&VFi^*7fWjBMF0eo$td^9t?mlFa zisZ%WQ!zJWT zRCb30$}voN0>B8P8HqNMM%3t5WEp8kHnW(WIk_9TlrSf1ydlhG&U;vM_tuV@jGmKT z;~qSbvwI5IquM!7$4Up6*_g))*9n?;hXu+pO!)$U6ATL>DTa$2W@CWJg+L9E4c3GZ zop);ymX{+zhg`m@fyV%t!NrW$+IsXD+xjR5$GVvl{^wBQ2QHkf+s? zk7?|0X(h;VJKC_of}4Z=1q(bFqj!`NWv%U+Tsh3D=~IGvMLBVd4a#VC-CJvAtHv6# zZS>}ywQ_2E-Mk|!S9!I2OIMBBS^LbZ8&3)TTe~OZr^{8dZmt9P%Bwx*?~|1eGT0}m z9g*5-M}+ySfVJTJ7ps=>(q^4?tM=-kZvA5IgTDu#tyOUS+w~Z}Y2OiuVQ-}Bth*bg zhBcn8yX9fZws%$?`>&Tu#EF8uhuge{i&RZRHRa*?+tZ5>sxU2CI2L6dUVeWH$q%!1 zBw}&X@As?VK=!X@lm2XySJqc$)d2lxexs?V{LQjIskF5iRm}q#zC8Ro5ZLSji`4V( zv9azyMfeio7~uk8icllG2dL}=8GN8&_1Hfxp$$UtwWZtJ)6J}$OyCIGNsDo*134ef zM450YwUfkIrUU5oWUk^-#QN6Q zqDR{x9hlEiH~ZD&o!jx?<-D0;wVhc8}!fuzlQg!z-WT@(cL--8g6M)FUcWU#t_(>K^ ac?Rr^hyQb}y`v51Z?MNC1_`Y;MED2Z7J}3O literal 0 HcmV?d00001 diff --git a/linux/osmbundler/features/sift.py b/linux/osmbundler/features/sift.py index a5f5edb..f0851c2 100755 --- a/linux/osmbundler/features/sift.py +++ b/linux/osmbundler/features/sift.py @@ -1,6 +1,6 @@ import sys, os, logging -from extractor import FeatureExtractor +from .extractor import FeatureExtractor class Sift(FeatureExtractor): diff --git a/linux/osmbundler/features/siftlowe.py b/linux/osmbundler/features/siftlowe.py index 04e13fb..86e55ce 100755 --- a/linux/osmbundler/features/siftlowe.py +++ b/linux/osmbundler/features/siftlowe.py @@ -1,6 +1,6 @@ import os, subprocess, gzip -from sift import Sift +from .sift import Sift className = "LoweSift" class LoweSift(Sift): @@ -19,7 +19,7 @@ def extract(self, photo, photoInfo): siftTextFile.close() # gzip SIFT file and remove it siftTextFile = open("%s.key" % photo, "r") - siftGzipFile = gzip.open("%s.key.gz" % photo, "wb") + siftGzipFile = gzip.open("%s.key.gz" % photo, "wt") siftGzipFile.writelines(siftTextFile) siftGzipFile.close() siftTextFile.close() diff --git a/linux/osmbundler/features/siftvlfeat.py b/linux/osmbundler/features/siftvlfeat.py index c967772..6632f0c 100755 --- a/linux/osmbundler/features/siftvlfeat.py +++ b/linux/osmbundler/features/siftvlfeat.py @@ -1,6 +1,6 @@ import os, subprocess, gzip, logging -from sift import Sift +from .sift import Sift className = "VlfeatSift" class VlfeatSift(Sift): @@ -16,7 +16,7 @@ def extract(self, photo, photoInfo): subprocess.call([self.executable, "%s.jpg.pgm" % photo, "-o", "%s.key" % photo]) # perform conversion to David Lowe's format vlfeatTextFile = open("%s.key" % photo, "r") - loweGzipFile = gzip.open("%s.key.gz" % photo, "wb") + loweGzipFile = gzip.open("%s.key.gz" % photo, "wt") featureStrings = vlfeatTextFile.readlines() numFeatures = len(featureStrings) # write header diff --git a/linux/osmbundler/matching/__pycache__/__init__.cpython-310.pyc b/linux/osmbundler/matching/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8bf394caef9f7d7e5dfa4333ebbda8777df35e02 GIT binary patch literal 209 zcmYjLI|{-;6x<|WM3OUDr*SVJVqsxrBQ|LsYxa>W>?iC8%tgF|S4wN`1+3f^3kTjj z24c&o literal 0 HcmV?d00001 diff --git a/linux/osmbundler/matching/__pycache__/__init__.cpython-38.pyc b/linux/osmbundler/matching/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1f50cba916d7ca9842b67f8367ec0e0c610f75ad GIT binary patch literal 207 zcmYjKu?oU46ii!C5&I3!U3@=2#`oaRNOa0H(6!dv#t9&|-iUbv@3@w-FHXeb;D4`+`#0Lr z1^28r=}?O9EH#rS-G{mtT1U^d4QDbnqe>N)Roc4vY~5*S`9K|7r?x>?&{UB-!u>biOO{zjfS*mA3MMqUu7os#eQljKSL4asBsZ2FiX;BEH z=8??H`Xs7!u?ACIOg6eO^k;J$CP`lACP{GZbO@|Pcjy+|rHg|bQ2T4w3|D1MD0^_4 zA>j%bvV6-2LLD1Oq zkhs*PA!`TlUj+EPf$TOi#2@>j`4N=^irvU$sx_i)qWmko4WF*+dxoQFM%pE9=E6w- E0*T8UN&o-= literal 0 HcmV?d00001 diff --git a/linux/osmbundler/matching/__pycache__/bundler.cpython-38.pyc b/linux/osmbundler/matching/__pycache__/bundler.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..269a2d65c4e11a751b85a8c8b92f8050cb602465 GIT binary patch literal 1114 zcmZ`&&2G~`5Z+z?Hfl>-Xw^d{A_0e7VhL^tp$bYt0wN^f;)~^YH;KdA4!dj7M7_ZS z@CfOV7viv2PCawu#EjjvRRtsM?9A+VX1%;By05XOO zQ7pD)u1zu$si~FFeREi-TbcD;nly^jgdtc*nJreQ_cd`~Q1g+`G|^ zF1Tm4NrzH&XQ`Py?mp1H&^mgqZ8(#u8C9yVtkTxSXX{R@ytJLGuWTTzF?4!t-Mk!C zJ!V}kIYFj%bvVz%dHnaLt?@@IN17R0iwvFF{}4k&glld0B-v5E1o;5K~HR`(PKqcKgFtuvSY1~=|@$Rvm?0GWjlWD$fA-HEIRJ?N9}!+?6k?Z$cTi)pDR$9hs~Tx{0tqZ^gF z^dmp_7lov5AH+8EA@NH@0>oH6$n=3k8#%15EWdW*b(~C1jY*Na8QSE?6itoVyTqaf zv@|oBO^r7bo7XjZdy`b9Zsv(`^<|@>qM8m2Ct`fjH^ZF}AH6^^i2Z2ub4h121HA?dtErP@`cY6DHh_L@@HOn4xEyu literal 0 HcmV?d00001 diff --git a/linux/osmbundler/matching/__pycache__/engine.cpython-38.pyc b/linux/osmbundler/matching/__pycache__/engine.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..eab6c812f7dc379f3ac02d3740698b4f40160198 GIT binary patch literal 645 zcmaixy-ve05PtE z!)49??1m?NG4ndV^oHj*ot9vO!sS(af39i^;z5tWbXuZPO<$?9g1X>%Q>nW;Exx~O zSGAkf?kq1brrKuz7E@On9L=3cGnZF7Mg#=YW0r6osQs}_W%vb{+j2!H0~vUs-=4+; U+4_||e%hMw@C)mRd*4aLC)K=?hX4Qo literal 0 HcmV?d00001 diff --git a/linux/osmbundler/matching/__pycache__/manual.cpython-310.pyc b/linux/osmbundler/matching/__pycache__/manual.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5b889e1f3d976814226c04f89fb49c7c2d25a25b GIT binary patch literal 672 zcmZ{iy-ve05Psq# zW8yBfh$1-Y&Ug0N_nqx(cegJ{o|l*SM&m07KP8}GLh264fB;zvEmJ84c&T?Gzz6S% ze3XxV>O(LUR7gWS6Q9U3o|=2v%(<9rpe0nY))Al;!!jqb^Bycq!L8xfuv(S z@Sj8)KmZ|)A@r!smh~y^Jm+F-VW0Jcbjjo(rs72=FJ#)lVR>VFG~1bvX*{nq#(Cxz zXyel=Z#0_P#TE^qCG2=Huj*=MGp(_<_i*jQiUmM zr6NY)jsp2G+HCxAo%1idWp*2`QSH{Z*Wqtd*oIy89bRGcF#J`dTTaG3MlzX3rP{ty zx`L);f1uPYF|SreH<;Cp#k0HGW_evyCP4%Q%b&vz*nD5ym&Xj<3oxqVZX*$RkvH&@ nanSa#dvePc&~E2t=3GJy-G;wTYNMksvSWTe$F&A@+)#c3SXGzs literal 0 HcmV?d00001 diff --git a/linux/osmbundler/matching/__pycache__/manual.cpython-38.pyc b/linux/osmbundler/matching/__pycache__/manual.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c577ac49226edd6f6a107cb42026981afa7f2be7 GIT binary patch literal 674 zcmah{y-vh13{KMaD8CcZtqd%;&=)`miQk1TCzdWzsm)!bCOwi?0#J zn6P^se?r2NozLml_;Z}|_4O4&_V9X&&$K>q^4&s8_R0M=1rQ)BVPqzy0F|i|0RgCc z!YJ>8EP!wPU7QXL(ahOFKETlhPvRw#}=>Zb7UcrYPGd_gfTDWD-QCK+>@a zf_ssL5JE(21OqCw7LPK0q|k*Pt4kNrZXe#p$+R|@6uFkR8L4p0~Tg;gIaehTALc$ zit(D(SET&o%kUEOrgeC9-MGAH%G#!gfZ&$7Houdv>zgB1(a(W(dX^ZgP{lzy3cCUJ hV|RQB-EvXo-lwFXr~h?M7w^t>?ePfv@vW&)z5^s)mrMWv literal 0 HcmV?d00001 diff --git a/linux/osmbundler/matching/bundler.py b/linux/osmbundler/matching/bundler.py index 298b830..078b1f1 100755 --- a/linux/osmbundler/matching/bundler.py +++ b/linux/osmbundler/matching/bundler.py @@ -1,6 +1,6 @@ import sys,os,subprocess,logging -from engine import MatchingEngine +from .engine import MatchingEngine className = "BundlerMatching" class BundlerMatching(MatchingEngine): diff --git a/linux/osmbundler/matching/manual.py b/linux/osmbundler/matching/manual.py index 6084d2c..d884f84 100755 --- a/linux/osmbundler/matching/manual.py +++ b/linux/osmbundler/matching/manual.py @@ -1,4 +1,4 @@ -from engine import MatchingEngine +from .engine import MatchingEngine className = "ManualMatching" class ManualMatching(MatchingEngine): diff --git a/linux/osmcmvs/__init__.py b/linux/osmcmvs/__init__.py index f86184f..9c5aa60 100755 --- a/linux/osmcmvs/__init__.py +++ b/linux/osmcmvs/__init__.py @@ -47,7 +47,7 @@ def __init__(self): logging.info("Working directory created: "+self.workDir) if not (os.path.isdir(self.bundleOutArg) or os.path.isfile(self.bundleOutArg)): - raise Exception, "'%s' is neither directory nor a file name" % self.bundleOutArg + raise Exception("'%s' is neither directory nor a file name" % self.bundleOutArg) def parseCommandLineFlags(self): try: @@ -77,21 +77,21 @@ def doBundle2PMVS(self): os.mkdir("pmvs/models") #$BASE_PATH/bin32/Bundle2PMVS.exe list.txt bundle/bundle.out - print "Running Bundle2PMVS to generate geometry and converted camera file" + print("Running Bundle2PMVS to generate geometry and converted camera file") subprocess.call([bundler2PmvsExecutable, "list.txt", "bundle/bundle.out"]) # Apply radial undistortion to the images - print "Running RadialUndistort to undistort input images" + print("Running RadialUndistort to undistort input images") subprocess.call([RadialUndistordExecutable, "list.txt", "bundle/bundle.out", "pmvs"]) - print "Running Bundle2Vis to generate vis.dat" + print("Running Bundle2Vis to generate vis.dat") subprocess.call([Bundle2VisExecutable, "pmvs/bundle.rd.out", "pmvs/vis.dat"]) os.chdir(os.path.join(self.workDir,"pmvs")) #Rename all the files to the correct name undistortTextFile = open("list.rd.txt", "r") imagesStrings = undistortTextFile.readlines() - print "Move files in the correct directory" + print("Move files in the correct directory") cpt = 0 for imageString in imagesStrings: image = imageString.split(".") @@ -123,16 +123,16 @@ def doCMVS(self): # for file in files: # if "option-" in file: # subprocess.call([pmvsExecutable, "./", file]) - print "Finished! See the results in the '%s' directory" % self.workDir + print("Finished! See the results in the '%s' directory" % self.workDir) if sys.platform == "win32": subprocess.call(["explorer", self.workDir]) if sys.platform == "linux2": subprocess.call(["xdg-open", self.workDir]) - else: print "Thanks" + else: print("Thanks") def doPMVS(self, path, optionFile): os.chdir(os.path.join(path,"pmvs")) - print "Run PMVS2 : %s " % pmvsExecutable + print("Run PMVS2 : %s " % pmvsExecutable) subprocess.call([pmvsExecutable, "./", optionFile]) - print "Finished! See the results in the '%s' directory" % self.workDir + print("Finished! See the results in the '%s' directory" % self.workDir) def printHelpExit(self): self.printHelp() @@ -140,11 +140,11 @@ def printHelpExit(self): def openResult(self): if sys.platform == "win32": subprocess.call(["explorer", self.workDir]) - else: print "See the results in the '%s' directory" % self.workDir + else: print("See the results in the '%s' directory" % self.workDir) def printHelp(self): - print "Error" + print("Error") helpFile = open(os.path.join(distrPath, "osmcmvs/help.txt"), "r") - print helpFile.read() + print(helpFile.read()) helpFile.close() diff --git a/linux/osmpmvs/__init__.py b/linux/osmpmvs/__init__.py index 02177d8..7de92b2 100755 --- a/linux/osmpmvs/__init__.py +++ b/linux/osmpmvs/__init__.py @@ -43,7 +43,7 @@ def __init__(self): logging.info("Working directory created: "+self.workDir) if not (os.path.isdir(self.bundleOutArg) or os.path.isfile(self.bundleOutArg)): - raise Exception, "'%s' is neither directory nor a file name" % self.bundleOutArg + raise Exception("'%s' is neither directory nor a file name" % self.bundleOutArg) def parseCommandLineFlags(self): try: @@ -71,21 +71,21 @@ def doBundle2PMVS(self): os.mkdir("pmvs/models") #$BASE_PATH/bin32/Bundle2PMVS.exe list.txt bundle/bundle.out - print "Running Bundle2PMVS to generate geometry and converted camera file" + print("Running Bundle2PMVS to generate geometry and converted camera file") subprocess.call([bundler2PmvsExecutable, "list.txt", "bundle/bundle.out"]) # Apply radial undistortion to the images - print "Running RadialUndistort to undistort input images" + print("Running RadialUndistort to undistort input images") subprocess.call([RadialUndistordExecutable, "list.txt", "bundle/bundle.out", "pmvs"]) - print "Running Bundle2Vis to generate vis.dat" + print("Running Bundle2Vis to generate vis.dat") subprocess.call([Bundle2VisExecutable, "pmvs/bundle.rd.out", "pmvs/vis.dat"]) os.chdir(os.path.join(self.workDir,"pmvs")) #Rename all the files to the correct name undistortTextFile = open("list.rd.txt", "r") imagesStrings = undistortTextFile.readlines() - print "Move files in the correct directory" + print("Move files in the correct directory") cpt = 0 for imageString in imagesStrings: image = imageString.split(".") @@ -102,12 +102,12 @@ def doBundle2PMVS(self): logging.info("Finished!") def doPMVS(self): - print "Run PMVS2 : %s " % pmvsExecutable + print("Run PMVS2 : %s " % pmvsExecutable) subprocess.call([pmvsExecutable, "./", "pmvs_options.txt"]) - print "Finished! See the results in the '%s' directory" % self.workDir + print("Finished! See the results in the '%s' directory" % self.workDir) if sys.platform == "win32": subprocess.call(["explorer", self.workDir]) if sys.platform == "linux2": subprocess.call(["xdg-open", self.workDir]) - else: print "Thanks" + else: print("Thanks") def printHelpExit(self): self.printHelp() @@ -115,11 +115,11 @@ def printHelpExit(self): def openResult(self): if sys.platform == "win32": subprocess.call(["explorer", self.workDir]) - else: print "See the results in the '%s' directory" % self.workDir + else: print("See the results in the '%s' directory" % self.workDir) def printHelp(self): - print "Error" + print("Error") helpFile = open(os.path.join(distrPath, "osmpmvs/help.txt"), "r") - print helpFile.read() + print(helpFile.read()) helpFile.close() diff --git a/ppt_gui_start b/ppt_gui_start index cfdcfb6..e7b4bc6 100755 --- a/ppt_gui_start +++ b/ppt_gui_start @@ -1,4 +1,4 @@ #!/bin/sh -cd /home/steve/Desktop/3D/osm-bundler/linux/ -export LD_LIBRARY_PATH="/home/steve/Desktop/3D/osm-bundler/linux/software/bundler/bin" +cd /home/casper/Documents/rendering/photogrammetry/linux/ +export LD_LIBRARY_PATH="/home/casper/Documents/rendering/photogrammetry/linux/software/bundler/bin" python ./ppt_gui.py diff --git a/to_jpg.py b/to_jpg.py new file mode 100644 index 0000000..ccaddb0 --- /dev/null +++ b/to_jpg.py @@ -0,0 +1,13 @@ +from PIL import Image +import os +PATH = "/home/casper/Documents/rendering/DATASET/1" + +files = os.listdir(PATH) # list of files in directory + +for file in files: + + if file.endswith('.png'): # check if file is png + file_path = f"{PATH}/{file}" + + im = Image.open(file_path).convert("RGB") # open file as an image object + im.save(f'{PATH}/jpgs/{file[:-4]}.jpg',quality=95, optimize=True) \ No newline at end of file