Brightness Calculation in Digital Image Processing - PowerPoint PPT Presentation

1 / 30
About This Presentation
Title:

Brightness Calculation in Digital Image Processing

Description:

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. – PowerPoint PPT presentation

Number of Views:332
Avg rating:3.0/5.0
Slides: 31
Provided by: Mar5283
Category:

less

Transcript and Presenter's Notes

Title: Brightness Calculation in Digital Image Processing


1
Brightness Calculation in Digital Image
Processing
  • Sergey Bezryadin, Pavel Burov, Dmitry
    Ilinih
  • KWE International Inc, San Francisco, USA
  • UniqueICs, Saratov, Russia

2
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.

3
Introduction
  • 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
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 Red Red Green Green Green Blue Blue Blue Gray Gray Gray
157 0 0 0 89 0 0 0 255 Gray Gray Gray
Cyan Cyan Cyan Magenta Magenta Magenta Yellow Yellow Yellow 76 76 76
0 85 85 138 0 138 79 79 0 76 76 76
  • However, as you can see, corresponding colors are
    not equi-bright.

5
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.

6
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.

7
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.

8
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.

where X, Y, and Z are Tristimulus values.
9
Linear CCS DEF2
  • Linear CCS DEF2 is designed to be orthonormal
    according to Cohen metric.
  • DEF2 uses the 2º CIE 1931 data.
  • Digit 2 indicates 2º Standard Colorimetric
    Observer.
  • DEF2 is 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.

10
Plane D 1
  • Plane, where D 1, is convenient for depicting
    Gamut of various image reproduction devices, for
    example, for Gamut of sRGB monitor.

sRGB Monitor Gamut
White Light
11
New Definitions of Brightness, Chroma, and Hue
  • B Brightnessis a norm of the color vector S.
  • C Chromais an angle between the color vector S
    and an axis D.
  • H Hueis 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 physical meaning. They are spherical
    coordinates of the color vector S.

S
BS
12
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.

13
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.

14
Color-to-Gray Transformation Luma
  • 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.

Luma model
15
Color-to-Grays Transformation Arithmetic mean
  • Use of Arithmetic mean model
  • improves relation between Blue and Grey stimuli,
  • but underrates Brightness of Green and overrates
    Magenta.

Luma model
Arithmetic mean model
16
Color-to-Grayscale Transformation HSV
  • 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.

Luma model
HSV model
Arithmetic mean model
17
Color-to-Grayscale Transformation BCH
  • In BCH model evaluation of Blue is improved
    comparing to HSV model and, in general, its
    Brightness rating better corresponds to human
    perception.

Luma model
HSV model
Arithmetic mean model
BCH model
18
Brightness Editing BCH (Natural choice)
  • An algorithm that is equivalent to expocorrection
    and which may be described with the following
    formula
  • B' 2EVB
  • looks 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.

Original color EV 2 EV 4
19
Brightness Editing TV based algorithm
  • 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.

Original color EV 2 EV 4
Original color M0 55 M0 152
20
Brightness Editing Lightness editing
  • 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.

Original color EV 2 EV 4
Original color L0 23.4 L0 60
21
Contrast Editing Brightness Ratio
  • The best contrast definition for digital image
    processing is the following
  • contrast 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 contrast modification, their
    brightness ratios remain equal to each other
    after the contrast modification
  • B1 B2 B3 B4 gt B1? B2? B3?
    B4?

22
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 length (BCH model) or
    Luminance for brightness in this formula
    guarantees preservation of pixel chromatic
    coordinates.

23
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.

24
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.

25
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).

26
Dynamic Range editing I
27
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, Photoshops algorithm
    does not preserve pixels 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.

28
Dynamic Range editing II
29
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
  • HSV
  • has its advantageous and disadvantageous area of
    application
  • The BCH model works well in all image editing
    procedures.

30
  • Thank You!
Write a Comment
User Comments (0)
About PowerShow.com