Fit Quadrilateral (Tetragon) to a blob

I recommend the following steps: threshold() the image dilate() the image – this will remove the black line splitting the top and bottom section and also darker artifacts on the lower part findContours() using setting to retrieve only external contours(RETR_EXTERNAL) and simplify the output(CHAIN_APPROX_SIMPLE) process the contours further Step 1:threshold # threshold image ret,thresh = … Read more