SlideShare a Scribd company logo
1 of 4
Download to read offline
Contributed paper
OPTO-ELECTRONICS REVIEW 11(3), 193–196 (2003)


              Colour temperature estimation algorithm for digital images
                           – properties and convergence
                                        K. WNUKOWICZ* and W. SKARBEK

                          Institute of Radioelectronics, Warsaw University of Technology,
                                   15/19 Nowowiejska Str., 00-665 Warsaw, Poland


The paper presents an algorithm for estimation of temperature of image. Colour temperature is important, perceptual feature
describing colour and content of images. The main idea of the algorithm is to average pixel values of image, omitting the
values which have meaningless influence on perception of colour temperature. It is done in an iterative procedure. The con-
vergence of the procedure is discussed. The algorithm can be applied in image search/retrieval tasks and is proposed in the
MPEG-7 colour temperature descriptor for estimation of colour temperature of images.


Keywords: colour temperature, colour perception, image retrieval.

1. Introduction                                                     This article presents a colour temperature estimation al-
                                                                gorithm for image to represent general visual impression of
Colour temperature is one of the visual features essentially    colour temperature a viewer has of the image. The impres-
influencing perception of colour by the human visual sys-       sion depends on elements like image colour content, illumi-
tem. Categories such as hot, warm, moderate, and cool are       nation of the scene while it was photographed, and to some
used for describing the felt temperature of the touched ob-     extent on observation conditions. The procedure consists of
jects. The same categories can be considered in the case of     two main steps. In the first step, the image average colour
colour temperature feeling by observer who is viewing col-      value is computed by omitting pixels having poor influence
our scene or image. This feeling depends mostly on proper-      on colour temperature impression. In the second step, the
ties of illumination of the viewed scene. Different kinds of    colour temperature value is estimated for previously com-
illumination of the same scene gives different colour tem-      puted colour, utilizing its chromaticity coordinate values. It
perature feelings, adequately to the illumination. For exam-    is done by Robertson’s algorithm [1] which approximates
ple, natural daylight can have light in broad range of colour   colour temperature by means of the fixed lines on uv chro-
temperature values depending on the time of the day as          maticity diagram called isotemperature lines.
well as atmospheric and weather conditions which have an            The estimated colour temperature of image can be clas-
influence on colour temperature perception in outdoor im-       sified into one of subjective categories: hot, warm, moder-
ages. The view of the same landscape in various viewing         ate, and cold. The whole range of colour temperature val-
conditions such as a sunny day at noon, cloudy sky or at        ues should be divided into 4 sub-ranges. This task was ap-
twilight gives varied feelings of colour temperature. In the    proached by conducting subjective experiments on a group
same way works artificial light – different light sources can   of people who visually assessed test images with respect to
give different colour temperature feelings for the illumi-      colour temperature feeling. The result of the assessment
nated scene.                                                    was used for partition objectively computed colour temper-
    The concept of colour temperature is not explicitly re-     ature values into the subjective categories [2].
lated to thermal temperature of the viewed objects. It is de-       The estimated colour temperature could be applied for
rived from a relationship between the temperature of a hy-      image indexing and searching engines and is proposed as a
pothetical object called black body and its appeared colour.    basis for a new visual descriptor in MPEG-7 standard [3,4].
The colour chromaticity of black body just depends on
temperature of this body. Being based on this assumption        2. Procedure for estimation of temperature of
one can classify colours in the range from hot to cold ac-         image
cording to its similarity to of colour black body in appro-
priate temperature.                                             A basic definition of colour temperature can be stated as an
                                                                absolute temperature of the black body whose spectral dis-
                                                                tribution of radiance power is proportional to the given
*e-mail:                                                        stimulus. It means that the both radiations have the same
           K.Wnukowicz@elka.pw.edu.pl


Opto-Electron. Rev., 11, no. 3, 2003                   K. Wnukowicz                                                      193
Colour temperature estimation algorithm for digital images – properties and convergence




                                                                      Fig. 2. Isotemperature lines on the uv chromaticity diagram.


                                                                      The estimation of colour temperature for the given col-
Fig. 1. Planck’s locus of black body on xy chromaticity diagram.   our has the steps as follows:
                                                                   • convert chromaticity coordinates from (xs,ys) to (us,vs)
                                                                      (according to CIE 1960 UCS),
chromaticity values. The chromaticity of black body radia-         • find two adjecent isotemperature lines, from collection
tion depends only on its temperature and is defined by                of 31 isotemperature lines, which are neighbours to the
Planck’s formula [1]. It is convenient to depict this depend-         point (us,vs) on the chromaticity diagram,
ency on a chromaticity diagram. Figure 1 shows the curved          • compute value of colour temperature from the distance
line named Planck’s locus, corresponding to the chromatic-            ratio between the point and both of the two adjacent
ity of a black body at the temperature changing from                  isotemperature lines.
2000 K (red colour) to 25000 K (blue colour).
    Because of the fact that having the basic definition of        3. Calculation of the perceptional average
colour temperature it can be determined only for a small set          chromaticity coordinates of image
of colours, a correlated colour temperature concept is intro-
duced. A correlated colour temperature is the temperature          In the first stage of colour temperature estimation there are
of Planck’s black body whose perceived colour most                 computed the chromaticity coordinates of average colour
closely resembles that of the given stimulus. So, it is de-        of image pixels related to human perception of colour tem-
fined rather in perceptual aspect. In practice, the term of        perature. Pixels which have poor or meaningless influence
colour temperature is used also for correlated colour tem-         on this perception are discarded during calculation. Firstly,
perature for shortness. The calculation of colour tempera-         image pixels are converted into standard linear colour
ture is performed by use of the perceptually homogeneous           space sRGB [5]. Equation
UV chromaticity diagram (CIE 1960). It is assumed that
                                                                                       if R(i, j ) £ 0.03928 ´ 2550
                                                                                                                  .
