本文介绍了将SimpleCV与TKinter GUI结合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道将SimpleCV与TKinter结合在一起的示例,例如在显示器上放置一些小部件吗?预先感谢.

Does anybody know an example combining SimpleCV with TKinter such as placing some widget on the Display? Thanks in advance.

推荐答案

我在我们的帮助论坛上对此进行了回答: http://help.simplecv.org

I answered this on our help forum at:http://help.simplecv.org

但是为了传达信息,我在这里举了一个例子: https://github.com/ingenuitas/SimpleCV/blob/develop/SimpleCV/examples/display/tkinter-example.py

But to relay the message I put up an example here:https://github.com/ingenuitas/SimpleCV/blob/develop/SimpleCV/examples/display/tkinter-example.py

这是代码:

import SimpleCV
import ImageTk #This has to be installed from the system repos
import Tkinter
import time

Tkinter.Tk()

image = SimpleCV.Image('http://i.imgur.com/FTKqh.jpg') #load the simplecv logo from the web
photo = ImageTk.PhotoImage(image.getPIL())
label = Tkinter.Label(image=photo)
label.image = photo # keep a reference!
label.pack() #show the image
time.sleep(5)

这篇关于将SimpleCV与TKinter GUI结合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 08:25