C:\fakepath\OPENCV-PROBLEM.jpg Hello In my image I detect the blue line (through blobs) make a close rectangle on the blob take the bottom of the rectangle and split the image to the top and bottom half over my red line(sorry it is not a straight line). But my problem is how can I extract the part of the image on top of the blue line with the most of area taken (where I drew the red line (obviously I don't know exactly if I took the most area but that is the general idea)