I need to find the extreme points of the circles from this image ( the top-left corner,top-right corner,the bottom-left corner and lastly the bottom-right corner)

The image go through threshold then canny edge detection before overlaying back to the original image.

[![enter image description here](https://i.stack.imgur.com/iWKp5.jpg)](https://i.stack.imgur.com/iWKp5.jpg)
for example ( drew via paint)

[![enter image description here](https://i.stack.imgur.com/c0poS.png)](https://i.stack.imgur.com/c0poS.png)

and connect them together ( drew via paint)

[![enter image description here](https://i.stack.imgur.com/ywm8a.jpg)](https://i.stack.imgur.com/ywm8a.jpg)

[![enter image description here](https://i.stack.imgur.com/MQlAu.jpg)](https://i.stack.imgur.com/MQlAu.jpg)

but how am I suppose to get the radius and the x and y coordinate from the centre first and then draw the line?

```
for (int i = 0; i < circles.size(); i++)
{
    //icout << i<<"\n"<<endl;
    Point center(cvRound(circles[i][ 0]), cvRound(circles[i][1]));
    stringstream ss;
    ss << i + 1;
    putText(dst, ss.str(), center, 1, 1, Scalar(255, 0, 225 ), 2, 0);
    int radius = cvRound(circles[i][2]);
    // circle center
    circle(src, center, 3, Scalar(0, 255, 0), -1, 8, 0);
    // circle outline
    circle(src, center, radius, Scalar(0, 0, 255), 3, 8, 0);
    //for original image overlap
    circle(dst, center, 3, Scalar(0, 255, 0), -1, 8, 0);
    // circle outline
    circle(dst, center, radius, Scalar(0, 255, 255), 3, 8, 0);

}

```

this is the demo code but i'm struggling to understand about the
 circles.size()
from

```
for (int i = 0; i < circles.size(); i++)

```

and

```
Point center(cvRound(circles[i][ 0]), cvRound(circles[i][1]));

```

i'll appreciate it if you could explain it to me in a more simpler way as i'm still in my learning process,just a starting point for me to start will do.
Thanks!