2017-10-23 Facedetect

Ok, so `facedetect` is failing me. When I ran `fgallery` I got this error:

  File "/Users/alex/bin/facedetect", line 140, in face_detect
    flags = cv2.cv.CV_HAAR_DO_CANNY_PRUNING
AttributeError: 'module' object has no attribute 'cv'

Based on an answer on StackExchange, I installed the latest `facedetect` from GitHub.

an answer on StackExchange

from GitHub

Now I get a different error:

facedetect: error: cannot load HAAR_FRONTALFACE_ALT2 from /usr/share/opencv/haarcascades/haarcascade_frontalface_alt2.xml

This directory is wrong: my opencv stuff got installed in `/usr/local/opt/opencv@3` by Homebrew. I should be using the `--data-dir` option but I opted to change line 37 in `facedetect` instead. `DATA_DIR` should point to the directory containing `haarcascades`:

DATA_DIR = '/usr/local/opt/opencv@3/share/OpenCV/'

​#Pictures