Image Histograms by zH37CPH8

VIEWS: 4 PAGES: 47

									                 The Properties of Images
                   and Imaging Devices

          Group II of the Imaging Chain




Imaging Science Fundamentals     Chester F. Carlson Center for Imaging Science
               Think of an image mathematically.

       A simple black & white image is a volume of information!

       Two dimensions are spatial dimensions (cm for example)

       The other dimension is lightness/darkness
            y                      gray level




                                                                          y



Imaging Science Fundamentals   x                x Chester F. Carlson Center for Imaging Science
                       Three dimensional graphs
                        are hard to understand.

          y                        gray level




                                                                         y


                               x                x


Imaging Science Fundamentals                        Chester F. Carlson Center for Imaging Science
                               Contour Plot:
          Another way to represent 3 dimensional information
                                       y




                                          Lines are regions
                                                                                 x
                                        of constant gray level
Imaging Science Fundamentals                   Chester F. Carlson Center for Imaging Science
           The 3D graph and the contour plot
         are not used much in imaging science.

                 Other graphical representations
                      are more often used.

                           One that is commonly
                          used is the "Histogram"




Imaging Science Fundamentals                 Chester F. Carlson Center for Imaging Science
                        The Histogram
           A statistical way of looking at an image
           Step #1: Sample the image
                      Divide it up into "pixels"




Imaging Science Fundamentals                       Chester F. Carlson Center for Imaging Science
 Step #2: Look at the gray value of each "pixel"

                                                          Gray Scale
                                                           R = 1 is white




                                                           R = 0 is black



                               Gray Value: R = 0.653


Imaging Science Fundamentals             Chester F. Carlson Center for Imaging Science
      Step #3: Take the gray pixels out of the image.

        We have cut the image into lots of pieces, called "pixels".
            We measure the gray value, R, for each patch.




Imaging Science Fundamentals                  Chester F. Carlson Center for Imaging Science
Step #4: Sort the pixels from darkest to lightest.

                               There are many pixels at this gray level.




                                   Only a few at these gray levels.




Imaging Science Fundamentals                 Chester F. Carlson Center for Imaging Science
                         Each pixel in the image has its
                     place in the stacks of rearranged pixels.




                               Number
                                 at a
                               given R




                                     R=0                                         R=1




Imaging Science Fundamentals                       Chester F. Carlson Center for Imaging Science
                         Step #5: Form a graph to
                        represent the sorted pixels.



                                Number
                                of pixels
                                  at a
                                given R




                                            0                                              1
                                                               R




        Each pixel in the image has its place in the stacks of rearranged pixels.
Imaging Science Fundamentals                              Chester F. Carlson Center for Imaging Science
                       If you use very small pixels,
                       the graph becomes sharper.



                               Number
                               of pixels
                                 at a
                               given R




                                           0                                    1
                                                    R

                 This is called the image Histogram.


Imaging Science Fundamentals                   Chester F. Carlson Center for Imaging Science
         The Image Histogram Has Many Uses


                               Use #1:

        A way to describe Properties of an Image




Imaging Science Fundamentals             Chester F. Carlson Center for Imaging Science
     The Image Histogram Has Many Uses
  Use #1: A way to describe Image "Brightness"




             N                 N                  N



                      R               R                     R




     Average R = 0.2           Average R = 0.47    Average R = 0.78

Imaging Science Fundamentals                      Chester F. Carlson Center for Imaging Science
                               N



                                        R

                                   Range = 1
                                                  Same Average
                               N
                                                    R=0.47

                                       R

                                   Range = 0.7
                                                 Different Ranges
                               N



                                        R

                                   Range = 0.2

Imaging Science Fundamentals                        Chester F. Carlson Center for Imaging Science
           Vary Both Brightness AND Contrast
                               A graph of graphs!!



                                              N                 N                  N


Contrast                                  C
 Range                                    o          R                    R                   R

  of R                                    n
                                          t   N                 N                  N
                                          r
                                          a
                                                     R                    R                   R
                                          s
                                          t
                                              N                N                   N



                                                     R                   R                    R

               Brightness (Average R)                              Brightness



Imaging Science Fundamentals                             Chester F. Carlson Center for Imaging Science
                  A Summary of Brightness & Contrast

                      1. These are properties of the image.

                          2. The Histogram is a way of
                       quantifying Brightness and Contrast.


                                  Number
                                  of pixels
                                    at a
                                  given R




                                              0                                             1
                                                               R


Imaging Science Fundamentals                      Chester F. Carlson Center for Imaging Science
       The Image Histogram Has Many Uses

                               Use #2

            A way to describe Imaging Devices.




Imaging Science Fundamentals            Chester F. Carlson Center for Imaging Science
      The Image Histogram Has Many Uses
    Use #2: A way to describe Imaging Devices.



                               For example,
                                a camera
                 Original                     Photo-copy

             N                                N



                      R                                 R




     Average R = 0.2                           Average R = 0.78

Imaging Science Fundamentals                  Chester F. Carlson Center for Imaging Science
                      Imaging Devices
               Change Brightness and Contrast
                                                                             The image
         The image
                                                                              you want
          you have
                                                                              to make

                          Input                              Output
                                         An Imaging Device




     N
                                Camera, scanner, transmission line,            N

                               computer, display monitor, printer, etc.
               R
                                                                                          R
                        Anything in Group II of the Imaging Chain



Imaging Science Fundamentals                                     Chester F. Carlson Center for Imaging Science
            Example: Adobe Photoshop Program
                                                                             The image
            The image
                                                                              you want
             you have
                                                                              to make

                               Input                       Output
                                       An Imaging Device




        N
                                                                              N



                  R
                                                                                        R




Imaging Science Fundamentals                                Chester F. Carlson Center for Imaging Science
   Think of the imaging device as something that
               changes the histogram.




        N
                                       An Imaging Device                     N
                               Input                       Output
                  R
                                                                                       R

            The image
             you have                                                            The image
                                                                                  you want
                                                                                  to make




Imaging Science Fundamentals                               Chester F. Carlson Center for Imaging Science
                   The Imaging Device is described
                       by the way it transforms
                      gray levels in histograms.




        N
                                        An Imaging Device                     N
                               Input                        Output
                 Ro
                                                                                        Rc


              Original                                                          Copy
            gray levels,                                                     gray levels
                Ro                     Rc                                        Rc.



Imaging Science Fundamentals                    Ro          Chester F. Carlson Center for Imaging Science
               This graph is called the Tone Transfer Function (TTF).
                 The TTF is a characteristic of the Imaging Device.




                 Input                                                Output
                   Ro               An Imaging Device                  Rc




                               Rc

                                        Ro
        Different shape curves will produce output different histograms.


Imaging Science Fundamentals                            Chester F. Carlson Center for Imaging Science
                           How to measure a TTF




        N
                                        An Imaging Device                     N
                               Input                        Output
                 Ro
                                                                                        Rc


              Original                                                          Copy
            gray levels,                                                     gray levels
                Ro                     Rc                                        Rc.



Imaging Science Fundamentals                    Ro          Chester F. Carlson Center for Imaging Science
                             How to measure a TTF
                       Use an image with a very simple histogram.
                           A gray scale has the same number
                               of pixels at each gray level.




                        Ro             An Imaging Device            Ro
                               Input
     Original                                                                    Output

N                                                                        N



         Ro                                                                        Ro


                Compare the output values, Rc, versus the input values, Ro.

Imaging Science Fundamentals                               Chester F. Carlson Center for Imaging Science
                           How to measure a TTF
                   Pair up the input values, Rc, with the output values, Ro.



                               This Ro        becomes      this Rc

                               This Ro        becomes      this Rc

                               This Ro        becomes      this Rc


     Original                                                                        Output
                 Plot the output values, Rc, versus the input values, Ro.
                                                         The graph is the
                           Rc                           TTF of the device.


                                         Ro
Imaging Science Fundamentals                              Chester F. Carlson Center for Imaging Science
 Device Property #1: Location of the TTF Curve




                       1




             Rc      0.5




                       0
                                            1
                           0
Imaging Science Fundamentals   Ro   Chester F. Carlson Center for Imaging Science
           Property #1: Location of the TTF Curve

                       Device #1                     Device #2
                                      Device #1                     Device #3
                                      1


                         Device #2
                                     Rc

                                      0
                       Device #3       0                                    1
                                                        Ro




