Image Segmenting/ Segmentation Assistant

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

Image Segmenting/ Segmentation Assistant

Wilson R S (AT)
Hi Listers,

 

I am looking for a way off auto segmenting an image.

I have a thresholded image with a few ROI's, I need a method/plugin/or
algorithm that will automatically select these so that they can be cut
and transferred to single images of their own.

The segmentation assistant does what I need in a manual way, I want to
try and skip the step of having to select the ROI by hand.

 

Any help would be much appreciated, even if its just to point me at a
previous thread.

I have searched the archive but couldn't find anything relevant.

 

Thanks in advance.

 

Rhod
Reply | Threaded
Open this post in threaded view
|

Re: Image Segmenting/ Segmentation Assistant

Ben Tupper
Hi,

The following example will create a copy of the image within the  
bounding box of each ROI.  Note, that if you want to have only the  
pixels that fall in an irregular ROI, you'll need to modify the macro  
to...

create a blank image the size of the bounding box,
use the magic wand to select the original ROI pixels,
copy the selected pixels,
and finally, paste the copied pixels to your blank image.

Cheers,
Ben

*** begin
run("Blobs (25K)");
setAutoThreshold();
//run("Threshold...");
setThreshold(125, 255);
run("Convert to Mask");
imgID = getImageID();
run("Set Measurements...", "area bounding redirect=blobs.gif  
decimal=3");
run("Analyze Particles...", "size=0-Infinity circularity=0.00-1.00  
show=Nothing display include record");

for (i = 0; i<nResults;i++){
        selectImage(imgID);
        x0 = getResult("BX", i);
        y0 = getResult("BY", i);
        w = getResult("Width",i);
        h = getResult("Height",i);
        run("Specify...", "width="+w+" height="+h+" x="+x0+" y="+y0);
        run("Copy");
        run("Internal Clipboard");
        rename("blob-"+i);
}
**** end
On Jan 26, 2009, at 4:29 AM, Wilson R S (AT) wrote:

> Hi Listers,
>
>
>
> I am looking for a way off auto segmenting an image.
>
> I have a thresholded image with a few ROI's, I need a method/plugin/or
> algorithm that will automatically select these so that they can be cut
> and transferred to single images of their own.
>
> The segmentation assistant does what I need in a manual way, I want to
> try and skip the step of having to select the ROI by hand.
>
>
>
> Any help would be much appreciated, even if its just to point me at a
> previous thread.
>
> I have searched the archive but couldn't find anything relevant.
>
>
>
> Thanks in advance.
>
>
>
> Rhod
Reply | Threaded
Open this post in threaded view
|

Re: Image Segmenting/ Segmentation Assistant

dpoburko
In reply to this post by Wilson R S (AT)
Wilson R S (AT) wrote:

> Hi Listers,
>
>  
>
> I am looking for a way off auto segmenting an image.
>
> I have a thresholded image with a few ROI's, I need a method/plugin/or
> algorithm that will automatically select these so that they can be cut
> and transferred to single images of their own.
>
> The segmentation assistant does what I need in a manual way, I want to
> try and skip the step of having to select the ROI by hand.
>
>  
>
> Any help would be much appreciated, even if its just to point me at a
> previous thread.
>
> I have searched the archive but couldn't find anything relevant.
>
>  
>
> Thanks in advance.
>
>  
>
> Rhod
>  
To clarify, are you looking for an algorithm that will automatically
determine threshold values for segmentation, or just to generate and
copy the regions once you have set the threshold manually?  Will you be
applying a  set threshold level to a  number of images?
Cheers,
Damon