0

I'm writing a program that's going to, among other things, display an image from a USB webcam using Tkinter and SimpleCV to do this. To get started, I tried running the example at Combine SimpleCV with TKinter GUI but no image was displayed. The code is

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)

When I ran this, my Raspberry Pi (specifically a BrickPi) did something for five seconds, but nothing visible happened. What could be going on? How can I troubleshoot this?

Community
  • 1
  • 1
jaia
  • 304
  • 1
  • 2
  • 8

0 Answers0