Color Balance in Digital Imaging

The acquisition of accurately color balanced images in the optical microscope can be a challenge even to experienced microscopists, regardless of whether they are employing traditional photographic film emulsions or newer solid-state digital camera systems. Utilization of electronic image capture technology relies upon the same familiar properties of light as does conventional film-based photomicrography, but the capability of performing white balance adjustment for color balancing is a unique function of electronic image sensors that is not at all intuitive to investigators seeking to capture digital images from the microscope.

Figure 1 - White Balance Correction in 3200K and 5500k Illumination

When a captured digital image is critically compared to the image observed through the microscope eyepieces or viewed live on a computer monitor, color variations are often quite striking, and attempts to reconcile differences between the two can be frustrating. One factor contributing to this discrepancy is that, during imaging, a considerable accommodation of the human visual system to variations in imaging conditions occurs subconsciously, and color rendition problems are usually not realized until an image is recorded and the static version evaluated, often in a different viewing environment.

Presented in Figure 1 are a series of digital images recorded of the same microscope viewfield under varying conditions of illumination color temperature. The specimen is a monolayer culture of adherent Indian Muntjac deer skin fibroblast cells viewed in differential interference contrast (DIC) at relatively low (one-twentieth of a wavelength) bias retardation. In the eyepieces, the cell culture appears neutral gray in color when the Nomarski prism is adjusted to achieve the optical path difference illustrated in Figure 1, and a color conversion filter is added to the light path to raise the color temperature of the tungsten-halogen lamp from 3200K to approximately 5500K (daylight value).

Without a color conversion filter, the DIC specimen in Figure 1 appears neutral gray, but exhibits an obvious global yellow hue, characteristic of incandescent illumination, when observed through the microscope eyepieces. If the digital camera white balance function is not activated and applied to the current microscope configuration, images captured under these conditions also appear to have an overall yellow cast (Figure 1(a)). Inserting a color conversion filter into the optical pathway renders the image with a slight bluish tinge in the eyepieces, and corresponding digital images captured without white balance correction maintain or amplify this color shift (Figure 1(c)). Applying white balance algorithms to images captured with either the tungsten or daylight balanced illumination eliminates shading due to color temperature effects, as illustrated in Figure 1(b). Note that different color correction values are employed by the algorithm to balance the tonal quality of the image, depending on the illumination color temperature. Tungsten illumination requires correction values that increase blue and decrease red, while the reverse is true for daylight illumination.

Achieving proper color balance in images obtained with a digital camera system coupled to an optical microscope depends upon a number of factors, beginning with establishment of correct illumination conditions and precise microscope optical alignment, and culminating in the image capture stage. The role of white balance adjustment in obtaining the desired image is of particular importance, and this control function can be employed to either capture the most faithful rendition of a specimen, or an intentionally modified representation of the specimen aimed at correcting unwanted color casts generated by preparation artifacts.

Conceptually, coarse adjustments in white balance are required to bring the image sensor response into the appropriate range for the general illumination conditions (similar to choosing a category of film), while fine modifications are somewhat analogous to the use of color compensating filters in film-based photography. Even when the illumination source and detector response are matched, light passing through the microscope is usually modified, somewhat unpredictably, by the specimen and any other components in the optical path. Therefore, the final image obtained may vary in color balance from the desired result. It is of critical importance to understand that different specimens, and perhaps localized regions of a specimen, exert unique effects on the image-forming light. As a consequence, if accurate color balance is required, variables such as white balance adjustment must be carefully controlled.

General Concept of Color Balancing Images

Image formation in optical microscopy is based upon the fundamental properties of light, including intensity and the spectral characteristics that produce the visually perceived color, as well as the related color temperature value. The property of color temperature can be precisely defined with respect to a standard reference illumination source and is measurable instrumentally, but is not reliable in predicting how every specimen will be rendered in a given imaging situation. Furthermore, light sources having the same color temperature may have dramatically different spectral composition and produce substantially different images when viewed under similar conditions. Compounding this situation is the wide variation of effects that contrast enhancing auxiliary components can introduce into the microscope optical system. Brightfield, darkfield, phase contrast, DIC, polarized light, Hoffman modulation contrast, and fluorescence illumination all present different manifestations to color balance correction, which must often be addressed by considering the specimen and illumination conditions on an individual basis.

