remove unused
This commit is contained in:
parent
6d75db0867
commit
b97fb528fd
3
ECD.py
3
ECD.py
@ -1,4 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
import argparse
|
||||||
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'libs'))
|
||||||
os.environ['PROJ_LIB'] = os.path.join(os.path.dirname(__file__), 'share/proj')
|
os.environ['PROJ_LIB'] = os.path.join(os.path.dirname(__file__), 'share/proj')
|
||||||
os.environ['GDAL_DATA'] = os.path.join(os.path.dirname(__file__), 'share')
|
os.environ['GDAL_DATA'] = os.path.join(os.path.dirname(__file__), 'share')
|
||||||
os.environ['ECD_BASEDIR'] = os.path.dirname(__file__)
|
os.environ['ECD_BASEDIR'] = os.path.dirname(__file__)
|
||||||
|
48
innosetup.iss
Normal file
48
innosetup.iss
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
; Script generated by the Inno Setup Script Wizard.
|
||||||
|
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||||
|
|
||||||
|
#define MyAppName "Easy Change Detection"
|
||||||
|
#define MyAppVersion "0.2.0"
|
||||||
|
#define MyAppPublisher "Î÷°²Àí¹¤´óѧ-ImgSciGroup"
|
||||||
|
#define MyAppURL "https://jsj.xaut.edu.cn/info/1052/2455.htm"
|
||||||
|
#define MyAppExeName "ECD.exe"
|
||||||
|
|
||||||
|
[Setup]
|
||||||
|
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
|
||||||
|
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
|
||||||
|
AppId={{78EB8520-9F1F-4396-909F-69DA29AEE98F}
|
||||||
|
AppName={#MyAppName}
|
||||||
|
AppVersion={#MyAppVersion}
|
||||||
|
;AppVerName={#MyAppName} {#MyAppVersion}
|
||||||
|
AppPublisher={#MyAppPublisher}
|
||||||
|
AppPublisherURL={#MyAppURL}
|
||||||
|
AppSupportURL={#MyAppURL}
|
||||||
|
AppUpdatesURL={#MyAppURL}
|
||||||
|
DefaultDirName={autopf}\{#MyAppName}
|
||||||
|
DisableProgramGroupPage=yes
|
||||||
|
; Uncomment the following line to run in non administrative install mode (install for current user only.)
|
||||||
|
;PrivilegesRequired=lowest
|
||||||
|
OutputBaseFilename=ECDInstaller
|
||||||
|
SetupIconFile=D:\CVEO\2021-12-22-CDGUI\rscder\logo.ico
|
||||||
|
Compression=lzma
|
||||||
|
SolidCompression=yes
|
||||||
|
WizardStyle=modern
|
||||||
|
|
||||||
|
[Languages]
|
||||||
|
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||||
|
|
||||||
|
[Tasks]
|
||||||
|
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
||||||
|
|
||||||
|
[Files]
|
||||||
|
Source: "D:\CVEO\2021-12-22-CDGUI\rscder\package\dist-0.2.0\program\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
|
Source: "D:\CVEO\2021-12-22-CDGUI\rscder\package\dist-0.2.0\program\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||||
|
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||||
|
|
||||||
|
[Icons]
|
||||||
|
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
|
||||||
|
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
|
||||||
|
|
||||||
|
[Run]
|
||||||
|
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
|
||||||
|
|
@ -1,32 +0,0 @@
|
|||||||
import multiprocessing
|
|
||||||
from alg.txt_export_to import export_to_shp
|
|
||||||
import os
|
|
||||||
import glob
|
|
||||||
from qgis.core import *
|
|
||||||
class ExportToSHP(multiprocessing.Process):
|
|
||||||
|
|
||||||
def __init__(self, conn, result_path, output_dir):
|
|
||||||
super(ExportToSHP, self).__init__()
|
|
||||||
self.conn = conn
|
|
||||||
self.result_path = result_path
|
|
||||||
self.result_list = self.get_result_list()
|
|
||||||
self.output_dir = output_dir
|
|
||||||
os.makedirs(self.output_dir, exist_ok=True)
|
|
||||||
|
|
||||||
def get_result_list(self):
|
|
||||||
fl = list(glob.glob(os.path.join(self.result_path, '*.txt')))
|
|
||||||
return fl
|
|
||||||
|
|
||||||
def run(self):
|
|
||||||
# result = []
|
|
||||||
self.conn.send(len(self.result_list))
|
|
||||||
qgs = QgsApplication([], False)
|
|
||||||
QgsApplication.initQgis()
|
|
||||||
for i, p in enumerate(self.result_list):
|
|
||||||
o = os.path.basename(p)
|
|
||||||
o = os.path.splitext(o)[0]
|
|
||||||
r = export_to_shp(p, os.path.join(self.output_dir, o + '.shp'))
|
|
||||||
# result.append([r, self.feats[i]])
|
|
||||||
self.conn.send([i, r, o])
|
|
||||||
# self.conn.send(result)
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
|||||||
import multiprocessing
|
|
||||||
from alg.grubcut import grubcut
|
|
||||||
|
|
||||||
class GrabCut(multiprocessing.Process):
|
|
||||||
|
|
||||||
def __init__(self, conn, img_path, pts = [], feats = []):
|
|
||||||
super(GrabCut, self).__init__()
|
|
||||||
self.conn = conn
|
|
||||||
self.pts = pts
|
|
||||||
self.feats = feats
|
|
||||||
self.img_path = img_path
|
|
||||||
def run(self):
|
|
||||||
result = []
|
|
||||||
for i, p in enumerate(self.pts):
|
|
||||||
r = grubcut(self.img_path, p, False, True, False)
|
|
||||||
result.append([r, self.feats[i]])
|
|
||||||
self.conn.send(i)
|
|
||||||
self.conn.send(result)
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user