Imaging Science Fundamentals          Chester F. Carlson Center for Imaging Science
  Location: Controls the brightness of the copy image.

                       Device #1                                   Device #2
                                                    Device #1                     Device #3
                                                   1


                         Device #2
                                                 Rc

                                                   0
                       Device #3                    0                                     1
                                                                      Ro

      Device #1 is most sensitive to brightness. It makes the copy brighter.

       Device #3 is least sensitive to brightness. It makes the copy darker.

Imaging Science Fundamentals                        Chester F. Carlson Center for Imaging Science
         A Useful Metric of Device Sensitivity

                                    Device


               Locate the middle gray for the output copy: Rc = 0.5
                       1       Devices #1        #2   #3




             Rc      0.5




                       0
                                                               1
                           0
Imaging Science Fundamentals                Ro         Chester F. Carlson Center for Imaging Science
         A Useful Metric of Device Sensitivity

                                    Device


                 Next, locate the corresponding input values: Ros
                       1       Devices #1          #2          #3
                                                                                  Device         Ros

                                                                                     #1        0.30

             Rc      0.5                                                             #2        0.50

                                                                                     #3        0.68


                       0
                                                                        1
                           0      0.3        0.5        0.68
Imaging Science Fundamentals                Ro                  Chester F. Carlson Center for Imaging Science
         A Useful Metric of Device Sensitivity

                                          Device


                   It is useful to define an index of "sensitivity": S.                       1
           1                                                                      S=
                        Devices #1         #2          #3                                    2Ros

                        S1=1.67                                       Device         Ros         S
                                     S2=1.00
                                                   S3=0.74               #1        0.30        1.67
 Rc       0.5
                                                                         #2        0.50        1.00

                                                                         #3        0.68        0.74
           0
                                                             1
               0               0.3   0.5        0.68
Imaging Science Fundamentals         Ro                          Chester F. Carlson Center for Imaging Science
  Sensitivity           (location): Controls the brightness of the copy image.
                                                     1
                                                         Device #1
                      S1=1.67
                                                                       #2            #3
                       Device #1                  Rc

                               S2=1.00
                                                    0
                                                     0                                     1
                         Device #2                                    Ro
                                                       Device       Ros          S
                               S3=0.74
                                                         #1       0.30         1.67
                       Device #3
                                                         #2       0.50         1.00

                                                         #3       0.68         0.74
           S > 1 increases brightness.
           S = 1 gives the same brightness.
           S < 1 decreases brightness.
Imaging Science Fundamentals                        Chester F. Carlson Center for Imaging Science
     Device Property #2: Slope of the TTF Curve




                       1




             Rc      0.5




                       0
                                            1
                           0
Imaging Science Fundamentals   Ro   Chester F. Carlson Center for Imaging Science
              Property #2: Slope of the TTF Curve

                       Device #1
                                                                  Device #2
                                      1
                                            Device #1

                         Device #2
                                     Rc                        Device #3



                                      0
                       Device #3       0                                    1
                                                        Ro




Imaging Science Fundamentals          Chester F. Carlson Center for Imaging Science
               A Useful Metric of Device Slope

                                       Device


               Locate the middle gray for the output copy: Rc = 0.5
                       1       Devices TTF




             Rc      0.5




                       0
                                                              1
                           0
Imaging Science Fundamentals                 Ro       Chester F. Carlson Center for Imaging Science
               A Useful Metric of Device Slope

                                    Device


                     Next, Draw a straight line through the point
                      so that it matches the slope at that point.
                      1     Devices TTF




             Rc      0.5




                       0
                                                                1
                           0
Imaging Science Fundamentals             Ro             Chester F. Carlson Center for Imaging Science
               A Useful Metric of Device Slope

                                Device


      Locate the points where the straight line crosses Rc=0 and Rc=1.
       Find the corresponding values of Ro. Call these Ro0 and Ro1.
                  1     Devices TTF


                                                               Ro0 = 0.40 Ro1 = 0.60

             Rc      0.5                                                          1
                                                                Slope =
                                                                             Ro1 - Ro0

                                                                                  1
                                                                 Slope =
                                                                              0.6 - 0.4
                       0
                                                           1 Slope = 5.0
                           0    0.4        0.6
