Beginner Question: Threshold of low contrast objects

Good Day,

I am a new user to imageJ and I’m trying to do some basic image processing. My goal is to measure the area/size of a cell aggregate located in the center of my image. The issue is my data set consists of very low contrast objects with my object of interest, the cell aggregate, having a similar intensity to the background. When I attempt to threshold the image it doesn’t select my object. What is the best way to get around this?

Thanks,

L

1 Like

I don’t know if I understood your problem right (not to measure the individual cells but the cell aggregate).

However to extract the aggregate in the center of the image you can apply
the “Process->Find Edges” action which gives you the following result:

Then you can apply a Gaussian Blur filter “Process->Filters->Gaussian Blur” (or try the Median filter) to work out the center structure:

Finally convert the image to a binary for measuring “Process->Binary->Make Binary”:

Use the Wand tool (in the toolbar) to select the ring or the center to make some measurements or use the Particle Analyzer to exclude particles of a certain size and automize the whole procedure on a folder of images.

Here is the recorded macro of all steps (use “Plugins->New->Macro” and paste the following lines):

run("Find Edges");
run("Gaussian Blur...", "sigma=4");
setOption("BlackBackground", true);
run("Make Binary");

Play with some filters and their adjustments to get more appropriate results! If you need a more fine grained area you can also work with a threshold instead of the edges procedure and then work with some filters to get an satisfying result.

In my example you can at least estimate an area in which the aggregation occurs.

6 Likes

Hello Bio7,

Thank you for the prompt reply! This method works very well for what I’m trying to do, thanks for the help!
I do have one additional question. When I am trying to automate the particle analysis to measure the aggregate size I would like to exclude the “white halo” of cells and select only the centre “black mass,” as it stands, when I attempt particle analysis it will select the white halo of cells as a single object which includes the central mass. My understanding is that the wand tool selects the largest object first, that isn’t background, and defines that as a single object. What would you do to select just a the centre object? I would also be interested in including the white halo of cells in my analysis to get an idea of cells that aren’t incorporated into the aggregate.

Thanks,

L

If you don’t want to use the Wand tool and automize the analysis you can e.g. invert the image “Edit->Invert” to measure the center area with the Particle Analysis and also exclude smaller areas (noise) with the “Size” or the “Circularity” options:

https://imagej.net/docs/guide/146-30.html#sub:Analyze-Particles

For a description of the Wand Tool (which works for me manually, too) see:

https://imagej.net/docs/guide/146-19.html#sub:Wand-Tool

Hello,

it’s me again. this work flow has been working out great for most of my images but here are some examples where it hasn’t been working as well.

(1) Small aggregates with very low border contrast. These are aggregates at an early stage and I would like to measure the size of these as well. When I perform the find edge -> gaussian blur the result is a poor detection of the aggregate.


Original


Gaussian Blur Sigma = 4


Gaussian Blur Sigma = 1


Outlined Aggregate

(2) When the aggregate is not surrounded by a bed of cells. The bed of cells helps in identifying the object, but when it is not present the aggregate merges with the background. This also leads to issues where non-aggregate regions are incorporated into the final object.


Example 1 - Original


Example 1 - Processed


Example 2 - Original


Example 2 - Processed


Example 2 - Analysis

I’ve tried to play around with different filters and also trying to threshold the object but I haven’t been able to replicate the workflow of find edge -> gaussian blur. Any help would be appreciated.

Thanks

1 Like

Those are really tough! I played around with a couple of things quickly (e.g., Morphological Segmentation) but in my naive hands, it seems like there is no chance. Did you try Trainable Weka Segmentation yet?

thanks for the suggestion. I’ll give it a shot and let you know.