Face detection & Tkinter or other GUI

asked 2016-10-11 08:17:42 -0500

anonymous user

Anonymous

Does someone know an example how I get buttons and other widgets to same display whit the image? I tried to but it didn't work. So the code is only face detection. I try to save face y-coordinates when I clikc the button.

Here is the code:

#!/usr/bin/env python

#print __doc__

import time
from SimpleCV import *
import sys

display = Display()
cam = Camera()
haarcascade = HaarCascade("face")

while True:

    image = cam.getImage().flipHorizontal().scale(1.0)
    faces = image.findHaarFeatures(haarcascade)
    if faces:
            face = faces[-1]
            face.draw(Color.RED,1)
    image.show()

    y = str(face.coordinates())
    y = y.split(' ')
    y = y[1]
    y = y.strip(']')
edit retag flag offensive close merge delete