histogram theory

Upload: debame

Post on 07-Apr-2018

246 views

Category:

Documents


1 download

TRANSCRIPT

  • 8/4/2019 Histogram Theory

    1/26

    By

    Debashree GhoshAsst. Prof./BME

    ALPHA COLLEGE OF ENGINEERINGThirumazhisai, Chennai- 124

  • 8/4/2019 Histogram Theory

    2/26

    Introduction

    Increases the global contrast of images

    Especially when the usable data of the image

    is represented by close contrast values.

    This allows for areas of lower local contrast to

    gain a higher contrast.

  • 8/4/2019 Histogram Theory

    3/26

    Histogram

    Consider a image {x} and let nk be the numberof occurrences of gray level rk.

    The probability of an occurrence of a pixel oflevel kin the image is

    Also called normalized histogram Note: Sum of all components of the normalized histogram is

    equal to 1

  • 8/4/2019 Histogram Theory

    4/26

  • 8/4/2019 Histogram Theory

    5/26

  • 8/4/2019 Histogram Theory

    6/26

    Histogram Equalization

    For any r transformed pixel value

    s=T(r) 0

  • 8/4/2019 Histogram Theory

    7/26

    Contd

    ps(s) and pr(r) are PDF of random variables s

    and r, respectively.

    s is determined by gray level PDF of original

    image dummy variable of integration

    Right side of the equation if cumulative

    distribution function Since PDFs are +ve , it follows that this transformation is

    singled valued and monotonically increasing

    Similarly Integral of PDF is in the range of [0,1]

  • 8/4/2019 Histogram Theory

    8/26

    Contd.

    We can find the value of ps (s)

    0

  • 8/4/2019 Histogram Theory

    9/26

  • 8/4/2019 Histogram Theory

    10/26

    Contd

    Discrete Formulation

  • 8/4/2019 Histogram Theory

    11/26

    Original Image

  • 8/4/2019 Histogram Theory

    12/26

    Value Count Value Count Value Count Value Count Value Count

    52 1 64 2 72 1 85 2 113 1

    55 3 65 3 73 2 87 1 122 1

    58 2 66 2 75 1 88 1 126 1

    59 3 67 1 76 1 90 1 144 1

    60 1 68 5 77 1 94 1 154 1

    61 4 69 3 78 1 104 2

    62 1 70 4 79 2 106 1

    63 2 71 2 83 1 109 1

  • 8/4/2019 Histogram Theory

    13/26

    Value cdf Value cdf Value cdf Value cdf Value cdf

    52 1 64 19 72 40 85 51 113 60

    55 4 65 22 73 42 87 52 122 61

    58 6 66 24 75 43 88 53 126 62

    59 9 67 25 76 44 90 54 144 63

    60 10 68 30 77 45 94 55 154 64

    61 14 69 33 78 46 104 57

    62 15 70 37 79 48 106 58

    63 17 71 39 83 49 109 59

  • 8/4/2019 Histogram Theory

    14/26

    The general histogram equalization formula is:

    Where cdfmin is the minimum value of the

    cumulative distribution function (in this case 1)

    For example, the cdf of 78 is 46:

  • 8/4/2019 Histogram Theory

    15/26

    Equalized values

  • 8/4/2019 Histogram Theory

    16/26

  • 8/4/2019 Histogram Theory

    17/26

    Example

  • 8/4/2019 Histogram Theory

    18/26

    Contd..

  • 8/4/2019 Histogram Theory

    19/26

    Histogram Matching

    The Enhancement on a uniform histogram is

    not the best approach

    Use specific shape of histogram

    Histogram matching also called as hostogram

    spacification.

  • 8/4/2019 Histogram Theory

    20/26

    Contd

    r and z are continuous gray levels

    pr(r) and pz (z) denotes correspondingcontinuous probability density functions.

    Step1:

    Step2:

    Step3:

  • 8/4/2019 Histogram Theory

    21/26

    Discrete Gray Level

    Gjhk

  • 8/4/2019 Histogram Theory

    22/26

  • 8/4/2019 Histogram Theory

    23/26

    Original Image and its Histogram

  • 8/4/2019 Histogram Theory

    24/26

    Histogram equalization

  • 8/4/2019 Histogram Theory

    25/26

  • 8/4/2019 Histogram Theory

    26/26