Ask Your Question
0

Error runing simplecv with hp laptop built in webcam

asked 2013-06-24 00:33:01 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I am trying to run simple cv with my hp laptops built in webcam but it's showing

Traceback (most recent call last): File "C:/Python27/hello.py", line 1, in <module> cam = Camera() NameError: name 'Camera' is not defined

and my code was the hello world code cam = Camera() display = Display() img = cam.getImage() img.save(display)

how can i solve it??

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2013-06-24 15:28:30 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

see an example of interactive hello world, interacting with cliks mouse!

from SimpleCV import Camera,Display,pg,Color

cam = Camera()
disp = Display((640,480))

while disp.isNotDone():
    frame = cam.getImage()
    if disp.mouseLeft:
        pt = pg.mouse.get_pos()
        #pega Tupla
        print "Desenhando string na Posicao --> (%i,%i) " % (pt[0],pt[1])
        frame.drawText("HELLO WORLD!!",pt[0],pt[1],color=Color.RED,fontsize=40)
    frame.save(disp)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-06-24 00:33:01 -0500

Seen: 1,117 times

Last updated: Jun 24 '13