Figure 2 - Color Balance Errors with Contrast Enhancing Techniques

Presented in Figure 2 are several digital images captured under conditions of varying illumination color temperature and contrast enhancing methodology. An eosin and hematoxylin stained thin section of human testicular cancer (seminoma) in tungsten-halogen illumination is illustrated in Figure 2(a). Note the overall yellow cast that pervades the entire image and renders the stained moieties off-color when compared to a properly color balanced image (illustrated in Figure 7(b)). This is a common error that occurs in brightfield microscopy when a daylight color conversion filter is not inserted into the light pathway. Addition of a blue daylight filter to the optical path without correcting the digital camera for white balance can result in overall bluish tones to a digital image, as illustrated in Figure 2(b). This image of living HeLa cells in monolayer culture reveals the blue cast that occurs when the camera is not correctly color balanced. Applying white balance algorithms to the capture software will render the image in the grayscale values observed in the microscope eyepieces.

Images obtained with other contrast enhancing techniques yield similar problems when microscope illumination is not balanced for daylight color temperature and the camera system does not have the white balance properly adjusted. In Figures 2(c), 2(d), and 2(e), images captured with differential interference contrast (DIC), polarized light, and Hoffman modulation contrast, respectively, all have color balance values shifted to warmer (yellow) hues. In the DIC image (Figure 2(c)), features appear muddy and normal grayscale tones are rendered in various shades of brown and red. Likewise, the polarized light image of recrystallized urea (Figure 2(d)) appears too green, while the Hoffman modulation contrast image of a radiolarian (Figure 2(e)) has a decidedly green background (and highlights). Fluorescence images (Figure 2(f)) typically do not suffer from color balance problems, primarily because they are dominated by a small range of wavelengths.

The phenomenon of variation in color balance or color rendition is well recognized by most individuals in everyday activities and is usually accepted as a natural occurrence not requiring any intervention. For example, the golden quality of daylight near sunset is very familiar, as is the fact that colors appear dramatically different in candlelight as opposed to fluorescent office lighting. The human visual system functions by combining the sensory response of the eyes with interpretation of signals by the brain to accommodate variations in light color and intensity. As a result, white objects are interpreted as white under widely varying conditions of illumination. Typically, if white is perceived correctly, other colors and hues fall into place as well. In contrast, image sensors, whether traditional film or a modern digital camera, produce a response to illumination that is fixed at the moment of exposure. The color qualities of the image produced will depend upon the specific response of color-sensitive layers designed into the film, or the sensitivity of individual color-sensing elements (pixels) of the solid-state sensor. With either capture method, the color balance of the image can be modified by introduction of color filters into the illumination or imaging light paths, but the digital method has the distinct additional advantage of allowing electronic, precise adjustment of the sensor response.

Digital Camera White Balance Fundamentals

A sensor employed to record images, whether conventional photographic film or a digital imaging device, is generally designed or adjusted so that its base-line response matches a broad general category of illumination. Photographic films, for example, are most commonly manufactured in two major categories, suitable for use in either daylight or with tungsten illumination sources, and fine adjustments to the film response for critical applications are made by using appropriate filters. Solid-state sensors, which are typically charge-coupled device (CCD) or complementary metal oxide semiconductor (CMOS) photodiode detectors, are capable of being adjusted electronically to match their response characteristics to a variety of illumination sources.

The individual light-sensing elements of CCD or CMOS detectors are inherently monochromatic and achieve their color sensitivity either by sequentially passing the incident light through red, green, and blue filters onto the entire sensor (producing separate images for each color, which are subsequently combined), or through miniature polymeric thin-film filters that are placed in a mosaic pattern over each pixel of the array. The most common filter arrangement is an ordered mosaic array of red, green, and blue colored filters that repeats a G-R-G-B pattern over the entire sensor array. This arrangement, termed a Bayer filter pattern (see Figure 3(a)), incorporates twice as many green elements as red or blue. The additional green sensor pixels allow the imaging device to more closely approximate the color response of the human visual system, which peaks in sensitivity in the green spectral region (approximately 550 nanometer wavelength; Figure 3(b)) and, therefore, facilitates output of images having visually acceptable color balance. Adjustment of the separate red, green, and blue signal amplitudes from the corresponding pixels (or single-color images) of the sensor array is implemented through the white balance control function to allow color balancing of the acquired image. Some camera systems execute these adjustments through software instead of, or in addition to, the hardware control.

Figure 3 - Bayer Filter Array Pattern and Spectral Profiles

Digital cameras intended for general-purpose applications are familiar to many microscopists and are increasingly being adapted for attachment to microscopes as an economical alternative to dedicated research-grade imaging systems, although their capabilities are usually more limited. Because the techniques involved in utilizing digital cameras for conventional purposes may be extended to understanding factors such as white balance adjustment in microscopy applications, it is useful to initially consider the non-technical situation. The basic concepts that govern white balance adjustment are the same for general photographic applications and for imaging in microscopy.

Conventional digital cameras typically provide the user with a number of different white balance settings that are selectable as "presets". These may correspond to broad lighting categories, such as daylight (sunny or cloudy conditions), tungsten, fluorescent, or a variety of other illumination scenarios. Many cameras allow the preset values to be fine-tuned to achieve more precise color balance of images. Some cameras have the additional capability to adjust white balance by reference to a white card, a wall, or another object that should be represented as white if included in an image. In practice, the camera is positioned so that the white object fills the field of view, and white balance adjustment is initiated by switch settings or selection in an operation menu (depending upon the specific camera), after which the camera makes appropriate sensor adjustments to render the target as white.

Adjustment by reference to a defined white object is conducted under the same illumination conditions employed during acquisition of the image and can provide highly accurate color balance calibration. The procedure must, however, be repeated if the illumination changes. Advanced photographers often choose to modify their images by employing white balance settings other than the ones that match the illumination in order to achieve a desired aesthetic effect. For example, an image can be made to appear cooler or warmer in tone than it would if acquired with the "correct" white balance. Such effects are, of course, considered errors if accurate scene rendition is the intention, similar to using daylight-balanced film in tungsten illumination, or vice versa.

A popular technique of color-balancing, which should generally be avoided in critical applications, is commonly referred to in consumer cameras as automatic white balance adjustment. This method is intended to be applied to the image field as the image is acquired and functions by evaluating the overall field of view, averaging the light values present with respect to hue, and attempting to average, or zero-out, any overall color bias. The shortcoming of automatic balancing techniques is that the color values present in any viewfield represent an "average" distribution of hue, which are combined to produce a neutral gray or white. In effect, if the summed pixel response is not similar to the programmed (expected) overall average, the white balance adjustment made by the camera will not produce accurate color rendition.

The typical specimens viewed in the microscope vary widely in color distribution and often exhibit a single predominant color (especially in fluorescence). It is likely that an automatic white balance adjustment performed on a specimen exhibiting predominantly red tissue stain will produce substantially different color balance than the same procedure applied to a blue-stained preparation. Neither is likely to result in an accurate specimen representation. Attempts by the camera circuitry to balance the detector response to output an averaged overall color value will produce substantially different results on different specimens, particularly if a given viewfield has strong or dominant colors. There are, of course, examples of specimens that produce acceptable results with automatic white balancing (most likely those with a large proportion of white or gray areas), but the technique lacks the reproducibility necessary to make it routinely useful.

White Balance Adjustments in Microscopy

In considering the different approaches discussed for optimizing white balance, it is obvious that some techniques do not lend themselves to the constraints and demands of optical microscopy. Utilizing preset values for specific illumination types assumes that the characteristics of the light source are fixed and have standard values of color temperature and other spectral qualities. When tungsten halogen lamps are employed, it is common practice in microscopy to vary the lamp voltage to control the light intensity or minimize heat generation. Doing so produces a variation in illumination color temperature, which leads to incorrect color balance if a standard preset value for tungsten-type lighting is used on the digital camera. An additional source of color rendition variation results from the changes that occur in color output as lamps age during their useful life.

Similar problems exist with light sources that are optimally balanced for the daylight (approximately 5500K) color temperature region. Not only is the color temperature of "daylight" variable, but few artificial sources accurately mimic daylight spectral qualities. These difficulties could, in theory, be at least partially overcome by allowing automatic circuitry to correct for minor illumination fluctuations, but other problems often make this approach undesirable. With automatic evaluation of the image field, localized specimen variations can produce substantial errors in color balance. In general, the best approach for most microscopy applications is to restrict the white balance evaluation to a carefully chosen image area or other suitable target.

Figure 4 - Point and Marquee Selector Regions for White Balance Adjustment

When digital capture devices are utilized to image color specimens in optical microscopy, obtaining correct color balance to provide a true representation of the specimen is usually the primary goal. Intentional deviations from this strategy are usually made only to correct a problem with the specimen preparation that produces an undesirable color cast. Most scientific grade digital cameras, including those specifically designed for microscopy, rely on adjusting white balance by reference to a selected color value. In transmitted illumination, an appropriate region (usually white or a neutral gray) is chosen from the specimen field or the adjustment is performed on the illuminated field alone, with the specimen removed from the light path. In order to perform white balance adjustment in a microscope utilizing reflected illumination, a white or neutral-gray card (or section of paper) can be positioned on the microscope stage in place of the specimen. The white balance setting is subsequently acquired by measuring the light reflected from the surface of the white card.

The majority of digital cameras designed for microscopy are controlled through software residing on a host computer and are often configured to interact with a number of microscope functions. The software interface for the Nikon DXM 1200 digital camera system, for example, is representative of commercial products currently available with respect to the manner in which white balance adjustment is achieved. When the white balance adjustment window is activated in the user interface, options are made available for selecting an area in the viewfield for white balance evaluation by the camera system. The live image on the display monitor should be carefully evaluated for an appropriate white or neutral gray area to serve as a reference point for the image sensor. If the image displayed on the monitor has a color cast that differs from the color balance observed in the microscope eyepieces, the camera system must be adjusted for white balance in order to render an accurate image of the specimen. Ideally, the displayed color cast will be removed by the color balance circuitry of the camera when the proper specimen area is selected for white balance adjustment.

Several typical examples of specimen areas that can be employed to set digital camera white balance algorithms are presented in Figure 4. The specimens are a living culture of fibroblasts imaged with differential interference contrast (Figure 4(a)), a quadruple-stained thin section of starch granules in potato tissue under brightfield illumination (Figure 4(b)), and human red blood cells in phase contrast (Figure 4(c)). The regions on each image that are suitable for white balance adjustment using the area selection technique are outlined in red, while the yellow arrows indicate specific points on the images that may produce satisfactory white balance calibration when selecting a single pixel.

The region selected as a white balance reference should be as large as possible and free from the coloration effects of specimen stains that have bled into the mounting medium. The white balance adjustment software in many systems enables the selection of either a single point (pixel) in the image, or a larger area that may be designated by marquee selection with the mouse cursor. Better results are generally obtained by selecting the largest possible region. A much wider variation in results can occur if a single point is chosen for adjustment, because fluctuating localized combinations of red, green, and blue pixel intensities can contribute to the overall visual effect of white. By selection of a larger area, an average is obtained over a larger number of pixels in the sensor array, with improved probability of accomplishing acceptable color balance. Following reference area selection, the white balance adjustment is initiated, and the camera system utilizes either an algorithm or look-up table (LUT) to set appropriate electronic values (such as sensor gain for each of the component colors) that produce a neutral or white color value.

