Simple face detector adapted from OpenCV sample