Draw circles using ultimate point data

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Draw circles using ultimate point data

jmcginnity
Hi,
I have an image of overlapping bubbles and would like to draw circles from the Ultimate Point data (Process-Binary-Ultimate Points) of this image.  Is there a plugin or macro that has been written that takes the pixel value (which is equivalent to the radius) at each ultimate point and constructs a circle at each point.  I then wish to compare the generated circles with the original image to see how well the radii determined via Ultimate Points matches the true radii in the original image.

Overlapping bubbles

Thanks,

Justin
Reply | Threaded
Open this post in threaded view
|

Re: Draw circles using ultimate point data

jomwalke
jmcginnity wrote
"draw circles from the Ultimate Point data (Process-Binary-Ultimate Points) of this image"
Here is a macro I've been working on to do this.

W = getWidth();
H = getHeight();
for (i=0; i<=H+1; i++) {
        for(j=0; j<=W+1; j++) {
        r = getPixel(i,j);
        if (r==0) moveTo(i+1, j+1);
        else makeOval(i-r, j-r, r*2, r*2);
        Overlay.addSelection
        }
}