As discussed previously, the color balance of a digital image is heavily influenced by the spectrum of wavelengths gathered by the CCD or CMOS image sensor, regardless of whether the sensor is housed in a camera, telescope, laser bench, or microscope. In color digital cameras that employ these solid-state devices, a range of balance adjustments is often necessary in order to produce acceptable color images that conform to the color temperature of the illumination source. Several guidelines for successfully achieving proper color balance should be considered:

  • CCD image sensors are sensitive to infrared light, and the most reliable performance for visible light imaging can only be achieved by filtering out the longer-wavelength infrared. Some systems may incorporate infrared-blocking elements within the camera, but if this is determined not to be the case, appropriate filtration should be added to exclude these wavelengths before they reach the image sensor.
  • For any microscope configuration in which white balance adjustments are conducted on the specimen image, a blank specimen slide, or a reflected light reference (such as a white surface), the microscope should have the optical system aligned for proper Köhler illumination and be accurately focused on the specimen plane. Assuring these conditions minimizes problems of uneven illumination or color abnormalities in the viewfield resulting from chromatic aberrations.
  • Typically, an image sensor's performance is optimal in the higher color temperature regions, which requires tungsten-halogen illuminators to be operated at the upper end of the suggested voltage adjustment range for digital imaging. Any necessary reductions in illumination intensity should always be made with neutral density filters rather than by reducing the voltage to the illuminator lamp. Similarly, proper color balance is most readily achieved with digital cameras if the color-balancing filter generally employed for photography on daylight-balanced color film is inserted into the illumination pathway. Nikon refers to this filter as the NCB (neutral color balance), although other manufacturers have different designations for filters having the same purpose.
  • Adjustment of white balance on a neutral gray region in the specimen field may produce a more accurate result than if an extremely bright area is chosen as the white reference. Areas that are completely "washed out", or beyond the dynamic range of the sensor, may appear white in the image as a result of over saturation by one or more component (RGB) colors. Gain compensation performed by the color balancing circuitry on such an area may produce inaccurate or non-reproducible results. Gray areas (having neutral density) are produced from approximately equal signal levels of the red, green, and blue pixel sensors (or of the separate RGB color images). As a result, accurate color balancing based on a neutral area is more readily accomplished.
  • Several variables affect the color balance of images acquired in the microscope, and an understanding of their interrelationships is important in achieving acceptable results. Exposure settings conducted through the imaging software interface are made by gain adjustments of the image sensor circuitry. Because white balance adjustment is also effected through selective gain compensation of the RGB sensors, exposure level should be set to an approximately correct value prior to commencing the white balance adjustment. If exposure time is altered, or other changes to gain and offset are required after white balance correction has been set, it is advisable to repeat the white balance-setting step, as all of these factors interact with one another. Similarly, changes made to microscope components that affect the light properties, such as diaphragm adjustments, filter changes, and switching objectives, may alter the white balance and require performing the correction once again in order to obtain the most accurate images.
  • If a particular application requires making critical color judgments or comparisons between one specimen and another within a selected group (where the specimens have been prepared according to a standard procedure), it is important to not repeat the white balance adjustment on each specimen. In this case, the best procedure is to perform an initial white balance calibration for the illumination alone (with a blank microscope slide in place), and then acquire an image of a single specimen, making any necessary exposure adjustments. After substituting the blank slide for the specimen once again, the white balancing routine should be repeated on the illuminated field without making any changes to the exposure or microscope configuration. The specimens being compared should then be imaged at the same settings of white balance, exposure, and so forth. If exposure changes are required, they should be kept to a minimum in order to avoid affecting the color balance. Restating the crucial concept in this type of application (in which color rendition is being compared among specimens for testing or diagnostic purposes), the white balance adjustment should be performed on the light source alone and not corrected for each specimen. Comparison is therefore possible with regard to the color effect that each specimen imparts on the microscope illumination source.
  • Certain illumination and contrast enhancing techniques employed in optical microscopy present additional challenges in adjusting white balance of the digital capture system. Polarized light, darkfield, and fluorescence methods commonly present viewfields in which the specimen is rendered in deeply saturated color on a dark background, with few or no areas of white. Some camera systems provide a mechanism to set dark balance or black balance for imaging situations of this type, in which no suitable white or neutral gray area is available. This method establishes a baseline setting for the sensor response and may provide satisfactory color balance.
  • An alternative technique for dark-background specimen images is to perform white balance adjustment on the illuminated field with the specimen removed. For highly saturated, deeply colored specimens, however, the proper exposure for imaging may require extremely bright illumination or relatively high camera gain settings. This may limit the accuracy of the white balance adjustment if it is conducted on the bright illuminated field in the absence of the specimen. In order to allow the white balance circuitry to evaluate the illumination at a brightness level similar to that existing with the specimen (and at approximately correct exposure settings), a neutral density filter may be inserted into the light path during the white balance adjustment, and then replaced with the specimen for actual imaging. Some experimentation is required in order to choose a neutral density filter that approximates the transmission profile of the specimen.

White Balance Manipulation

Situations are often encountered in which acceptable white balance cannot be achieved during image capture by following the usual protocol. In these cases, non-standard techniques can sometimes be employed that will effectively "deceive" the white balance function of the camera to produce a specific color balance, which may or may not be considered correct, but achieves the desired effect. If even this strategy fails to provide acceptable color rendition, or if existing images were initially acquired with poor color balance, post-acquisition image processing with a software such as Nikon's NIS-Elements can provide some degree of correction.

