title: Simple way of extracting hair pixels from an image of a human face
body: <p>Disclaimer: I am <strong>not</strong> looking for a robust method that works under all conditions and/or requiring complex analysis of the image (e.g., <a href="http://vis-www.cs.umass.edu/lfw/part_labels/" rel="nofollow">http://vis-www.cs.umass.edu/lfw/part_labels/</a>). Therefore please do not link me to one of the many papers on hair segmentation that exist. I am looking for something fast and simple (not perfectly robust).</p>
  
  <p>That being said, my goal is to extract the area containing the hair in an image of a human face. If I am able to get at least some tiny set of pixels that I am <strong>sure</strong> are hair pixels, then I can use one of several algorithms to find the rest (e.g., a "photoshop magic wand" type algorithm).</p>
  
  <p>An example (left side is the original face, right side is the gradient magnitude):</p>
  
  <p><a href="http://imgur.com/YX85MKB" rel="nofollow">http://imgur.com/YX85MKB</a></p>
  
  <p>Here's the information I have access to regarding any image of a human face: all locations of important features (e.g., nose, eyes, mouth and chin). One dumb/simple way of finding hair pixels could be to perform edge detection, and work up from the nose until I find two "horizontal edges" which we assume are the lower and upper boundaries of the hair, then take a sample from in-between.</p>
  
  <p>Any ideas on other simple methods to try?</p>