Imaging Science Fundamentals          Ro           Chester F. Carlson Center for Imaging Science
               A Useful Metric of Device Slope

                                        Device

                    Call this slope the "Contrast" of the device,
                     symbolized by Greek letter "gamma", g.                               1
                                                                        Slope =
                       1       Devices TTF
                                                                                     Ro1 - Ro0
                                                                               Slope = 5.0
                                        1
                               g=    Ro1 - Ro0                         Or,

            Rc       0.5            g = 5.0                                  g=
                                                                                           1
                                                                                      Ro1 - Ro0

                                                                                   g = 5.0
                       0
                                                                 1
                           0
Imaging Science Fundamentals                  Ro         Chester F. Carlson Center for Imaging Science
                                                                        Device #2
                                         1
                                                 Device #1


                       Device #1        Rc                           Device #3



                                         0
                                          0                                       1
                         Device #2                           Ro

                                                  Device        g
                       Device #3
                                                    #1       5.00

     g > 1 increases brightness.                    #2       1.00
     g = 1 gives the same brightness.               #3       0.20
     g < 1 decreases brightness.
Imaging Science Fundamentals                 Chester F. Carlson Center for Imaging Science
                   A Summary of the Device TTF

                                 Device




               S=1 and g = 1      Output copy = Input Copy

                          S>1     Output copy is brighter
                          S<1     Output copy is darker


                          g >1    Output copy has higher contrast
                          g <1    Output copy has less contrast




Imaging Science Fundamentals                     Chester F. Carlson Center for Imaging Science
                   A Summary of the Device TTF



                           S<1 g>1             S>1 g>1
                                     S=1 g>1


                                                   S>1 g=1
                          S<1 g=1




                                     S=1 g<1
                           S<1 g<1              S>1 g<1



Imaging Science Fundamentals                    Chester F. Carlson Center for Imaging Science
    A Summary of                                   Sensitivity & Gamma



                               S<1 g>1   S=1 g>1      S>1 g>1




                          S<1 g=1                     S>1 g=1



                                         S=1 g<1
                               S<1 g<1               S>1 g<1




Imaging Science Fundamentals                           Chester F. Carlson Center for Imaging Science
                               A Cautious Note:
                There are many ways to define indices of sensitivity and slope.
              There are many other names used instead of sensitivity and slope.

                          For example, Adobe Photoshop uses,
           Brightness -100% to 0 to +100% (instead of sensitivity < 1 to 1 to > 1)




Sensitivity

Gamma

                            For example, Adobe Photoshop uses,
               Contrast -100% to 0 to +100% (instead of gamma < 1 to 1 to > 1)

           In general, however, the TTF of most imaging devices are characterized
                    by some index of location (sensitivity, brightness, etc.)
                     and by some index of slope (gamma, contrast, etc.)
Imaging Science Fundamentals                             Chester F. Carlson Center for Imaging Science
                     Properties of the Image:

                     (I) The Histogram
                           A. Brightness (average R)
                           B. Contrast (Range of R)

                     (II) Others to be discussed later
                           (sharpness, granularity, etc.)

                     Note: Don't confuse the terms "brightness"
                     and "contrast" as used here for the terms
                     used by Adobe and others for location and
                     slope of the TTF. We are using the terms as
                     properties of the image, not properties of the
                     imaging device.



Imaging Science Fundamentals                                Chester F. Carlson Center for Imaging Science
       Properties of the Imaging Device:

       (I) The TTF (Transforms the histogram)
             A. Sensitivity
             B. Gamma
       (II) Others to be discussed later
             (sharpening/blurring, noise, etc.)
   Note: All imaging devices are described by the TTF.
   Most devices are given an index of location defined from the TTF.
   Most devices are given an index of slope defined from the TTF.

   However: Different organizations use different definitions for location and slope.
   They also use different names for the TTF, the location, and the slope.
   Also, terms like "sensitivity", "gamma", "brightness", and "contrast" are in
   common use, but there is no universal agreement about how these terms
   should be applied. Thus, all four are used by different groups to mean many
   different things, both as device properties and as image properties. Be cautious
   and ask for clarification if you are not sure what is meant.
Imaging Science Fundamentals                            Chester F. Carlson Center for Imaging Science

								
To top