Artifact objects along the image border

Hi,

I collected large 6x6 stitched images and want to identify and count nuclei using Cell Profiler. I had to black out portions of the images that are out of focus using ImageJ (selected ROIs and pressed delete). When I try to identify primary images using Cell Profiler, it identifies a lot of artifact objects along the border with the blacked out portion ( the link to access raw and processed images and the pipeline is attached). How can I solve this issue?

https://jh.box.com/s/m1wi0rru2v91p8axm60ro2tdd7auer8i

Your help is greatly appreciated.

Thank you!

Hi Moredata

Your pipeline is corrupted for me, so I created a new version. This occurs because you have not masked the image. All I did was find your outline (pixels that are not part of your image), expand by a few pixels (only necessary depending on removing objects that touch the boarder), and then identifying the cells.

outline.cpproj (645.6 KB)

Best
Lee

2 Likes

Hi Lee

Thank you so much for your help. I am new to image analysis, so a bit of a naive question: why does masking have an effect on the downstream Otsu thresholding and object identification? For example, I ran your pipeline without masking and it identified zero objects as a result. Should I be doing masking in my situation even if I do not see artifacts?

Hi Moredata

The pixels that are black (0) in you example image, is a result of merging multiple images together. OTSU is using all the pixels in your image, including the ~30% of the pixels that are black. However these pixels are both not part of your image and dilute from real pixel information which OTSU is trying to identify. OTSU is trying to determine foreground and background, so if you do not mask you are artificially inflating the background making it more difficult for thresholding calculations. I would always mask pixels that are not part of the image for all sample analysis.

Best
Lee

1 Like

Hi Lee,

Thank you! Would OTSU adaptive thresholding be effected as well by black pixels?

Hi Moredata

Because OTSU adaptive is a moving threshold by takings small blocks of your data, because you have not determined the edges with a proper mask, I would predict that this off target effect would be exacerbated. These non-background pixels do not provide any information and tend to mislead normal distribution patterns. Is there a particular reason you wish to keep them in? You can normalize your final results to the total area (not including the non-background), which give greater statistical power than not.

Best
Lee

Hi Lee,

Nope, no reason to keep the non-background pixels. I will apply the mask as you suggested. Many thanks for your help!

1 Like