Page 1 of 1

find centered coeccentric circles and draw circle

Posted: 2017-02-15T01:01:26-07:00
by lojesus75
Hello,

I have a question

There are 10 black circles in the image. I want to get the center of the black circle and make a circle of random number.
It seems possible using image magic.

Thanks for best regards

Re: find centered coeccentric circles and draw circle

Posted: 2017-02-15T01:12:10-07:00
by snibgo
Please show a sample input image. You can upload to somewhere like dropbox.com and paste the URL here.

Please state the version number of IM you use, and your platform.

If you have a black circle on a white background, "-morphology distance" can find the centre.

Re: find centered coeccentric circles and draw circle

Posted: 2017-02-15T10:31:08-07:00
by fmw42
So can -connected-components.

Re: find centered coeccentric circles and draw circle

Posted: 2017-02-15T10:33:39-07:00
by snibgo
Good point, Fred, thanks. Connected-components is far simpler, as it directly gives the centroid of the component, which is the centre of the circle.

Re: find centered coeccentric circles and draw circle

Posted: 2017-02-16T07:00:41-07:00
by lojesus75
Thank you for your interest.

I will create a sample image and share it through google drive.

Thanks for your best regards