Ask Your Question

Revision history [back]

I think the following steps should do exactly what you want

  1. Define your red lines like you did before.
  2. Instead of drawing them on the coloured image, make a black image and draw them with white pixels.
  3. Calculate the convex hull, making sure you have a closed contour.
  4. Fill in that convex hull with white pixels.
  5. Now multitply your mask with the original image.