title: OpenCV Background Segmentation/Subtraction From Single Image
body: <p>I'm looking for a bit of guidance... I have a single image of a passport photo. What I would like to do is separate the person and the background. I will then analyse the background colour, pattern, etc.</p>
  
  <p>I've done some research into segmentation and most of what I'm finding uses multiple frames. Unfortunately I only have one frame and do not have the luxury to take a picture of the background without a person.</p>
  
  <p>I have also looked at GrabCut, but I do not want the user to have to manually select background/foreground parts of the image. Is there an automated version of this, possibly?</p>
  
  <p>I was thinking about using contour/edge (canny?) detection?...</p>
  
  <p>Thank you in advance!</p>
  
  <p>Edit: Sample set of images can be found here: <a href="http://imgur.com/a/PKTDc#0" rel="nofollow">http://imgur.com/a/PKTDc#0</a></p>
  
  <hr>
  
  <p>So I followed Froyo's advice and so far have the following result: <a href="http://imgur.com/Mvwwu9f.png" rel="nofollow">http://imgur.com/Mvwwu9f.png</a></p>
  
  <p>Some of the edges are cut off because of the face detection rectangle, so I'll need to increase the size of the rect when a face is detected.</p>