Extraction of image regions from black and white images

0

I have been trying to learn OpenCV as I have a deep interest in Computer Vision and one of the problems I have been trying to figure out is how to extract a particular region of an image with OpenCV. I do not want to merely crop the image; I want to extract the exact region from it. For example if I have an image of the lower half of the face like this:

image

Is there a way I can extract the just the lower lip from this image. Any insight will be much appreciated, thank you!

there is no way to crop non-rectangular regions, however, you could try to:

  • get facial landmarks (this would need the whole face to work)
  • look up the lip landmarks, and generate a b/w mask from the area
  • crop out the lip rectangle, and mask out the unwanted borders