Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import ftplib
- from SimpleCV import Image,Camera
- import time
- camera = Camera(0, {"width": 640, "height": 480})
- session = ftplib.FTP('ailurus.com','ailurus','panda')
- def saveImage(name):
- file = open(name,'rb') # file to send
- session.storbinary('STOR %s' % name, file)
- file.close() # close file and FTP
- session.quit()
- while 1:
- image = camera.getImage()
- faces = image.findHaarFeatures("face.xml")
- if faces:
- for face in faces:
- print "Encontrado nas coordenadas: " + str(face.coordinates())
- face.draw()
- image.save("foto.jpg") # a
- saveImage("foto.jpg") # aqui vai dar pau
- else:
- print "Não encontrado"
- sleep(.1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement