Visual color matching

Visual color
matching
www.edmundoptics.com
www.edmundoptics.com
Visual Color Matching
Color is one of the most important factors we as humans use to inspect and differentiate objects. On a daily basis we use color to make a variety of decisions. Is this food edible? Do my
socks match? Should I stop at this traffic light? Qualifying products based on color perception is a useful tool and can be done with a visual color matching system. The perception
of color is subjective in nature and can be effected by outside factors such as lighting, environment, and an objects’ material. The definition of color is visual perception by which
the spectral aspects of a visual stimulus are integrated with its illuminating and viewing
environment. Using the definition above, a camera does not see color on its own, but rather a
camera detects levels of integrated spectral information. The spectral information gathered by a
camera does not become a “color” until the data is perceived by a human observer under a defined
set of viewing conditions. Further complicating Visual Color Matching is the fact that every human
observer sees, interprets and describes color differently; therefore, a standard model of human
observers is required in order to automate Visual Color Matching.
Difference between Visual color matching and color sorting
Human visual modeling is necessary for applications that need to predict how a product will look and be interpreted by the final end user. Color
sorting applications do not require a human model because they simply need to sort objects with obvious “color” or spectral differences. One such
example demonstrating the difference between visual color matching and color sorting is hard candy manufacturing and packaging. The candy
manufacturer may want to guarantee that if a 5 flavor roll is being made, the red candies in each roll look the same. Furthermore the manufacturer
will want to ensure that packaging color from roll to roll will be the same so that when stocked on the store shelf, the customer perceives that all
products from the manufacturer are of the same quality. A visual color matching system is needed to predict whether two red candies will look different to a customer as well as ensure that all packaging looks the same across the same product or brand. A color sorting system would be used to
make sure there is one of each color candy in the roll, so that the customer doesn’t end up with all red candies. Visual Color Matching systems are
becoming increasingly more important as products and brands are reaching a more sophisticated global audience. Visual Color Matching systems
are often the least understood color systems since they need to model human perception while being sensitive and rugged at the same time.
Visual Color Matching systems require additional setup, processing time, and knowledge of the test conditions and final viewing conditions.
In most cases, a person will be viewing the product in a store, outdoors, or in the home/office. The test conditions must model how two products
will look next to one another in the final viewing conditions. This can be done by choosing an ideal product or “reference” that every other product
should visually match. This process is often referred to as a relative color analysis. Visual Color Matching systems will measure the visual color differences between each product under test and the “reference” product. In order to provide realistic and consistent color difference measurements
there are many factors that must be considered; light sources, object characteristics, color models, detection devices and environmental conditions.
It is important to remember throughout the system setup that visual color differences are being measured not absolute color.
Lighting
The images demonstrate the spectral
characteristics of 'white' light from fluorescent light (top), LED (middle) and
metal-halide (bottom).
101 East Gloucester Pike | Barrington, NJ USA 08007-1380 | 1-856-547-3488 | www.edmundoptics.com
® COPYRIGHT 2007 EDMUND OPTICS, INC. ALL RIGHTS RESERVED
Both images were taken under the same
flourescent illumination. The image on
the bottom has been white balanced using a white balance target (Edmund
Optics part 58-604), providing more
realistic coloring.
Since Visual Color Matching systems must perceive color the same as human observers, the first
consideration of the test setup is the lighting and how light interacts with the products being
tested. One must consider the following three lighting elements and how each will effect color
difference measurements: intensity stability, spectral characteristics and geometry of the light
source.
Lighting should have intensity stability, which means the total amount of light emitted from
the source should remain constant over time. Changes in intensity will change the appearance
of a product’s color. Even though manufacturers provide stability information on light sources,
the source should be tested in the actual production environment. Small changes in ambient
temperature can have dramatic effects on a lights’ intensity. Some fluorescent lights can have a
5 - 10% intensity change due to an ambient temperature change as little as 10%. It is important
to consider the full range of temperatures that the light source will have to operate in; including
daily and seasonal changes. It may be necessary to control the temperature in the test environment with fans or other methods for stable output.
In addition to temperature, the flicker rate of a light source can also affect the output stability from one color measurement to the next. Fluorescent lamps, which commonly operate at
60 hertz, do not have continuous output and color measurements, could vary. This becomes an
obvious issue if fast acquisition times are needed to measure products on an assembly line.
In addition to the total intensity of a source, the spectral characteristics must be considered.
The light source needs to include emission at every wavelength within the visible range. If an object is blue and the light source does not have sufficient blue emission, the object will not reflect
any blue light and realistic results cannot be obtained. This is the primary reason “white” lights
are used in color testing systems.
Since the final viewing light may be different than the test light, the measured color data of
the product should be independent of the test light. Canceling the test light ('zeroing' the system)
will provide relative spectral/colorimetric data for the product. Zeroing the system will also account for the different color sensitivities between detectors. Zeroing the system can be done by
performing a white balance using a white reflectance standard. White reflective standards can
be made from Spectrolan, which is a durable and washable material but fairly expensive. White
balancing can also be performed with less costly white reflectance test cards.
Most machine vision cameras offer some level of white balance capability. The primary
purpose is to cancel out any “coloration” being added by the light source. Once the white balance
is performed, the color differences can be predicted for any final lighting condition.
Visual Color Matching
Lighting Continued
Four patches were painted with different
types of blue paint that visually matched
in color under daylight. Using the same
geometry, the top image is processed under
a white LED light and the bottom image
under quartz-halogen white light. The obvious color changes illustrate how products
with different spectral properties look the
same color under one light source but look
different under another light source. This is
known as lighting Metamerism.
If the color of a light source itself is being measured, the system should be calibrated to a standard source rather than using a white reflective standard. For example, if you need to measure
the color of a LED, a calibrated light source can be used in place of the reflective standard. If
transmission measurements are being made of a liquid, an empty container can be used in
place of the white reflective standard.
One lighting consideration that a manual white balance may not correct is line spectra.
Line spectra describe high emission from the source at a specific wavelength or narrow wavelength band. Many sources such as fluorescent and metal halide lamps have line spectra. The
detecting device may not have the spectral resolution to detect these narrow bands of light, so
the white balance procedure will not compensate for the sharp spectral peaks, causing erroneous color measurements. Two products may look the same color under one light source but not
under another light source. This phenomenon is known as metamerism and is due to the fact
that humans and some imaging systems do not detect detailed spectral information of a product.
Two products that cause metamerism are known as a metameric match. A metameric match can
be measured by viewing the two products under different light sources. Metamerism can also be
predicted if the spectral properties of the products and various light sources are known.
The final lighting factor to consider is geometry. Geometry describes the way in which the
source, product and detector are aligned. The best geometry will depend on the product’s physical characteristics. Deeply textured, mottled and glossy surfaces often face unique difficulties
when illuminating and require specific lighting solutions.
Textured
Many off-the-shelf spectroscopy and colorimetric devices that include a light source will not provide consistent measurements across the entire product. The lighting must be even and diffuse
enough to provide consistent measurements while detecting textural differences that will have
an affect on the color appearance.
Mottled
Mottled color patterns also cause difficulty for off-the-shelf instruments. To measure the overall
color, a large area must be measured and the results averaged. This averaging could lead to lost
information. Finding the right light source and best lighting geometry for large areas takes time.
Five patches were painted black with different gloss levels and imaged under two
lighting geometries (shown at right). The top
image demonstrates that at high angles of
illumination, there is little perceptual difference among the five patches. The bottom image demonstrates obvious visual differences
among the five patches.
Glossy
Some products may be glossy, but still appear smooth and evenly colored. These types of products benefit from using a small reflective integrating sphere that allows the specular reflections
to be included or excluded from the color measurements. If a product has varying gloss levels
the choice in geometry will have a great effect on the visual differences that are seen by a color
matching system and a final viewer. To measure the overall color, finding the right light source
and best lighting geometry for large areas takes time.
Recommended lighting geometry has been provided by the CIE (International Commission on
Illumination) and can be found on their website (www.cie.co.at/cie).
Choosing a Color Model
101 East Gloucester Pike | Barrington, NJ USA 08007-1380 | 1-856-547-3488 | www.edmundoptics.com
® COPYRIGHT 2007 EDMUND OPTICS, INC. ALL RIGHTS RESERVED
Before discussing the detector, the data that is required from a detector for visual color difference
measurements should be noted. There are different color models that can represent color in
a quantitative way. A color space is a three-dimensional representation of the colors that can
be described using a certain color model. Some common color spaces are RGB, XYZ, CIELab,
CIELuv and HCL.
As humans, it is not easy to tell the color differences between two products by looking at
their spectral curves. As mentioned earlier, two products can have different spectral curves
and still appear to be the same color. It is also not intuitive to look at the red, green and blue
values from a camera to determine the overall color differences between two objects. Besides
not being intuitive, such data by it’s self does not tell us anything about how a person perceives
color. We need a color space to model how a person perceives color differences. The XYZ color
space was designed to describe a color based on a standard human observer. The XYZ values
of a color tell us if one product matches another product but it does not tell us how the two
L*a*b* values can be represented in the Hue, products differ in color or whether the difference will be visually noticeable. Chroma, Lightness color space. This is the
The CIELab (L*a*b*) & CIELuv (L*u*v*) color spaces are perceptually uniform, meaning
most intuitive way to describe color.
that equal color differences in the color space represent equal color differences that we detect
as humans. CIELab is the most common used color space and is ideal for visual color matching systems because it represents color the same way humans perceive color.
Color is most intuitively described in a three-dimensional color space representing Hue, Chroma, and Lightness (HCL). Hue is the dimension
of color that we hear of most often. It describes the overall color of an object such as how red, green, blue or yellow the color looks. Chroma represents the color’s departure from gray. Chroma is similar to our perception of satuaration or vividness. Lightness describes how dark or light an
object is. Lightness is described on a scale from black to white with gray in the middle. CIELab is beneficial because the L*a*b* values can be represented in the HCL color space. CIELab can describe the total color difference between two products and tell us how they are different, which is
ideal for Visual Color Matching systems. If you know that the product looks too bluish, fixing the problem becomes much easier to troubleshoot.
Visual Color Matching
L*
Delta E
-a*
b*
-b
a*
The CIELab color space represents L*a*b*
color values in 3 dimensions as shown above.
TECHINICAL NOTE:
Our perception of color can be described by an opponent color theory. The opponent theory
is based on the fact that an object cannot look red and green at the same time nor yellow and
blue at the same time. The CIElab system quantifies color with three values; L*, a* and b*. a*
represents how red or green the object looks, positive a* values representing red and negative
a* values representing green. b* represents how yellow or blue an object looks, positive b*
representing yellow and negative b* representing blue. The CIELab values allow someone to
describe how two products differ in color. The product can be described as having a bluish hue
or a yellowish hue compared to the standard product and the amount can be quantified using
CIELab. The overall color difference between the reference product and a test product can be
described by Delta E. If you were to plot the L*a*b* values of the standard product and the test
product in the CIELab color space, the distance between the two points would equal Delta E;
the total color difference.
Detectors
In order to represent color differences in CIELab a detector is needed that can provide CIELab calculations. Fortunately, it is possible to calculate
CIELab values using spectrometers, colorimeters and vision color cameras.
While the position of the detector has been mentioned, there are additional factors that determine what the best device will be for each
color difference application. The most complete measurement of a color can be done with a spectrometer, which provides relative spectral data of
the product being tested. As noted earlier, spectral data can be used to predict metamerism. Both spectrophotometers and spectroradiometers are
two types of spectrometers used to provide such data.
A spectrophotometer performs reflective or transmission color measurements. These devices often come with an accessory that includes
a light source and collection optics in a single assembly. These off-the-shelf products are designed to be used close to the product under test and look
at a small area. This type of setup is ideal for some applications, but as mentioned in the lighting section, some products require specific lighting
geometry and a large area must be measured. These applications may require custom lighting and optics so that a larger area can be illuminated
and measured properly.
A spectroradiometer (a special type of spectrometer) may be used to measure the spectral output and color of light sources. Spectroradiometers come pre-calibrated, to perform absolute light measurements, with a particular type of collection optics. A spectroradiometer can provide
spectral output from the light source under test, center wavelength, purity and color data such as CIELab values.
Colorimeters measure colorimetric data, such as XYZ values and then calculate this data into CIELab values. Using a colorimeter bypasses a
lot of the data and calculations inherent in a spectrometer, which can lead to faster measurements. The same collection and lighting considerations
for spectrometers apply to colorimeters.
Color cameras typically provide Red, Green and Blue data that can estimate CIELab values. An additional benefit to using a camera is that
spatial information is obtained. Cameras also allow different parts of the object to be measured at one time. Measurements besides color can be
made such as optical character recognition, particle analysis and gauging. Color cameras are offered as single chip or three-chip versions. Either
version can be used for color difference measurements but 3-chip cameras will offer better color and spatial resolution.
Just as light sources have different spectral output, detecting devices also have different spectral sensitivities. Detector spectral sensitivity will
be different for each device, but the difference is accounted for during the white balance process. As mentioned previously, the white balance will
eliminate “coloration” from the light source and give a more “normal” response from the detector. Two cameras from the same manufacturer can
differ in spectral response by up to 10% (camera manufacturer specification). Therefore, it is necessary to properly calibrate and white balance in
order to obtain consistent results when measuring the same color.
Environment & Integration
Noise
Low Signal-to-Noise Ratio
Levels
Noise
High Signal-to-Noise Ratio
Increase in ambient tempature increases
noise and decreases signal to noise ratio.
101 East Gloucester Pike | Barrington, NJ USA 08007-1380 | 1-856-547-3488 | www.edmundoptics.com
® COPYRIGHT 2007 EDMUND OPTICS, INC. ALL RIGHTS RESERVED
Levels
Once all of the components for a color matching system are chosen, there are many environmental conditions that affect the system once it is installed. For this reason, every system
should be tested in the environment it will be operating in. A few conditions to consider are
ambient temperature, ambient lighting, vibration and user interaction.
In addition to the effect of temperature on light sources previously discussed, other factors such as ambient light need to be considered. Changes in daylight, shadows from people,
overhead lighting and other factors can wreak havoc on a color matching system; therefore, the
system should be shielded or enclosed to avoid such risks.
Detectors also tend to change sensitivity and add noise as a result of changes in ambient
temperature. These changes may require calibrating the system (white balancing and measuring
the standard product) more often or cooling the sensor to prevent inconsistent measurements.
Depending on the device, some cameras recommend operating at <40 degrees C to avoid fixed
pattern noise from showing up in the images. Each detecting device, whether it is a spectrometer, colorimeter or camera, will have a different relation between noise and changes in temperature. Again, it is important to pay attention to the specifications from the manufacturer in
regard to temperature changes and their effect on the detector. Surprisingly small changes in
temperature can cause large changes in the sensitivity and noise of the camera.
Vibration is a common condition in many automated measuring systems. Rugged
mounts may be required along with locking knobs for any adjustable parts such as the focus
and f/# settings on the optics.
The system may require recalibration to the “reference” product if new products are manufactured or parts are replaced at some point. The system provider is usually the best person to
conduct recalibration but if an end user does the recalibration the procedure should be simple
and access should be limited only to the required software and hardware.
Visual Color Matching
Realistic Tolerances
Once each component has been calibrated, the completed system needs to be tested
to ensure that the smallest necessary color differences can be detected. The best
way to test the completed and calibrated setup is to have a batch of visually acceptable products and a batch of visually unacceptable products to test against the
“reference” product. If the good and bad products can be distinguished, the system
is suitable.
The tolerance levels that distinguish good and bad parts are most often set empirically, by trial and error. The most reasonable tolerance will depend on relating realworld observations to the test data. CIELab and other color models do an impressive job of predicting color differences but the final calculated color differences need
to be verified by real human experience out in the field. Overall, it is important to
spend time upfront getting to know the product, setting up ideal lighting/detection,
and making sure the tolerances provide an efficient system.
Setting pass/fail tolerances is a critical final step of
visual color matching systems. VBAI (EO part
number 56-807) can be used for such testing.
Contact US
If you would like to see other topics covered or more detailed information, let us
know. We invite you to discuss any suggestions or specific application requirements
with our engineering department at [email protected] or 800-363-1992.
Jessica Gehlhar has been with Edmund Optics® since 2004. She has a BS in Imaging Technology
from Rochester Institute of Technology. Jessica started as an Applications Engineer and currently holds
the position of Imaging Engineer. Jessica is responsible for working directly with customers and Vision
Integration Partners (VIP) to set up and deploy automated vision systems.
Products featured in this white paper
Modular LED Test &
Measurement Systems
59-383
White Balance
Reflectance Targets
58-610
Pocket Spec Color
QA™ Series 4
57-448
Request a
FREE catalog!
800.363.1992
www.edmundoptics.com
101 East Gloucester Pike | Barrington, NJ USA 08007-1380 | 1-856-547-3488 | www.edmundoptics.com
® COPYRIGHT 2007 EDMUND OPTICS, INC. ALL RIGHTS RESERVED
CCD Spectrometer
USB - VIS
57-052