Thresholding with high background

Hi all! I am having some trouble optimizing thresholding for a tissue stain that has relatively high background.Does anyone have any recommendations for this/how to remove background?

Could you give us an example image, describe what you want to threshold (a particular channel, part of the color space), and what your end goal is?

An example image would help us to understand the modality of the imaging. Is this tissue stain fluorescent or is this a colormetric stain? Is there a counterstain or background stain? If you have a color image, we may be able to help you transform the colors into a color space which would facilitate thresholding. Perhaps rather than “thresholding” what you really want is to segment areas of interest which might be made easier using some linear filtering or more involved processing.

To get the most out of posting here, please be as specific as possible and provide examples. Thanks.

1 Like

Well maybe breaking into an open door but you can look for background subtraction method.
In ImageJ/Fiji you have Process>Subtract background that will do a rolling ball background subtraction. The option sliding paraboloid can give some nice result too.

In CellProfiler there are even more options with spline or polynomial methods, they basically generate a background image by fitting such function on your image (or a smoothed version of it).

If you can do coding opencv has something called BackProjection that can remove the major “color/graylevel” from the image

1 Like