The basic technique for "forcing" the white balance function to deviate from its normal behavior is to perform the white balancing on a color other than white. If a non-white hue is presented to the camera as being white, the sensor gain circuitry will attempt to push the output toward the opposite (or complementary) color to compensate for the non-white hue. In effect, the relative magnitude of the red, green, and blue channels is altered to reproduce the color as white, while at the same time pushing other colors in the image toward the same complementary hue. For example, an image having a reddish cast that is not acceptably corrected by the camera's circuitry can often be balanced by calibrating on a red reference target. In an effort to reproduce the red target as white, the blue and green pixel output of the sensor are both increased, adding the complementary cyan hue necessary to compensate for the red. By similar logic, color balancing on a yellow target would result in the addition of blue to the overall image. Application of this technique for color balancing requires careful analysis in order to determine which hue can effectively be added or subtracted to correct the image problem.

Figure 5 - Forcing White Balance Calibration in Digital Images

Presented in Figure 5 are several digital images of specimens that suffer from color casts as a result of masks or preparation errors. The integrated circuit (imaged in reflected light differential interference contrast) illustrated in Figure 5(a) contains a silicon nitride passivation layer on the surface that acts similarly to a yellow filter. Wavefronts reflected from the surface of the chip must pass through the coating before reaching the objective, and many of the shorter wavelengths (blue and green) are blocked. By calibrating the digital camera white balance on the point indicated by the yellow arrow in Figure 5(a), the yellow cast created by the passivation layer is largely eliminated to yield an image having excellent color balance (Figure 5(b)). Likewise, an overstained thin section of (American basswood tree), depicted in Figure 5(c), can be corrected in the same manner. Selecting a pixel for white balance calibration in an area devoid of tissue (see the yellow arrow; Figure 5(c)) yields an image with a clean, white background and nicely saturated colors (Figure 5(d)). Fluorescence specimen preparations can often bleed unbound fluorophores into the surrounding mounting medium to create a similar "overstaining" effect, as illustrated in Figure 5(e) for a fern thin section. Setting the white balance digital camera calibration with a pixel on a counterstained feature (yellow arrow in Figure 5(e)) often reduces the amount of background fluorescence (Figure 5(f)) in the final image.

In order to apply the techniques described above, a variety of color filters is often useful for transmitted light configurations. Filter sets designed for color photographic printing are appropriate for this purpose. The sets contain a range of densities in each primary color and can be combined to produce any hue required. For reflected light microscopy, suitable reflection color references are required for the non-white balancing. It is not necessary that the targets conform to any color standards, and experimentation is usually required to produce the desired result. Any colored reflective surface can be employed, but it is desirable to have available a wide range in variation of hue and saturation. The paint color sample cards available at home centers or paint stores are ideal for the purpose, as they are provided in nearly every conceivable color variation. In some cases, selected regions of the specimen itself can be utilized to set off-color white balance calibrations.

Whether utilizing filters in transmitted light or reflective targets (such as the paint sample cards) in reflected light, the concept of manipulating the camera's white balance function is the same: white balance calibration on a non-white color will cause the camera's circuitry to remove the target color and render it as a more neutral gray hue. In most cases, only a subtle change is desired, and experimentation will determine the hue and saturation of target that will produce the necessary change in overall image balance. Balancing on a pale blue color will cause an overall warming effect, or a shift toward red. Conversely, employing a pale red color as the reference will produce a bluish shift toward cooler color balance. Other color corrections follow the same general logic. Performing white balance on any given color will tend to cause the camera's circuitry to shift the color balance toward the complementary color. It is important to emphasize that these non-conventional color balancing techniques are a potential mechanism for achieving the desired result when the usual methods have failed (for reasons related to a particular specimen preparation, light source, or imaging device). In these cases, it still may be possible to acquire acceptable images by offsetting the camera's response to the specimen color palette.

While it is always preferable to initially acquire images with proper color balance, some degree of correction is possible after acquisition by application of post-processing operations through image editing software. These procedures are not a substitute for proper in-camera white balancing and must be used judiciously in order to avoid unacceptable changes in specimen rendition. General alterations to color balance will affect all areas of the image, but this is sometimes an acceptable compromise since minor changes will produce comparatively large variations in background tone while having a smaller effect on more intensely colored specimen features.

