Python implements image processing concave polygon intersection area calculation