ON Semiconductor
Is Now

To learn more about onsemi™, please visit our website atwww.onsemi.com

onsemi andand other names, marks, and brands are registered and/or common law trademarks of Semiconductor Components Industries, LLC dba “onsemi” or its affiliates and/orsubsidiaries in the United States and/or other countries. onsemi owns the rights to a number of patents, trademarks, copyrights, trade secrets, and other intellectual property. A listing of onsemi
product/patent coverage may be accessed at www.onsemi.com/site/pdf/Patent-Marking.pdf. onsemi reserves the right to make changes at any time to any products or information herein, without
notice. The information herein is provided “as-is” and onsemi makes no warranty, representation or guarantee regarding the accuracy of the information, product features, availability, functionality,or suitability of its products for any particular purpose, nor does onsemi assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and allliability, including without limitation special, consequential or incidental damages. Buyer is responsible for its products and applications using onsemi products, including compliance with all laws,regulations and safety requirements or standards, regardless of any support or applications information provided by onsemi. “Typical” parameters which may be provided in onsemi data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. All operating parameters, including “Typicals” must be validated for each customer application
by customer’s technical experts. onsemi does not convey any license under any of its intellectual property rights nor the rights of others. onsemi products are not designed, intended, or authorized
for use as a critical component in life support systems or any FDA Class 3 medical devices or medical devices with a same or similar classification in a foreign jurisdiction or any devices intended for
implantation in the human body. Should Buyer purchase or use onsemi products for any such unintended or unauthorized application, Buyer shall indemnify and hold onsemi and its officers, employees,
subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or deathassociated with such unintended or unauthorized use, even if such claim alleges that onsemi was negligent regarding the design or manufacture of the part. onsemi is an Equal Opportunity/AffirmativeAction Employer. This literature is subject to all applicable copyright laws and is not for resale in any manner. Other names and brands may be claimed as the property of others.

TND6114/D
Image Sensor
Color CorrectionIntroduction

This reference document will describe the basic process
to obtain colors from a digital image sensor.

www.onsemi.com

Basic Process to Obtain Color Images from Digital
Image Sensors

TECHNICAL NOTE

CCD and CMOS solid-state image sensors contain anarray of photosensitive elements called pixels. The pixels
collect light from a scene and convert it into electrical signal.
The signal is then digitized and processed. Digital cameras
use CCD or CMOS image sensors to capture images.

Silicon-based image sensors are sensitive to light withwavelengths from up to 1,050 nm, as shown in Figure 1.

403530QE (%)

2520151050350

450

550

6507508509501050

Wavelength (nm)Figure 1. Spectral Response of a CMOS Image Sensor

a scene from a single image capture. This specific CFA
pattern is now known as a “Bayer pattern” and is used inmost of the world’s color digital camera systems.

Images captured by a solid state image sensor are,therefore, monochrome in nature. To generate a color image,
three primary colors (Red, Green, Blue) are required foreach pixel. Before the invention of color image sensors, thecolor image was created by superimposing three identicalimages with three different primary colors. These images
were captured by placing a color filter in front of the sensor,
allowing a certain bandwidth of the visible light to passthrough.
Bayer Color Filter Array and Color Interpolation

In early 1970s, Bryce Bayer realized that an image sensor
with a color filter array (CFA) pattern like that shown inFigure 2 would allow the reconstruction of all the colors of© Semiconductor Components Industries, LLC, 2015

December, 2015 − Rev. 3G1

RG1

RB

G2

BG2G1RG1

R

BG2

B

G2

Figure 2. Bayer CFA Patterns

1Publication Order Number:
TND6114/D

TND6114/D
There are a variety of interpolation methods, such as“Nearest Neighbor Interpolation”, “Bilinear Interpolation”,
and “Bi-cubic Interpolation”, etc. These simple methods aredescribed in the literature. The quality of the final image
depends in large part on which algorithm is used. For thisreason many camera manufacturers consider their best color
interpolation algorithms to be trade secrets and do not
publish them.

After capture, the signal of each pixel is read out
sequentially; digitized and stored in memory. The original
data for each pixel only contains information about one
color, depending on which filter is positioned over that pixel.
However, information for all three primary colors is needed
to construct a color image. The missing information isextracted based on the information gathered by theneighboring pixels. This is called “color interpolation”.
40BLUE

35GREENRED

30

QE (%)

2520
15
10
50350

450

550

650
750
Wavelength (nm)8509501050

Figure 3. Spectral Response of a CMOS Sensor with RGB CFA

not possible, because we do not have the spectral
information for the scene. ON Semiconductor will provide
analytical matrix coefficients (aij, bij) to its customers given
the characteristic of the optics and a certain lighting
condition for a specific sensor. This matrix minimizes thecolor error for the range of hues of which the eye is mostcritical. The native primaries can then be converted to thecolor space to match the output device for optimal color
reproduction.
Many imaging systems function more efficiently by using
a luminance/color-difference color space, such as YUV orYCrCb. This allows the system to process the brightness andcolor signals separately. Figure 5 shows the color conversion
matrix from the standard sRGB color space and the YCrCb
color space for JPEG compression.

The colors values obtained through the color interpolation
process are called native colors. Due to the spectral
characteristics of the optics (lens, filters) used in the system,
the lighting conditions (such as daylight, fluorescent, ortungsten) of the scene, and the characteristics of the color
filters of the sensor, the native RGB data may not provide afaithful color rendition.
Color Correction Matrix (CCM)

For this reason an additional step called color correction
is required. In most cases, the native spectral RGB is first
converted into a standard R’G’B’ (sRGB, for example)
color space by a 3x3 color correction matrix, shown in
Figure 4. sRGB is the standard color format for most digital
imaging input and output devices.
b11

b12

b13

R’+ 0 . 289+ 0 . 587

+ 0 . 114b 21b 22b 23 • G = G ’− 0 . 169

− 0 . 441

+ 0 . 500 • G ’ = C bb 31

b 32b 33+ 0 . 500− 0 . 418

− 0 . 081

RB

B’

Figure 4. Color Correction Matrix for RGB " R’G’B’R’B’YCrFigure 5. Color Conversion Matrix forR’G’B’ " YCrCb

Generating the correct values for the 3x3 color matrix
requires a great deal of knowledge in image science. The
spectral response of the CCD is different from the spectral
response of an output device. In turn, the spectral responseof the output device is different from the spectral responseof the human eye. Therefore, “perfect” color reproduction isToday, the conversion matrix operation is generally
performed in a digital signal processor. After the processing,the data can be converted back to a color space suitable forany output device.

www.onsemi.com
2

TND6114/DON Semiconductor and theare registered trademarks of Semiconductor Components Industries, LLC (SCILLC) or its subsidiaries in the United States and/or other countries.
SCILLC owns the rights to a number of patents, trademarks, copyrights, trade secrets, and other intellectual property. A listing of SCILLC’s product/patent coverage may be accessedat www.onsemi.com/site/pdf/Patent−Marking.pdf. SCILLC reserves the right to make changes without further notice to any products herein. SCILLC makes no warranty, representation
or guarantee regarding the suitability of its products for any particular purpose, nor does SCILLC assume any liability arising out of the application or use of any product or circuit, andspecifically disclaims any and all liability, including without limitation special, consequential or incidental damages. “Typical” parameters which may be provided in SCILLC data sheets
and/or specifications can and do vary in different applications and actual performance may vary over time. All operating parameters, including “Typicals” must be validated for eachcustomer application by customer’s technical experts. SCILLC does not convey any license under its patent rights nor the rights of others. SCILLC products are not designed, intended,or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which
the failure of the SCILLC product could create a situation where personal injury or death may occur. Should Buyer purchase or use SCILLC products for any such unintended or
unauthorized application, Buyer shall indemnify and hold SCILLC and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, andexpenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim
alleges that SCILLC was negligent regarding the design or manufacture of the part. SCILLC is an Equal Opportunity/Affirmative Action Employer. This literature is subject to all applicable
copyright laws and is not for resale in any manner.

PUBLICATION ORDERING INFORMATION
LITERATURE FULFILLMENT:
Literature Distribution Center for ON Semiconductor
19521 E. 32nd Pkwy, Aurora, Colorado 80011 USA
Phone: 303−675−2175 or 800−344−3860 Toll Free USA/Canada
Fax: 303−675−2176 or 800−344−3867 Toll Free USA/Canada
Email: orderlit@onsemi.com

N. American Technical Support: 800−282−9855 Toll FreeUSA/Canada
Europe, Middle East and Africa Technical Support:
Phone: 421 33 790 2910
Japan Customer Focus Center
Phone: 81−3−5817−1050

www.onsemi.com
3ON Semiconductor Website: www.onsemi.com
Order Literature: http://www.onsemi.com/orderlit
For additional information, please contact your local
Sales Representative

TND6114/D