Cropping and Image Intensity Change


I am working on a pipeline which identifies child objects inside of the nucleus. The pipeline currently set to where C.P. identifies the nucleus and I manually select which nuclei I would like to keep. The objects I decide to keep are then cropped or masked (I’ve tried both methods) from the original image. The threshold of each nuclei is analyzed on an otsu per object bases and immunofluorescent objects (foci) are identified. But the problem is that the intensity of the nuclei is altered when it is cropped and placed onto a new background. What I observe is that the background noise of the nuclei becomes pronounced and the program has a difficult time distinguishing background from the immunofluorescent objects. I attached an image to help describe the problem. Is there any way around this? Is there any way we can revert the illumination of the cropped images back to the intensity of the original image? I would appreciate any help.

Thank you,

Hi Frank,

When you say that the “intensity of the nuclei is altered”, do you mean that if looked at the same foreground pixel location in both masked and unmasked images, the intensity value is different between the two? If that’s the case, then that shouldn’t occur and it’s a definite problem.

However, if rather you are talking about a difference in appearance of the masked/unmasked image in the two panels, that is not necessarily surprising. The default behavior of the image panel in the display window is to normalize the intensity to the highest and lowest pixels in the respective images, which is most likely different between them. The masked pixels are shown as black (i.e, zero) so the higher-intensity pixels often look lower-contrast in comparison.

Also, per-object thresholding is different than thresholding on an unmasked image, so I’d say it’s understandable that your results would differ. However, as I said above, it should still be the case that the actual pixel values should be same between the two. I suggest that if you are sticking with per-object thresholding, you will need to adjust the other module settings to suit.


Hi Mark,

Thanks for the reply and helpful information. Its really difficult to select the same pixel twice in different images but the values seem to be the same, which means that the otsu threshold for the cropped image is giving me different results. Is there any way I can manually select nuclei and run an per object analysis without cropping/masking? I hate to ask but I feel I have exhausted all of my options.


Hi Francisco,

Would you mind uploading your pipeline and a sample set of images? I’m having a hard time grasping what the problem is exactly. When you say “the otsu threshold for the cropped image is giving me different results”, different than what, the non-cropped image? Once you crop out the majority of the dark, extranuclear pixels, the Otsu threshold will necessarily change dramatically. So I expect the per-object threshold will be much higher than an Otsu threshold on the whole image. But does it make any difference? All that matters is that you segment your intranuclear foci properly. But maybe I just am just missing the point! Help us by giving more concrete examples.