I have to extract an area from a image (can't disclose that image). With the help of this Abid K Rahman's answer I've obtained the image as Result Image I've obtained the points of that may make a rectangle but couldn't find a rectangle which is the best approximate.
[[625, 389], [10, 385], [116, 184], [5, 35], [626, 26]]
We can assume that all four points of the rectangle will be in four different corner of image. So I have divided the set into four different group based on their location.
[[[[41, 63]], [[613, 66]]], [[[227, 428], [25, 426], [39, 392]], [[612, 394]]]]
But I'm not able to move further. I want to extract points which approximately makes a rectangle. Better if the answer is in python.