from tkinter import *
from tkinter import ttk
from tkinter import filedialog
from canny import imgEdgeDect
mainwindow = Tk()
mainwindow.title('The tool of image edge detection')
windowWidth = 450
windowHeight = 300
screenWidth = mainwindow.winfo_screenwidth()
screenHeight = mainwindow.winfo_screenheight()
mainwindow.geometry('%dx%d+%d+%d' % (windowWidth, windowHeight, (screenWidth - windowWidth) / 2, (screenHeight - windowHeight) / 2))
mainwindow.iconbitmap(r'Digital Image Processing\image\favicon.ico')
frame = ttk.Frame(mainwindow, relief=SUNKEN, borderwidth=2, width=450, height=250)
frame.pack(side=TOP, fill=BOTH, expand=1)
titleText = ttk.Label(frame, text='图像边缘检测工具', font=('FangSong', 25))
titleText.place(x=85, y=10, width=280, height=40)
def openImage():
filePath = filedialog.askopenfilename()
imgEdgeDect(filePath)
style = ttk.Style()
style.configure('TButton', font=('Consolas', 14))
openImgBtn = ttk.Button(frame, text='Open Image', command=openImage, style='TButton')
openImgBtn.place(x=80, y=120, width=120, height=80)
closeBtn = ttk.Button(frame, text='Close', command=mainwindow.quit, style='TButton')
closeBtn.place(x=250, y=120, width=120, height=80)
mainwindow.mainloop()
没有合适的资源?快使用搜索试试~ 我知道了~
资源详情
资源评论
资源推荐
收起资源包目录
Digital Image Processing.zip (15个子文件)
Digital Image Processing
canny.py 954B
image
weapon5.JPG 316KB
weapon8.jpeg 38KB
weapon7.jpeg 11KB
weapon2.jpg 102KB
weapon4.JPG 273KB
weapon3.jpg 127KB
weapon9.jpeg 56KB
weapon1.jpeg 244KB
favicon.ico 4KB
weapon6.png 259KB
__pycache__
canny.cpython-310.pyc 919B
test.cpython-310.pyc 2KB
1.png 199KB
index.py 1KB
共 15 条
- 1
柃歌
- 粉丝: 2w+
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0