Adjustments to color balance made in image editing programs can take on different forms depending upon the level of control desired. Manipulations can be made to the red, green, and blue color channels directly by changing the relationships between input and output values for each channel, or the modifications can be carried out on the combined RGB signals. Details of the post-acquisition color balancing procedure can vary depending upon the approach and the particular software employed. Several techniques for image adjustment are described below for the popular software package Adobe Photoshop, although any image processing program that provides similar features can be employed.

Figure 6 - Color Balance Adjustment with Photoshop Levels Settings

Many image editing programs provide exceptional power and versatility, and a high level of control over tonal balance, saturation, and other characteristics is possible. A rapid and simple alteration of color balance can, in many cases, be adequate to correct minor problems and in Photoshop may be accessed through the Levels or Curves windows of the Image adjustment menu. In either window, three eyedropper icons appear, which may be individually selected by clicking with the mouse. After selection of an eyedropper tool, the mouse cursor may be used to sample the color value of image pixels by clicking in the image area. The left and right droppers establish the white and black image values, while the center eyedropper tool controls the midtone (grayscale) values of the image. It is the midtone gray level selector that provides the most direct approach to quick correction of color balance problems.

Color balance adjustments using the Levels feature in Photoshop are presented in Figure 6 for several digital images captured in the microscope. The fibroblast cells in Figure 6(a) were recorded using tungsten-halogen illumination without a daylight filter in the light path and, thus, have an overall yellowish cast. Using the midtone eyedropper setting on a region devoid of cellular structure (yellow arrow in Figure 6(a)), the color cast is effectively removed from the processed image (Figure 6(b)). Alternatively, the white level eyedropper setting can eliminate the yellow cast produced by tungsten-halogen illumination in a stained thin section (Figures 6(c) and 6(d)), while the black level setting is employed to reduce the level of overstaining on a fluorescence image (Figures 6(e) and 6(f)). In the latter example, the eyedropper tool can be used to select between pixels with varying degrees of red background levels to maximize the reduction in unwanted fluorescence.

Similar to the Levels feature, the Curves adjustment option in the Photoshop software offers both a simple and direct means of specifying white, black, and gray values by selection in the image area, as well as enabling interactive adjustment of image gamma. Color balance adjustments may also be performed through the Levels option in a similar manner, as described above. After opening the image file to be modified, select Image/Adjust/Curvesfrom the menu bar, which will open the Curves adjustment window. Select the middle eyedropper button by clicking with the mouse cursor, and then evaluate the image to identify an area that should be rendered as a neutral gray tone. Clicking on this area should bring the image into approximately correct color balance.

When using the Levels or Curves Photoshop tools, ensure that the Preview checkbox is selected so that the changes are immediately reflected in the image for evaluation. By repeatedly clicking on different regions in the image, it is usually possible to find an appropriate gray value that will produce acceptable color balance. In some instances, no appropriate gray or midtone value is present in the image, and in such cases the eyedropper selectors for the black or white levels may yield a superior result. These are employed in similar fashion to the midtone balancing operation. Clicking on the left-hand dropper button (which appears in the software to be halfway filled with black ink) should be done before selecting a black or dark area in the image, while clicking the right-hand dropper makes it possible to balance on a white area in the image. Through experimentation, an acceptable correction of off-balance color can usually be accomplished for a wide variety of incorrectly color balanced digital images.

Following the adjustment of color balance, modifications of the image brightness and contrast can be produced by manipulating the gamma curve characteristics. The graph area in the Curves window enables the curve to be reformed to any shape by clicking and holding with the mouse cursor while dragging. Overall changes to image brightness and contrast are most readily produced by operating on the combined RGB curve, which will have the minimal effect on the color balance (previously adjusted). It is possible, however, to make changes to gamma for the individual red, green, and blue color channels by selecting each from the pull-down menu and reshaping the curve for that channel by dragging with the mouse cursor. These adjustments to the individual color channels will, of course, have an effect on the relative color values and offer another technique to fine-tune and evaluate color balance variations.

