Posted by
ctrueden on
Oct 03, 2013; 5:07pm
URL: http://imagej.273.s1.nabble.com/Segmentation-Problem-tp5005009p5005030.html
Hi Michael & Pascal,
Here is a potential approach that might work with some fine tuning:
1) Use Trainable Weka Segmentation to separate white cells from red cells
from background.
2) From the white cells mask, clean up the mask as best as possible using
morphological operations (e.g., Process > Binary > Open).
3) Since cells are blob-shaped (i.e., not too long and skinny), use
Ultimate Points to compute cell centers from the Euclidean distance map.
Here is a macro for steps 2 & 3:
call("trainableSegmentation.Weka_Segmentation.getResult");
selectWindow("Classified image");
setAutoThreshold("Default dark");
setThreshold(0, 60); // threshold to white cells only
run("Create Mask"); // create a mask of the white cells
run("Open"); // clean up the mask a little
run("Ultimate Points"); // compute segmentation centers from EDM
setAutoThreshold("Default dark");
setThreshold(30, 255); // threshold to only centers of radius 30+
run("Create Selection");
selectWindow("Classified image");
close();
selectWindow("mask");
close();
selectWindow("2151833.png"); // switch back to the original image
run("Restore Selection"); // show cell centers overlaid on original data
It assumes you have opened the data (2151833.png), then run Trainable Weka
Segmentation to perform the initial segmentation (see attached
trainable-weka.jpg).
My initial results are not perfect (see attached results.jpg) but not bad.
Further fiddling of the TWS classifier might improve matters. And once you
have a really good classifier, you can fully automate the process for
additional images; for details see:
http://fiji.sc/Trainable_Weka_Segmentation#Macro_language_compatibilityRegards,
Curtis
On Thu, Oct 3, 2013 at 11:08 AM, Cammer, Michael <
[hidden email]
> wrote:
> I tried converting to HSV, media filtering, and segmenting each with
> simple threshold or find edges / variance and use logical AND to narrow to
> the white cells. Isolating the white cells from everything else is simple
> but I couldn't get the cells to separate from each other. If anybody else
> has a method, I'd be very interested to hear it too.
>
> But if she has fewer than 1000 or so cells, I'd just trace them.
>
> Regards,
>
> Michael
>
>
>
> -----Original Message-----
> From: ImageJ Interest Group [mailto:
[hidden email]] On Behalf Of
> Pascal Lorentz
> Sent: Wednesday, October 02, 2013 7:54 AM
> To:
[hidden email]
> Subject: Segmentation Problem
>
> Dear List
>
> I got this Image of muscle fiber (Fiber-I white and Fiber-II red) from a
> user:
>
>
http://www.picfront.org/d/91MZ>
> She wants to compare white versus red cells. She needs the percentage of
> cells (white vs red) but only cells that have a circularity between 0.6 and
> 0.8 should be considered. Truncated cells should be excludes as well. I am
> able to seperate white and red cells but just area wise. I would be glad if
> anybody as a good procedure to segment the single cells (if possible at
> all).
>
> Thanks a lot for your help
>
> Pascal
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html