1 Star 0 Fork 0

celoran/ParticleTracking

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
detection_main.py 1.93 KB
一键复制 编辑 原始数据 按行查看 历史
celoran 提交于 2019-05-04 11:11 . init commit
import tkinter # GUI interface
import tkinter.ttk # GUI interface
import GUI_main # GUI classes
def start_program(trackMethod=None, mode=None, GUI=True, extraInfo='nothing'):
while (True):
if GUI:
# Starts the program using the selected options
root = tkinter.Tk()
# Start program menu
chooseMethod = GUI_main.chooseMethod(root)
if trackMethod != None:
chooseMethod.trackMethod.set(trackMethod)
root.mainloop()
trackMethod = chooseMethod.trackMethod.get() # Auto, live or manual
mode = chooseMethod.method.get() # Gradient, thresh, etc.
extraInfo = [chooseMethod.angleInfo.get()] # Nothing, jet, Janus, jet+bubble
if 'nothing' in extraInfo:
del extraInfo[extraInfo.index('nothing')]
if chooseMethod.angleZ.get():
extraInfo.append('angleZ') # angleZ
if trackMethod == 'auto':
import detection_auto
TrackProgram = detection_auto.class_factory(mode, extraInfo=extraInfo) # Creates an auto class instance
TrackProgram().run_main() # Runs it
elif trackMethod == 'live':
import detection_live
TrackProgramLive = detection_live.class_factory_live(mode,
extraInfo=extraInfo) # Creates a live class instance
TrackProgramLive().run_main() # Runs it
elif trackMethod == 'manual':
import detection_manual
TrackProgramManual = detection_manual.class_factory_manual('manual', extraInfo=[
'nothing']) # Creates a manual class instance
TrackProgramManual().run_main() # Runs it
GUI = True;
trackMethod = None;
mode = None # Reset to main menu
if __name__ == '__main__':
start_program()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/celoran/ParticleTracking.git
git@gitee.com:celoran/ParticleTracking.git
celoran
ParticleTracking
ParticleTracking
master

搜索帮助