When the proper color balance has been achieved, before the Curves adjustment window (or other image adjustment function) is closed, the correction that has been applied can be saved for utilization with other images (for example, those that may have been acquired under similar conditions). This technique can be valuable for application to a series of images with similar color balance deficiencies, even if they do not have suitable neutral or white areas. If one image of a series has suitable gray values for balancing, or can be corrected initially by curve manipulation, the same correction is often appropriate for similar images. To apply a saved correction, the target image is opened, and from the Curves (or Levels) adjustment window, the saved file is loaded. Once the correction factor is applied, the image may be evaluated to determine if additional curve adjustments are necessary.

Figure 7 - Color Balance Adjustment with Photoshop Curves Settings

A series of digital images corrected with the Photoshop Curves feature is presented in Figure 7. The stained human tissue in Figure 7(a) has a yellow color cast that often appears in eosin and hematoxylin stained specimens. Using the white level eyedropper tool to select a background region (yellow arrow in Figure 7(a)) renders the image with proper color balance (Figure 7(b)) in a manner similar to a didymium filter and traditional film. The bluish cast present in phase contrast images recorded with a daylight filter in the optical pathway (Figure 7(c)) can be removed (Figure 7(d)) by selecting a background area for curves adjustment with the midtone eyedropper. Finally, the green background in a Hoffman modulation contrast image of a radiolarian skeleton (Figure 7(e)) is easily removed (Figure 7(f)) with the midtone eyedropper tool.

A phenomenon termed approximate color consistency enables an individual to mentally correct for variations in illumination to make an object appear white if it is "known" to be white. The degree to which this adaptation of color rendition occurs varies depending upon whether there is a reference light source in the field of view. In everyday situations, where the viewer is immersed in or surrounded by a dominant illuminant, the accommodation is readily made. For example, a white piece of paper viewed outdoors in sunlight is seen as white, and if brought indoors and viewed under dim tungsten illumination, it still appears white. This subconscious adjustment occurs in spite of the fact that the paper is reflecting far more long-wavelength yellow and red light when viewed under the incandescent lamp. The color-balancing accommodation is not usually made when viewing color photographs or television because other light sources, which serve as references, are present in the surrounding environment. In general, there exist many possible variations between physical reality and perception, and an awareness of these factors is important for correct color balancing of images captured in the microscope.

A final consideration, therefore, in the evaluation and adjustment of color balance is the effect of viewing environment on color perception. If images are being viewed on a computer monitor, the monitor's display parameters should be carefully calibrated, both in the computer software and with respect to the monitor's hardware adjustments for brightness, contrast, and so forth. These variables are particularly important if more than one monitor is being employed, as might be the case if one display is dedicated to the digital camera on the microscope and another is being used with a printer or alternative output device. When color judgments are being conducted by comparison involving different display methods, or under different illumination conditions, these factors must be taken into consideration. For example, viewing a captured image on a monitor may result in different impressions of color balance depending upon whether the monitor is utilized in a darkened room as opposed to a room flooded in daylight or bright fluorescent light. Similarly, microscope slides being evaluated visually for overall color casts, such as those resulting from stain bleeding into mounting media, will appear quite differently when held up to a window than when viewed with a tungsten lamp. Acquiring properly color balanced images in the optical microscope ultimately involves the interacting components that determine how specimen color is recorded during capture and how it is perceived before and after it is captured.

In conclusion, a lack of proper color temperature balance between the microscope illumination source and the film emulsion or image sensor calibration is the most common reason for unexpected color shifts in photomicrography and digital imaging. If the color temperature of the light source is too low for the film or sensor characteristics, resulting photomicrographs and digital images will have an overall yellowish or reddish cast and will appear warm. On the other hand, when the color temperature of the light source is too high, resulting images will have a blue cast and will appear cool. The degree of mismatch will determine the extent of these color shifts, with large discrepancies leading to extremes in color variations. Identical effects occur with solid-state digital camera systems. As problematic as these color shifts may seem, they are always easily corrected by the proper use of conversion and light balancing filters, or by proper calibration of a digital camera's white balance circuitry.

Contributing Authors

Thomas J. Fellers and Michael W. Davidson - National High Magnetic Field Laboratory, 1800 East Paul Dirac Dr., The Florida State University, Tallahassee, Florida, 32310.

Share this article:

Color Balance in Digital Imaging

Introduction