Skip to content

Instantly share code, notes, and snippets.

@rodgomesc
Last active August 29, 2015 14:03
Show Gist options
  • Save rodgomesc/8969a568a9a0aaa6492b to your computer and use it in GitHub Desktop.
Save rodgomesc/8969a568a9a0aaa6492b to your computer and use it in GitHub Desktop.
Face detect in 9 lines if code
from SimpleCV import * #importa FrameWork
import time # importa time
frame = Image("1.jpg").scale(0.8) # abre imagem e subtrai 20% do seu total
face = frame.findHaarFeatures("face.xml") #instancia de face.xml
if face: # se encontrar um rosto
face.draw((0, 255, 0), 3) #desenha cor (R,G,B) LarguraLinha 3
frame.show() #mostra o resultado
time.sleep(10) #segura por 10seg resltado n tela
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment