Upload
manoj-prabhakar
View
122
Download
0
Tags:
Embed Size (px)
Citation preview
4 March 2007 Las Vegas, Nevada, USA 1
Technologies for Digital Fulfillment 2007
International, Inc.
Brightness Calculation Brightness Calculation
in Digital Image Processingin Digital Image Processing
Sergey Bezryadin, Pavel Burov*, Dmitry Ilinih*
KWE International Inc, San Francisco, USA*UniqueIC’s, Saratov, Russia
International, Inc.
4 March 2007 Las Vegas, Nevada, USA 2
International, Inc.Introduction
Usually, term Brightness should be used only for non-quantitative references to physiological sensations and perceptions of light.
Thus, Wyszecki and Stiles
define Brightness as an attribute of a visual sensation according to which a given visual stimulus appears to be more or less intense; or, according to which the area in which the visual stimulus is presented appears to emit more or less light
and range variation in Brightness from “bright” to “dim”. This definition is useless for software developers. Image processing cannot
deal with sensation. It needs a quantitative description for Brightness. However, currently, there is no conventional measure for this stimulus
characteristic. Values that algorithm developers use for Brightness representation vary
even in a single software product.
4 March 2007 Las Vegas, Nevada, USA 3
International, Inc.Introduction
In this presentation, In this presentation, The most popular values used for Brightness representation are reviewed.
Use of stimulus length as a measure of Brightness is suggested.
The effect of the Brightness measure choice on Color to Grayscale Transformation Brightness Editing Contrast and Dynamic Range Editing
is discussed
4 March 2007 Las Vegas, Nevada, USA 4
International, Inc.Brightness Models: Luminance
Not so long ago, Luminance was used as a synonym for Brightness. A value Photoshop employs for Brightness in Color-to-Grayscale transformation
well correlates with Luminance definition. All stimuli presented in this table have the same Luminance (2% accuracy).
Red Green BlueGray
157 0 0 0 89 0 0 0 255
Cyan Magenta Yellow76 76 76
0 85 85 138 0 138 79 79 0
However, as you can see, corresponding colors are not equi-bright.
4 March 2007 Las Vegas, Nevada, USA 5
International, Inc.Brightness Models: Luma
Another popular brightness substitution is Luma. According to ITU-R BT.601 standard, it is a Brightness equivalent in MPEG and
JPEG algorithms
Y' = 0.299 r + 0.587 g + 0.114 b where r, g, and b are stimulus sRGB coordinates.
Luma is widely used in image processing algorithms imitating Brightness control embodied in TV.
Thus, Photoshop uses it in contrast editing algorithms to calculate average Brightness.
There is a myth that Luma well approximates Brightness. It is not always true.
To compare Luma with Luminance, consider this two stimuli with sRGB coordinates (0,0,255) and (38,21,45)
Both of them are characterized by the same Luma value (Y' = 29), while their Luminance differs 6.4 times.
4 March 2007 Las Vegas, Nevada, USA 6
International, Inc.Brightness Models: Arithmetic mean
The most popular Brightness editing algorithm is based on Arithmetic mean model
μ = (r + g + b) / 3
This Brightness measure has the biggest difference with Luminance.
For example, two stimuli with the following sRGB coordinates
(0,255,0) and (69,21,165) are characterized by the same value μ = 85, while their Luminance differs 15.8 times.
4 March 2007 Las Vegas, Nevada, USA 7
International, Inc.Brightness Models: HSV
Introduced by Alvy Ray Smith, HSV (Hue, Saturation, Value) also known as HSB (Hue, Saturation, Brightness) model is prevalent in Saturation and Hue editing algorithms
V = max (r, g, b)
According to this formula, stimuli with the following sRGB coordinates
(255,255,255) and (0,0,255), are characterized by the same V = 255. Their Luminance differs 13.9 times.
4 March 2007 Las Vegas, Nevada, USA 8
International, Inc.Brightness Models: BCH
Use of stimulus length as a measure of Brightness introduced in BCH (Brightness, Chroma, Hue) model provides Brightness definition effective for all image-editing algorithms.
Length is calculated according to Cohen metrics.
222 FEDB
where X, Y, and Z are Tristimulus values.
ZYX
FED
6104.00120.13655.04429.02797.18537.1
4670.07125.02053.0
4 March 2007 Las Vegas, Nevada, USA 9
International, Inc.Linear CCS DEF2
Linear CCS DEF2Linear CCS DEF2 is designed to be orthonormal according to Cohen metric.
DEF2DEF2 uses the 2º CIE 1931 data. Digit “2” indicates 2º Standard Colorimetric
Observer.
DEF2 DEF2 isis based on the following restrictions:
Е = F = 0 and D is positive for standard Day light D65.
F = 0 and E is positive for red monochromatic stimulus (700 nm).
F is positive for yellow stimulus.
D
E
F
D65
= 700 nm
4 March 2007 Las Vegas, Nevada, USA 10
International, Inc.Plane D = 1
Plane, where DD = 1= 1, is convenient for depicting Gamut of various image reproduction devices, for example, for Gamut of sRGB monitor.
White Light
sRGB Monitor Gamut
4 March 2007 Las Vegas, Nevada, USA 11
International, Inc.
New Definitions of Brightness, Chroma, and Hue
B – BrightnessBrightnessis a norm of the color vector S.
C – ChromaChromais an angle between the color vector S and an axis D.
H – HueHueis an angle between axis E and the color vector orthogonal projection on the plane EF.
With this definition, Brightness, Chroma and Hue have a clear clear physical meaningphysical meaning. They are spherical coordinates spherical coordinates of the color vector S..
S
B=||S||
4 March 2007 Las Vegas, Nevada, USA 12
International, Inc.Brightness Models: BCH
The main advantage of BCH model is that it simplifies design of algorithms that perform only intended operation without unwilling concurrent modification of other image parameters.
Thus, Brightness and contrast editing algorithms based on BCH model modify only pixel Brightness and preserve chromatic coordinates.
This Brightness definition is also noticeably different from Luminance.
For example, stimuli with the following sRGB coordinates
(0,0,255) and (196,234,0)
have the same length, so they are equally-bright according to BCH model
but Luminance of these stimuli differs 9.8 times.
4 March 2007 Las Vegas, Nevada, USA 13
International, Inc.
Color-to-Gray Transformation: Luminance
The most natural way to turn a colored image into a grayscale one is with an algorithm that preserves pixel Brightness.
This transformation may serve as a test for quality of Brightness measure. Let us consider the presented earlier image, which colors correspond to
stimuli having the same Luminance. This image processed with color-to-grayscale transformation using
Luminance for Brightness turns into equally grey picture. Processing the same image with alternative Brightness representatives
(according to discussed above models) makes it possible to compare Brightness measures.
4 March 2007 Las Vegas, Nevada, USA 14
International, Inc.Color-to-Gray Transformation: Luma
Luma model
While Luminance underrates Brightness of the Blue stimulus, the value provided for it by Luma may be considered as unacceptably small.
Rating of colors looks inversed, marking Blue and Red less bright than Cyan and Yellow.
4 March 2007 Las Vegas, Nevada, USA 15
International, Inc.
Color-to-Grays Transformation: Arithmetic mean
Luma model
Arithmetic mean model
Use of Arithmetic mean model improves relation between Blue and Grey stimuli, but underrates Brightness of Green and overrates Magenta.
4 March 2007 Las Vegas, Nevada, USA 16
International, Inc.Color-to-Grayscale Transformation: HSV
Luma model HSV model
Arithmetic mean model
HSV Brightness rating better corresponds to human perseption.
However, Blue stimulus is graded as high as White stimulus and this defect reduces the model value.
4 March 2007 Las Vegas, Nevada, USA 17
International, Inc.Color-to-Grayscale Transformation: BCH
Luma model HSV model
Arithmetic mean model BCH model
In BCH model evaluation of Blue is improved comparing to HSV model and, in general, its Brightness rating better corresponds to human perception.
4 March 2007 Las Vegas, Nevada, USA 18
International, Inc.
Brightness Editing: BCH (Natural choice)
Original color EV = +2 EV = +4
An algorithm that is equivalent to expocorrection and which may be described with the following formula
B' = 2EV·Blooks like the most natural choice for Brightness editing.
This algorithm is designed for BCH Color Coordinate System, but may be adapted for any other CCS.
This picture illustrates a performance of the algorithm.
4 March 2007 Las Vegas, Nevada, USA 19
International, Inc.Brightness Editing: TV based algorithm
Original color EV = +2 EV = +4 Original color M0 = +55 M0 = +152
Modern image processing tools, such as, Corel, Photoshop etc., make Brightness modification with the following formula
(r', g', b') = (r + M0, g + M0, b + M0) For this equation, a requirement to transform equi-bright stimuli into equi-bright stimuli is
fulfilled only when Brightness is measured according to the Arithmetic mean model.
The main defects of the method based on Arithmetic mean model: it changes stimuli chromatic coordinates and increasing Brightness entails contrast and saturation decrease.
4 March 2007 Las Vegas, Nevada, USA 20
International, Inc.Brightness Editing: Lightness editing
Original color EV = +2 EV = +4 Original color L0 = +23.4 L0 = +60
There is a common believe, that Brightness editing may be well done by lightness modification in Lab
(L', a', b') = (L + L0, a, b)
Lightness editing result is very similar to TV based algorithm result, which has been presented on the previous slide, and significantly worse than the natural choice.
4 March 2007 Las Vegas, Nevada, USA 21
International, Inc.Contrast Editing: Brightness Ratio
The best contrastcontrast definition for digital image processing is the following
contrastcontrast is the ratio between the maximal and minimal image brightness.
Then, a correct contrast editing algorithm should act according to the rule:
If two pairs of pixels have the same brightness ratio prior to the If two pairs of pixels have the same brightness ratio prior to the contrast modification, their brightness ratios remain equal to each contrast modification, their brightness ratios remain equal to each other after the contrast modificationother after the contrast modification
B1 : B2 = B3 : B4 => B1΄ : B2΄ = B3΄ : B4΄
4 March 2007 Las Vegas, Nevada, USA 22
International, Inc.Contrast Editing: New algorithm
A transformation that satisfies the above-stated rule might be written as follows:
where B(m,n) is the brightness of a pixel with an order number (m,n), and B0 is a constant brightness, for example, average brightness.
Use of a color vector lengthcolor vector length (BCH model) or Luminance Luminance for brightness in this formula guarantees preservation of pixel chromatic coordinates.
k
Bn)B(m,Bn)(m,B'
00
4 March 2007 Las Vegas, Nevada, USA 23
International, Inc.Contrast Editing: New algorithm
This picture illustrates the difference between the algorithm preserving chromatic coordinates (the new one) and the algorithm that is not (typical).
The processing of the central image employs a length of a color vector for brightness.
4 March 2007 Las Vegas, Nevada, USA 24
International, Inc.
Dynamic Range Editing Preserving Local Contrast
The dynamic range editing preserving chromatic coordinates and not affecting local contrast is very important for High Dynamic Range image processing.
Such algorithm may easily be created with the BCH model:
Presented algorithm preserves average Brightness ratio
BAvr,1 : B Avr,2 = B Avr,3 : B Avr,4
This feature helps maintain an impression of large dynamic range and provides an opportunity for an accurate reverse transformation.
k
n)(m,BB
n)B(m,n)(m,B'Avr
0
4 March 2007 Las Vegas, Nevada, USA 25
International, Inc.Original HDR Image
Dynamic range of this image is more, than 100 000. The above image was constructed from a single photo by successive expocorrection,
two steps at once. The brightness ratio of corresponding pixels in the first and the fifth part is 256, while their chromatic coordinates are the same.
In order to prepare the image for viewing on a regular monitor, it was processed with suggested dynamic range editing algorithm. The result is displayed on the next slide.
For comparison, the same image was processed with Photoshop Shadow/Highlight transformation (simple mode).
4 March 2007 Las Vegas, Nevada, USA 26
International, Inc.Dynamic Range editing I
4 March 2007 Las Vegas, Nevada, USA 27
International, Inc.Dynamic Range editing
While there are many tools for tone mapping, most of them involve several sliders for this operation, not an easy job for a regular user.
Thus, somebody may get a better result with Photoshop, than presented on the previous slide, if he uses 6-slider advanced mode.
But, even in advanced mode, Photoshop’s algorithm does not preserve pixel’s chromatic coordinates and local contrast
Photoshop Shadow/Highlight (simple mode) operation involves only a single slider, the same as it is needed for the new algorithm, so both compared here methods have similar level of complexity for users.
The difference in algorithm results is better visible on the next slide, where the same original image was twice processed.
4 March 2007 Las Vegas, Nevada, USA 28
International, Inc.Dynamic Range editing II
4 March 2007 Las Vegas, Nevada, USA 29
International, Inc.Conclusion
All considered here Brightness measures do not fully correspond to human perception
But while each of the traditional Brightness models Luminance Luma Arithmetic mean model HSVhas its advantageous and disadvantageous area of application
The BCH model works well in all image editing procedures.
4 March 2007 Las Vegas, Nevada, USA 30
International, Inc.
Thank You!Thank You!