A histogram is a graphical representation of the distribution of pixel values across the available bit-depth of an image. Histograms are an extremely useful tool for investigating the quality of an image, both during image acquisition and post processing. In an ideal histogram, there will be recognizable peaks between the background and foreground (sample of interest) in an image, having the lowest possible number of oversaturated pixels. In this blog post we review several images and their associated histograms, and then discuss the consequences of poor image quality.
Histograms and ImageJ
Viewing a histogram using ImageJ is accessible through the Analyze/Histogram (Ctrl+H) function. The logarithmic scale is available to view by hitting the “log” button. Below are representative images of nuclei (stained by DAPI) taken at two different acquisition parameters (Figure 1). The histogram associated with the left image has a very strong background peak at the lower end, and a healthy distribution of pixels in the secondary peak (Figure 2, left). The histogram associated with the right image (Figure 2, right) actually has three peaks, where the last peak illustrates a large number of oversaturated pixels in the 8-bit image (count=255).
Figure 1: Representative images of nuclei (stained by DAPI) taken at two different acquisition parameters. The image on the left meets the requirements for image analysis, while the right image is oversaturated.
Figure 2: The associated histograms with the images in Figure 1.
If we can distinguish the cells from the background, why does oversaturation matter? The images below are a subregion of the images in Figure 1. In the ideal image (Figure 3, left), the variation of intensities makes it possible to discern individual nuclei, which enables more accurate nuclei segmentation for image analysis. In contrast, the oversaturated image (Figure 3, right) has thousands of clumped pixels all at the maximum value, making it impossible to discern individual nuclei with high accuracy.
Figure 3: Subregion of images in Figure 1.
We have reviewed the consequences of an oversaturated image… but what about one at the opposite extreme? When an image has a low number of counts in all pixels, detail in the image is lost. In the image below (Figure 4, left), epithelial cells can be recognized along with strong signal in regions along the edge of the tissue. In the associated histogram (Figure 5, left), there is good separation between the thin background peak and the foreground peak; the foreground peak has a healthy distribution of values which is more prevalently displayed in log-scale. In contrast, the right image (Figure 4, right) looks extremely pixelated and is absolutely unusable for image analysis. This is supported by the associated histogram (Figure 5, right), that only has a single peak with a width of ~10 pixels wide.
Figure 4: Representative images of epithelial cells (stained by αVβ6) taken at two different acquisition parameters. The image on the left meets the requirements for image analysis, while the right image is extremely pixelated.
Figure 5: The associated histograms with the images in Figure 4.
Here at Visikol, each image goes through rigorous quality control checks before image analysis and data quantification is performed. If your team is facing obstacles relating to the quality of images acquired at your facility, our team would be happy to assist!