the colour temperature is constant along the lines which are
perpendicular to the Planck’s locus on this diagram
                                                                                                  æ R(i, j ) ö
(Fig. 2). These short straight lines are called isotemperature                    RsRGB (i, j ) = ç             ÷
lines.                                                                                            è 255 ´ 12.92 ø
    The algorithm for calculation of the chromaticity coor-                      else                                            (1)
dinates of image has its main steps as follows:                                                                       2 .4
• linearize image pixels: RGB –> sRGB,                                                          é R(i, j )    ù
                                                                                                ê 255 + 0.055 ú
• convert colour space sRGB –> XYZ,                                             RsRGB (i, j ) = ê             ú
• discard pixels with Y luminance value below threshold                                         ê        .
                                                                                                       1055   ú
    Tl,                                                                                         ë             û
• iteratively average remaining pixels discarding the ones         presents calculation of R colour component for most com-
    with values above a threshold adapted after each itera-        monly available images represented in the form suited to
    tion,                                                          PC computer monitors. The G and B components are con-
• take chromaticity coordinates (xs,ys) of average colour          verted in the same way. Parameters i and j indicate the
    given in XYZ.                                                  pixel position in rows and columns respectively.

194                                             Opto-Electron. Rev., 11, no. 3, 2003                  © 2003 COSiW SEP, Warsaw
Contributed paper
    The obtained sRGB colour components are in the range          pixels not indicated for discarding”. The averaging proce-
[0,1], what simplifies further computation. Next, pixel val-      dure is carried out for all of the three colour components X,
ues are converted into XYZ colour space by multiplying the        Y and Z. The f coefficient is a multiplier for the colour
conversion matrix M and the sRGB colour vectors                   component average value to obtain threshold above which
                                                                  pixels are discarded. Its typical value is 3, what was ob-
                    é X (i, j ) ù       é R(i, j ) ù              tained in the subjective experiments [6].
                    ê Y (i, j ) ú = M ´ ê G(i, j ) ú ,      (2)       The procedure for averaging image pixels was verified
                    ê           ú       ê           ú             on a test set of images. Typical number of iterations for the
                    ë Z (i, j ) û
                    ê           ú       êë B(i, j ) û
                                                    ú             test images was in the range from 4 to 8 depending on the
where                                                             pixel value distributions in images. Maximum number of
                 é0.4124 0.3576 01805 ù
                                 .                                iterations was above 20. The convergence of the averaging
              M= ê 0.2126 07152 0.0722 ú
                           .                                      procedure can be described as in Eq. (5).
                 ê                     ú
                 ë 0.0193 01192 0.9505û
                 ê         .           ú
                                                                     Let A n = X n , K n = X n , and Sn is a sum of pixel val-
    Black and near black colours do not impact signifi-           ues in the set Xn, and n is the loop number
cantly colour temperature perception, so the dark pixels are
omitted from calculation. The auxiliary table p is a mask                                       æ     S ö
                                                                                    Sn = K n An ç An = n ÷
for marking discarded pixels. This is a matrix which has                                        è     Kn ø
the same dimensions as the image. If the mask value at the
specific position p(i,j) is 0 then the corresponding pixel in     and
the image is omitted from further calculations. Tll is a
threshold for pixel discarding having its typical value 5%
                                                                                        S n = S n +1 +      å x,
                                                                                                          x Î Xn
of maximal component range. Only the luminance compo-                                                     x > fAn
nent Y is used for discarding dark pixels                         where

              ì if Y (i, j ) < Tll then p(i, j ) = 0                       K n A n = K n +1 A n +1 +    åx ³
              í                                      .      (3)                                        x Î Xn
              îelse                     p(i, j ) = 1                                                   x > fAn
                                                                                     ³ K n +1 A n +1 + fA n (K n - K n +1 ),
    In the next step, the remaining pixels are iteratively av-             A n (K n - fK n + fK n +1 ) ³ K n +1 A n +1,        (5)
eraged. In this process, a threshold for indicating colours
standing out is assessed in each iteration and pixels exceed-                           é (1 - f )K n + fK n +1 ù
                                                                           A n +1 £ A n ê                        ú =
ing the threshold are marked for omitting. The pixels dis-                              ë         K n +1         û
carded here are too much different from the averaged mean
                                                                                          é              K ù
value and represent self-luminous regions or objects [6]                          = A n ê f - ( f - 1) n ú .
                                                                                          ë             K n +1 û
             X Ts (0) = 0
                                                                  An is the decreasing sequence if
             loop
                                    row - 1 col - 1                                  é               Kn ù
                       1                                                             ê f - ( f - 1) K      ú £ 1,
             Xa =            å
                   row ´ col i = 0
                                             å X (i, j),                             ë                n +1 û
                                             j =0
             X Ts = f ´ X a                                 (4)   thus
             if ( X Ts (t ) = X Ts (t - 1)) return X a                              é         æ      K n öù
                                                                                    ê ( f - 1)ç 1 -        ÷ ú £ 0.
             ì if X (i, j ) > X Ts then p(i, j ) = 0                                ë         è     K n +1 ø û
             í
             îelse                         p(i, j ) = 1
             end loop                                             It is true because f >1 and Kn > = Kn+1, therefore 0 £ An+1 £
                                                                  An. The sequence is convergent because it is not increasing
                                                                  and is lower bounded.
    In averaging procedure, Eq. (4), XTs(t) indicates the
                                                                       The (xs,ys) chromaticity values are obtained from com-
threshold in the current loop t above which the pixels are
                                                                  puted average colour as follows.
discarded. If the threshold value is the same as in the previ-
ous loop [XTs(t – 1)], it means that no pixels were discarded                                    Xa
                                                                                      xs =                ,
in that loop and the mean value Xa is returned. The compu-                                 X a + Ya + Z a
tation of mean value Xa is done only for pixels which have                                                                     (6)
                                                                                                 Ya
corresponding mask value p(i, j) above 0. The same is for                             ys =                .
expression row´cols. It intuitively means: “the number of                                  X a + Ya + Z a


Opto-Electron. Rev., 11, no. 3, 2003                       K. Wnukowicz                                                        195
Colour temperature estimation algorithm for digital images – properties and convergence

4. Estimation of colour temperature of given                                     proximated by a ratio of distances from the point to the
   colour                                                                        two adjacent isotemperature lines.
                                                                                 The formula for resulting colour temperature is given as
After computing the chromaticity coordinates of the aver-
age colour of image, its colour temperature can be esti-                                                   di
                                                                                         TRc = TRi +                (TRi +1 - TRi ).      (9)
mated. Firstly, the chromaticity coordinates need to be con-                                           d i - d i +1
verted to (us,vs) coordinates according to the CIE
                                                                             5. Conclusions
                             4x s
                  us =
                       -2x s + 12 y s + 3                                    In the article, the algorithm for estimation of colour tem-
                                                                      (7)
                             6y s                                            perature of image is presented. The purpose of the estima-
                  vs =                                                       tion is to render human visual perception of this colour fea-
                       -2x s + 12 y s + 3
                                                                             ture in static images as well as in moving ones (video se-
                                                                             quences). Thereby, it is a considerable feature of image for
    Secondly, the line perpendicular to the Planck’s locus,                  application in image search and retrieval tasks. That is just
the crossing point (us,vs), must be determined on the dia-                   what was a need, and a motivation for its designing origin.
gram. The line in question is an isotemperature line for the                 MPEG-7, a standard for describing an image content, have
obtained averaged image colour. For this purpose, Robert-                    got a contribution, proposing a descriptor for visual content
son’s algorithm can be used [1], which utilizes 31 fixed                     browsing based on colour temperature. Other possible ap-
isotemperature lines given in the form of parameters gath-                   plication of the colour temperature feature may be conver-
ered in a table. The given isotemperature lines are within a                 sion of colour temperature of image. Users of multimedia
range from 1667 K to 100000 K, and they are specified by                     systems often have their personal preferences on colour
4 parameters: their colour temperatures Ti and geometrical                   temperature of viewed images. If the colour temperature of
locations on a diagram, which are tangents of an angle be-                   image is known as well as the user preference on it, conver-
tween the line and the horizontal direction ti and the point                 sion of image appearance can be easy done to conform to
of crossing the Planck’s locus given by (ui,vi) coordinates.                 user needs. Further, potentially beneficial domain is pho-
To find out an isotemperature line for the point (us,vs), the                tography. Knowledge of the colour temperature of photo
two neighbouring adjacent fixed isotemperature lines                         image makes it possible to do an automatic conversion of
should be determined at first. It is done by calculating the                 it, just to meet user needs.
distances to all of the 31 given lines and picking two adja-
cent ones of which the ratio between the distances from the                  References
point to them is negative (di/di+1 <0 as one of the distances
is negative and the second is positive). The formula for cal-                   1. G. Wyszecki and W.S. Stiles, Colour Science Concepts and
culation of the distance between a point and a line is given                       Methods, Quantitative Data and Formulae, (2nd Edition), A
by                                                                                 Wiley-Interscience Publication, 1982.
                                                                                2. W. Skarbek, “Optimal intervals for fuzzy categories of col-
                      (v s - v i ) - t i (u s - u i )                              our temperature”, ISO/IEC JTC1/SC29/ WG11 M7625,
               di =                                   .               (8)          (2001).
                             (1 + t i2 )1 2                                     3. S.K. Kim and D.S. Park, “Proposal for colour temperature
                                                                                   de s c riptor for ima ge de s c ription” , ISO/ I EC
    In the next step, the colour temperature of the point                          JTC1/SC29/WG11 M6966, (2001).
(us,vs) is approximated from the ratio between the distances                    4. S.K. Kim and D.S. Park, “Report of VCE-6 on MPEG-7
from the point to each of the neighbouring isotemperature                          colour temperature browsing descriptors”, ISO/IEC
lines. The approximation is done on the assumption that                            JTC1/SC29/WG11 M7265, (2001).
                                                                                5. M. Stokes, M. Anderson, S. Chandrasekar, and R. Motta,
• the Planck’s locus of a black body between the adjacent
                                                                                   “A standard default colour space for the internet – sRGB”,
    isotemperature lines (Ti and Ti+1) is approximated by a                        Version 1.10, (1996).
    circular arc.                                                               6. A.P. Petrow, C.Y. Kim, I.S. Kweon, and Y.S. Seo, “Per-
• colour temperature presented in reciprocal scale TR =                            ceived illumination measured”, Colour Res. Appl. 23, No 3
    106/T is a linear function of its position on this arc.                        (1998).
• the angle between adjacent isotemperature lines is                            7. A. Borbely, A. Samson, and J. Schanda, “The concept of
    small, so a ratio of the arc lengths between the two                           correlated temperature revised”, Colour Res. Appl. 26, No 6
    fixed and the point’s isotemperature lines can be ap-                          (2001).




196                                                       Opto-Electron. Rev., 11, no. 3, 2003                 © 2003 COSiW SEP, Warsaw

More Related Content

What's hot

Multimedia color in image and video
Multimedia color in image and videoMultimedia color in image and video
Multimedia color in image and videoMazin Alwaaly
 
imageCorrectionLinearDiffusion
imageCorrectionLinearDiffusionimageCorrectionLinearDiffusion
imageCorrectionLinearDiffusionKellen Betts
 
Detection of unknown signal
Detection of unknown signalDetection of unknown signal
Detection of unknown signalsumitf1
 
Color
ColorColor
ColorFNian
 
Chapter 6 color image processing
Chapter 6 color image processingChapter 6 color image processing
Chapter 6 color image processingasodariyabhavesh
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)IJERD Editor
 
A Unified PDE model for image multi-phase segmentation and grey-scale inpaint...
A Unified PDE model for image multi-phase segmentation and grey-scale inpaint...A Unified PDE model for image multi-phase segmentation and grey-scale inpaint...
A Unified PDE model for image multi-phase segmentation and grey-scale inpaint...vijayakrishna rowthu
 
User Interactive Color Transformation between Images
User Interactive Color Transformation between ImagesUser Interactive Color Transformation between Images
User Interactive Color Transformation between ImagesIJMER
 
Histogram based Enhancement
Histogram based Enhancement Histogram based Enhancement
Histogram based Enhancement Vivek V
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)IJERD Editor
 
Paper id 2420148
Paper id 2420148Paper id 2420148
Paper id 2420148IJRAT
 
Color Image Processing: Basics
Color Image Processing: BasicsColor Image Processing: Basics
Color Image Processing: BasicsA B Shinde
 
Fractal Image Compression of Satellite Color Imageries Using Variable Size of...
Fractal Image Compression of Satellite Color Imageries Using Variable Size of...Fractal Image Compression of Satellite Color Imageries Using Variable Size of...
Fractal Image Compression of Satellite Color Imageries Using Variable Size of...CSCJournals
 
A MODIFIED DIRECTIONAL WEIGHTED CASCADED-MASK MEDIAN FILTER FOR REMOVAL OF RA...
A MODIFIED DIRECTIONAL WEIGHTED CASCADED-MASK MEDIAN FILTER FOR REMOVAL OF RA...A MODIFIED DIRECTIONAL WEIGHTED CASCADED-MASK MEDIAN FILTER FOR REMOVAL OF RA...
A MODIFIED DIRECTIONAL WEIGHTED CASCADED-MASK MEDIAN FILTER FOR REMOVAL OF RA...cscpconf
 
hankel_norm approximation_fir_ ijc
hankel_norm approximation_fir_ ijchankel_norm approximation_fir_ ijc
hankel_norm approximation_fir_ ijcVasilis Tsoulkas
 
Electromagnetic analysis using FDTD method, Biological Effects Of EM Spectrum
Electromagnetic analysis using FDTD method, Biological Effects Of EM SpectrumElectromagnetic analysis using FDTD method, Biological Effects Of EM Spectrum
Electromagnetic analysis using FDTD method, Biological Effects Of EM SpectrumSuleyman Demirel University
 
Histogram based enhancement
Histogram based enhancementHistogram based enhancement
Histogram based enhancementliba manopriya.J
 
A MEDIAN BASED DIRECTIONAL CASCADED WITH MASK FILTER FOR REMOVAL OF RVIN
A MEDIAN BASED DIRECTIONAL CASCADED WITH MASK FILTER FOR REMOVAL OF RVINA MEDIAN BASED DIRECTIONAL CASCADED WITH MASK FILTER FOR REMOVAL OF RVIN
A MEDIAN BASED DIRECTIONAL CASCADED WITH MASK FILTER FOR REMOVAL OF RVINijistjournal
 

What's hot (20)

Multimedia color in image and video
Multimedia color in image and videoMultimedia color in image and video
Multimedia color in image and video
 
imageCorrectionLinearDiffusion
imageCorrectionLinearDiffusionimageCorrectionLinearDiffusion
imageCorrectionLinearDiffusion
 
Detection of unknown signal
Detection of unknown signalDetection of unknown signal
Detection of unknown signal
 
Color
ColorColor
Color
 
Hg2513121314
Hg2513121314Hg2513121314
Hg2513121314
 
Chapter 6 color image processing
Chapter 6 color image processingChapter 6 color image processing
Chapter 6 color image processing
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)
 
A Unified PDE model for image multi-phase segmentation and grey-scale inpaint...
A Unified PDE model for image multi-phase segmentation and grey-scale inpaint...A Unified PDE model for image multi-phase segmentation and grey-scale inpaint...
A Unified PDE model for image multi-phase segmentation and grey-scale inpaint...
 
User Interactive Color Transformation between Images
User Interactive Color Transformation between ImagesUser Interactive Color Transformation between Images
User Interactive Color Transformation between Images
 
Histogram based Enhancement
Histogram based Enhancement Histogram based Enhancement
Histogram based Enhancement
 
Lect 06
Lect 06 Lect 06
Lect 06
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)
 
Paper id 2420148
Paper id 2420148Paper id 2420148
Paper id 2420148
 
Color Image Processing: Basics
Color Image Processing: BasicsColor Image Processing: Basics
Color Image Processing: Basics
 
Fractal Image Compression of Satellite Color Imageries Using Variable Size of...
Fractal Image Compression of Satellite Color Imageries Using Variable Size of...Fractal Image Compression of Satellite Color Imageries Using Variable Size of...
Fractal Image Compression of Satellite Color Imageries Using Variable Size of...
 
A MODIFIED DIRECTIONAL WEIGHTED CASCADED-MASK MEDIAN FILTER FOR REMOVAL OF RA...
A MODIFIED DIRECTIONAL WEIGHTED CASCADED-MASK MEDIAN FILTER FOR REMOVAL OF RA...A MODIFIED DIRECTIONAL WEIGHTED CASCADED-MASK MEDIAN FILTER FOR REMOVAL OF RA...
A MODIFIED DIRECTIONAL WEIGHTED CASCADED-MASK MEDIAN FILTER FOR REMOVAL OF RA...
 
hankel_norm approximation_fir_ ijc
hankel_norm approximation_fir_ ijchankel_norm approximation_fir_ ijc
hankel_norm approximation_fir_ ijc
 
Electromagnetic analysis using FDTD method, Biological Effects Of EM Spectrum
Electromagnetic analysis using FDTD method, Biological Effects Of EM SpectrumElectromagnetic analysis using FDTD method, Biological Effects Of EM Spectrum
Electromagnetic analysis using FDTD method, Biological Effects Of EM Spectrum
 
Histogram based enhancement
Histogram based enhancementHistogram based enhancement
Histogram based enhancement
 
A MEDIAN BASED DIRECTIONAL CASCADED WITH MASK FILTER FOR REMOVAL OF RVIN
A MEDIAN BASED DIRECTIONAL CASCADED WITH MASK FILTER FOR REMOVAL OF RVINA MEDIAN BASED DIRECTIONAL CASCADED WITH MASK FILTER FOR REMOVAL OF RVIN
A MEDIAN BASED DIRECTIONAL CASCADED WITH MASK FILTER FOR REMOVAL OF RVIN
 

Similar to 11(3)193

Colorization of Gray Scale Images in YCbCr Color Space Using Texture Extract...
Colorization of Gray Scale Images in YCbCr Color Space Using  Texture Extract...Colorization of Gray Scale Images in YCbCr Color Space Using  Texture Extract...
Colorization of Gray Scale Images in YCbCr Color Space Using Texture Extract...IOSR Journals
 
Color Image Processing
Color Image ProcessingColor Image Processing
Color Image Processingkiruthiammu
 
Image processing second unit Notes
Image processing second unit NotesImage processing second unit Notes
Image processing second unit NotesAAKANKSHA JAIN
 
matdid950092.pdf
matdid950092.pdfmatdid950092.pdf
matdid950092.pdflencho3d
 
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...Hemantha Kulathilake
 
Lec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfLec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfnagwaAboElenein
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...ijceronline
 
videoMotionTrackingPCA
videoMotionTrackingPCAvideoMotionTrackingPCA
videoMotionTrackingPCAKellen Betts
 
Image Processing
Image ProcessingImage Processing
Image ProcessingTuyen Pham
 
The Importance of Terminology and sRGB Uncertainty - Notes - 0.5
The Importance of Terminology and sRGB Uncertainty - Notes - 0.5The Importance of Terminology and sRGB Uncertainty - Notes - 0.5
The Importance of Terminology and sRGB Uncertainty - Notes - 0.5Thomas Mansencal
 
Color Restoration of Scanned Archaeological Artifacts with Repetitive Patterns
Color Restoration of Scanned Archaeological Artifacts with Repetitive PatternsColor Restoration of Scanned Archaeological Artifacts with Repetitive Patterns
Color Restoration of Scanned Archaeological Artifacts with Repetitive PatternsGravitate Project
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)IJERD Editor
 
MC0086 Internal Assignment (SMU)
MC0086 Internal Assignment (SMU)MC0086 Internal Assignment (SMU)
MC0086 Internal Assignment (SMU)Krishan Pareek
 
Unit i mm_chap4_color in image and video
Unit i mm_chap4_color in image and  videoUnit i mm_chap4_color in image and  video
Unit i mm_chap4_color in image and videoEellekwameowusu
 
A New Method for Indoor-outdoor Image Classification Using Color Correlated T...
A New Method for Indoor-outdoor Image Classification Using Color Correlated T...A New Method for Indoor-outdoor Image Classification Using Color Correlated T...
A New Method for Indoor-outdoor Image Classification Using Color Correlated T...CSCJournals
 
Project report_DTRL_subrat
Project report_DTRL_subratProject report_DTRL_subrat
Project report_DTRL_subratSubrat Prasad
 
06 color image processing
06 color image processing06 color image processing
06 color image processingJaiverdhan .
 

Similar to 11(3)193 (20)

Colorization of Gray Scale Images in YCbCr Color Space Using Texture Extract...
Colorization of Gray Scale Images in YCbCr Color Space Using  Texture Extract...Colorization of Gray Scale Images in YCbCr Color Space Using  Texture Extract...
Colorization of Gray Scale Images in YCbCr Color Space Using Texture Extract...
 
Color Image Processing
Color Image ProcessingColor Image Processing
Color Image Processing
 
Image processing second unit Notes
Image processing second unit NotesImage processing second unit Notes
Image processing second unit Notes
 
matdid950092.pdf
matdid950092.pdfmatdid950092.pdf
matdid950092.pdf
 
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
 
Lec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfLec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdf
 
Id3115321536
Id3115321536Id3115321536
Id3115321536
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
 
videoMotionTrackingPCA
videoMotionTrackingPCAvideoMotionTrackingPCA
videoMotionTrackingPCA
 
Image Processing
Image ProcessingImage Processing
Image Processing
 
The Importance of Terminology and sRGB Uncertainty - Notes - 0.5
The Importance of Terminology and sRGB Uncertainty - Notes - 0.5The Importance of Terminology and sRGB Uncertainty - Notes - 0.5
The Importance of Terminology and sRGB Uncertainty - Notes - 0.5
 
Color Restoration of Scanned Archaeological Artifacts with Repetitive Patterns
Color Restoration of Scanned Archaeological Artifacts with Repetitive PatternsColor Restoration of Scanned Archaeological Artifacts with Repetitive Patterns
Color Restoration of Scanned Archaeological Artifacts with Repetitive Patterns
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)
 
MC0086 Internal Assignment (SMU)
MC0086 Internal Assignment (SMU)MC0086 Internal Assignment (SMU)
MC0086 Internal Assignment (SMU)
 
Images
ImagesImages
Images
 
Unit i mm_chap4_color in image and video
Unit i mm_chap4_color in image and  videoUnit i mm_chap4_color in image and  video
Unit i mm_chap4_color in image and video
 
A New Method for Indoor-outdoor Image Classification Using Color Correlated T...
A New Method for Indoor-outdoor Image Classification Using Color Correlated T...A New Method for Indoor-outdoor Image Classification Using Color Correlated T...
A New Method for Indoor-outdoor Image Classification Using Color Correlated T...
 
Project report_DTRL_subrat
Project report_DTRL_subratProject report_DTRL_subrat
Project report_DTRL_subrat
 
06 color image processing
06 color image processing06 color image processing
06 color image processing
 
I0351053058
I0351053058I0351053058
I0351053058
 

Recently uploaded

HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEaurabinda banchhor
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...JojoEDelaCruz
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataBabyAnnMotar
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Millenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxMillenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxJanEmmanBrigoli
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operationalssuser3e220a
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 

Recently uploaded (20)

HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSE
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped data
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Millenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxMillenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptx
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operational
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 

11(3)193

  • 1. Contributed paper OPTO-ELECTRONICS REVIEW 11(3), 193–196 (2003) Colour temperature estimation algorithm for digital images – properties and convergence K. WNUKOWICZ* and W. SKARBEK Institute of Radioelectronics, Warsaw University of Technology, 15/19 Nowowiejska Str., 00-665 Warsaw, Poland The paper presents an algorithm for estimation of temperature of image. Colour temperature is important, perceptual feature describing colour and content of images. The main idea of the algorithm is to average pixel values of image, omitting the values which have meaningless influence on perception of colour temperature. It is done in an iterative procedure. The con- vergence of the procedure is discussed. The algorithm can be applied in image search/retrieval tasks and is proposed in the MPEG-7 colour temperature descriptor for estimation of colour temperature of images. Keywords: colour temperature, colour perception, image retrieval. 1. Introduction This article presents a colour temperature estimation al- gorithm for image to represent general visual impression of Colour temperature is one of the visual features essentially colour temperature a viewer has of the image. The impres- influencing perception of colour by the human visual sys- sion depends on elements like image colour content, illumi- tem. Categories such as hot, warm, moderate, and cool are nation of the scene while it was photographed, and to some used for describing the felt temperature of the touched ob- extent on observation conditions. The procedure consists of jects. The same categories can be considered in the case of two main steps. In the first step, the image average colour colour temperature feeling by observer who is viewing col- value is computed by omitting pixels having poor influence our scene or image. This feeling depends mostly on proper- on colour temperature impression. In the second step, the ties of illumination of the viewed scene. Different kinds of colour temperature value is estimated for previously com- illumination of the same scene gives different colour tem- puted colour, utilizing its chromaticity coordinate values. It perature feelings, adequately to the illumination. For exam- is done by Robertson’s algorithm [1] which approximates ple, natural daylight can have light in broad range of colour colour temperature by means of the fixed lines on uv chro- temperature values depending on the time of the day as maticity diagram called isotemperature lines. well as atmospheric and weather conditions which have an The estimated colour temperature of image can be clas- influence on colour temperature perception in outdoor im- sified into one of subjective categories: hot, warm, moder- ages. The view of the same landscape in various viewing ate, and cold. The whole range of colour temperature val- conditions such as a sunny day at noon, cloudy sky or at ues should be divided into 4 sub-ranges. This task was ap- twilight gives varied feelings of colour temperature. In the proached by conducting subjective experiments on a group same way works artificial light – different light sources can of people who visually assessed test images with respect to give different colour temperature feelings for the illumi- colour temperature feeling. The result of the assessment nated scene. was used for partition objectively computed colour temper- The concept of colour temperature is not explicitly re- ature values into the subjective categories [2]. lated to thermal temperature of the viewed objects. It is de- The estimated colour temperature could be applied for rived from a relationship between the temperature of a hy- image indexing and searching engines and is proposed as a pothetical object called black body and its appeared colour. basis for a new visual descriptor in MPEG-7 standard [3,4]. The colour chromaticity of black body just depends on temperature of this body. Being based on this assumption 2. Procedure for estimation of temperature of one can classify colours in the range from hot to cold ac- image cording to its similarity to of colour black body in appro- priate temperature. A basic definition of colour temperature can be stated as an absolute temperature of the black body whose spectral dis- tribution of radiance power is proportional to the given *e-mail: stimulus. It means that the both radiations have the same K.Wnukowicz@elka.pw.edu.pl Opto-Electron. Rev., 11, no. 3, 2003 K. Wnukowicz 193
  • 2. Colour temperature estimation algorithm for digital images – properties and convergence Fig. 2. Isotemperature lines on the uv chromaticity diagram. The estimation of colour temperature for the given col- Fig. 1. Planck’s locus of black body on xy chromaticity diagram. our has the steps as follows: • convert chromaticity coordinates from (xs,ys) to (us,vs) (according to CIE 1960 UCS), chromaticity values. The chromaticity of black body radia- • find two adjecent isotemperature lines, from collection tion depends only on its temperature and is defined by of 31 isotemperature lines, which are neighbours to the Planck’s formula [1]. It is convenient to depict this depend- point (us,vs) on the chromaticity diagram, ency on a chromaticity diagram. Figure 1 shows the curved • compute value of colour temperature from the distance line named Planck’s locus, corresponding to the chromatic- ratio between the point and both of the two adjacent ity of a black body at the temperature changing from isotemperature lines. 2000 K (red colour) to 25000 K (blue colour). Because of the fact that having the basic definition of 3. Calculation of the perceptional average colour temperature it can be determined only for a small set chromaticity coordinates of image of colours, a correlated colour temperature concept is intro- duced. A correlated colour temperature is the temperature In the first stage of colour temperature estimation there are of Planck’s black body whose perceived colour most computed the chromaticity coordinates of average colour closely resembles that of the given stimulus. So, it is de- of image pixels related to human perception of colour tem- fined rather in perceptual aspect. In practice, the term of perature. Pixels which have poor or meaningless influence colour temperature is used also for correlated colour tem- on this perception are discarded during calculation. Firstly, perature for shortness. The calculation of colour tempera- image pixels are converted into standard linear colour ture is performed by use of the perceptually homogeneous space sRGB [5]. Equation UV chromaticity diagram (CIE 1960). It is assumed that if R(i, j ) £ 0.03928 ´ 2550 . the colour temperature is constant along the lines which are perpendicular to the Planck’s locus on this diagram æ R(i, j ) ö (Fig. 2). These short straight lines are called isotemperature RsRGB (i, j ) = ç ÷ lines. è 255 ´ 12.92 ø The algorithm for calculation of the chromaticity coor- else (1) dinates of image has its main steps as follows: 2 .4 • linearize image pixels: RGB –> sRGB, é R(i, j ) ù ê 255 + 0.055 ú • convert colour space sRGB –> XYZ, RsRGB (i, j ) = ê ú • discard pixels with Y luminance value below threshold ê . 1055 ú Tl, ë û • iteratively average remaining pixels discarding the ones presents calculation of R colour component for most com- with values above a threshold adapted after each itera- monly available images represented in the form suited to tion, PC computer monitors. The G and B components are con- • take chromaticity coordinates (xs,ys) of average colour verted in the same way. Parameters i and j indicate the given in XYZ. pixel position in rows and columns respectively. 194 Opto-Electron. Rev., 11, no. 3, 2003 © 2003 COSiW SEP, Warsaw
  • 3. Contributed paper The obtained sRGB colour components are in the range pixels not indicated for discarding”. The averaging proce- [0,1], what simplifies further computation. Next, pixel val- dure is carried out for all of the three colour components X, ues are converted into XYZ colour space by multiplying the Y and Z. The f coefficient is a multiplier for the colour conversion matrix M and the sRGB colour vectors component average value to obtain threshold above which pixels are discarded. Its typical value is 3, what was ob- é X (i, j ) ù é R(i, j ) ù tained in the subjective experiments [6]. ê Y (i, j ) ú = M ´ ê G(i, j ) ú , (2) The procedure for averaging image pixels was verified ê ú ê ú on a test set of images. Typical number of iterations for the ë Z (i, j ) û ê ú êë B(i, j ) û ú test images was in the range from 4 to 8 depending on the where pixel value distributions in images. Maximum number of é0.4124 0.3576 01805 ù . iterations was above 20. The convergence of the averaging M= ê 0.2126 07152 0.0722 ú . procedure can be described as in Eq. (5). ê ú ë 0.0193 01192 0.9505û ê . ú Let A n = X n , K n = X n , and Sn is a sum of pixel val- Black and near black colours do not impact signifi- ues in the set Xn, and n is the loop number cantly colour temperature perception, so the dark pixels are omitted from calculation. The auxiliary table p is a mask æ S ö Sn = K n An ç An = n ÷ for marking discarded pixels. This is a matrix which has è Kn ø the same dimensions as the image. If the mask value at the specific position p(i,j) is 0 then the corresponding pixel in and the image is omitted from further calculations. Tll is a threshold for pixel discarding having its typical value 5% S n = S n +1 + å x, x Î Xn of maximal component range. Only the luminance compo- x > fAn nent Y is used for discarding dark pixels where ì if Y (i, j ) < Tll then p(i, j ) = 0 K n A n = K n +1 A n +1 + åx ³ í . (3) x Î Xn îelse p(i, j ) = 1 x > fAn ³ K n +1 A n +1 + fA n (K n - K n +1 ), In the next step, the remaining pixels are iteratively av- A n (K n - fK n + fK n +1 ) ³ K n +1 A n +1, (5) eraged. In this process, a threshold for indicating colours standing out is assessed in each iteration and pixels exceed- é (1 - f )K n + fK n +1 ù A n +1 £ A n ê ú = ing the threshold are marked for omitting. The pixels dis- ë K n +1 û carded here are too much different from the averaged mean é K ù value and represent self-luminous regions or objects [6] = A n ê f - ( f - 1) n ú . ë K n +1 û X Ts (0) = 0 An is the decreasing sequence if loop row - 1 col - 1 é Kn ù 1 ê f - ( f - 1) K ú £ 1, Xa = å row ´ col i = 0 å X (i, j), ë n +1 û j =0 X Ts = f ´ X a (4) thus if ( X Ts (t ) = X Ts (t - 1)) return X a é æ K n öù ê ( f - 1)ç 1 - ÷ ú £ 0. ì if X (i, j ) > X Ts then p(i, j ) = 0 ë è K n +1 ø û í îelse p(i, j ) = 1 end loop It is true because f >1 and Kn > = Kn+1, therefore 0 £ An+1 £ An. The sequence is convergent because it is not increasing and is lower bounded. In averaging procedure, Eq. (4), XTs(t) indicates the The (xs,ys) chromaticity values are obtained from com- threshold in the current loop t above which the pixels are puted average colour as follows. discarded. If the threshold value is the same as in the previ- ous loop [XTs(t – 1)], it means that no pixels were discarded Xa xs = , in that loop and the mean value Xa is returned. The compu- X a + Ya + Z a tation of mean value Xa is done only for pixels which have (6) Ya corresponding mask value p(i, j) above 0. The same is for ys = . expression row´cols. It intuitively means: “the number of X a + Ya + Z a Opto-Electron. Rev., 11, no. 3, 2003 K. Wnukowicz 195
  • 4. Colour temperature estimation algorithm for digital images – properties and convergence 4. Estimation of colour temperature of given proximated by a ratio of distances from the point to the colour two adjacent isotemperature lines. The formula for resulting colour temperature is given as After computing the chromaticity coordinates of the aver- age colour of image, its colour temperature can be esti- di TRc = TRi + (TRi +1 - TRi ). (9) mated. Firstly, the chromaticity coordinates need to be con- d i - d i +1 verted to (us,vs) coordinates according to the CIE 5. Conclusions 4x s us = -2x s + 12 y s + 3 In the article, the algorithm for estimation of colour tem- (7) 6y s perature of image is presented. The purpose of the estima- vs = tion is to render human visual perception of this colour fea- -2x s + 12 y s + 3 ture in static images as well as in moving ones (video se- quences). Thereby, it is a considerable feature of image for Secondly, the line perpendicular to the Planck’s locus, application in image search and retrieval tasks. That is just the crossing point (us,vs), must be determined on the dia- what was a need, and a motivation for its designing origin. gram. The line in question is an isotemperature line for the MPEG-7, a standard for describing an image content, have obtained averaged image colour. For this purpose, Robert- got a contribution, proposing a descriptor for visual content son’s algorithm can be used [1], which utilizes 31 fixed browsing based on colour temperature. Other possible ap- isotemperature lines given in the form of parameters gath- plication of the colour temperature feature may be conver- ered in a table. The given isotemperature lines are within a sion of colour temperature of image. Users of multimedia range from 1667 K to 100000 K, and they are specified by systems often have their personal preferences on colour 4 parameters: their colour temperatures Ti and geometrical temperature of viewed images. If the colour temperature of locations on a diagram, which are tangents of an angle be- image is known as well as the user preference on it, conver- tween the line and the horizontal direction ti and the point sion of image appearance can be easy done to conform to of crossing the Planck’s locus given by (ui,vi) coordinates. user needs. Further, potentially beneficial domain is pho- To find out an isotemperature line for the point (us,vs), the tography. Knowledge of the colour temperature of photo two neighbouring adjacent fixed isotemperature lines image makes it possible to do an automatic conversion of should be determined at first. It is done by calculating the it, just to meet user needs. distances to all of the 31 given lines and picking two adja- cent ones of which the ratio between the distances from the References point to them is negative (di/di+1 <0 as one of the distances is negative and the second is positive). The formula for cal- 1. G. Wyszecki and W.S. Stiles, Colour Science Concepts and culation of the distance between a point and a line is given Methods, Quantitative Data and Formulae, (2nd Edition), A by Wiley-Interscience Publication, 1982. 2. W. Skarbek, “Optimal intervals for fuzzy categories of col- (v s - v i ) - t i (u s - u i ) our temperature”, ISO/IEC JTC1/SC29/ WG11 M7625, di = . (8) (2001). (1 + t i2 )1 2 3. S.K. Kim and D.S. Park, “Proposal for colour temperature de s c riptor for ima ge de s c ription” , ISO/ I EC In the next step, the colour temperature of the point JTC1/SC29/WG11 M6966, (2001). (us,vs) is approximated from the ratio between the distances 4. S.K. Kim and D.S. Park, “Report of VCE-6 on MPEG-7 from the point to each of the neighbouring isotemperature colour temperature browsing descriptors”, ISO/IEC lines. The approximation is done on the assumption that JTC1/SC29/WG11 M7265, (2001). 5. M. Stokes, M. Anderson, S. Chandrasekar, and R. Motta, • the Planck’s locus of a black body between the adjacent “A standard default colour space for the internet – sRGB”, isotemperature lines (Ti and Ti+1) is approximated by a Version 1.10, (1996). circular arc. 6. A.P. Petrow, C.Y. Kim, I.S. Kweon, and Y.S. Seo, “Per- • colour temperature presented in reciprocal scale TR = ceived illumination measured”, Colour Res. Appl. 23, No 3 106/T is a linear function of its position on this arc. (1998). • the angle between adjacent isotemperature lines is 7. A. Borbely, A. Samson, and J. Schanda, “The concept of small, so a ratio of the arc lengths between the two correlated temperature revised”, Colour Res. Appl. 26, No 6 fixed and the point’s isotemperature lines can be ap- (2001). 196 Opto-Electron. Rev., 11, no. 3, 2003 © 2003 COSiW SEP, Warsaw