title: slow face detection on opencv and intel galileo gen2
body: <p>i want to program my intel galileo gen 2 so that it displays the number of faces in front of the webcam and simply print it on the shell (using opencv). My code is working but the problem is that the processing speed is really slow. It prints the number like once every 15 seconds. This way I am also unable to check if the number is correct or not. Is there any way or someone has done it ?
  Here''s the code..</p>
  
  <pre><code>import cv2
  import sys
  import time
  
  cascPath = '/media/mmcblk0p1/haarcascade_frontalface_default.xml'
  faceCascade = cv2.CascadeClassifier(cascPath)
  
  video_capture = cv2.VideoCapture(0)
  
  while True:
      # Capture frame-by-frame
      ret, frame = video_capture.read()
  
      gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
  
      faces = faceCascade.detectMultiScale(
          gray,
          scaleFactor=1.1,
          minNeighbors=5,
          minSize=(30, 30),
          flags=cv2.cv.CV_HAAR_SCALE_IMAGE
      )
  
      print len(faces)
  
      time.sleep(0.033)
  </code></pre>