image restoration & color fundamentals

Upload: sankalpkallakur402

Post on 30-May-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/9/2019 Image Restoration & Color Fundamentals

    1/25

    Image Restoration & Color Fundamentals

    Lecture 7

    Sankalp [email protected]

  • 8/9/2019 Image Restoration & Color Fundamentals

    2/25

    Constrained Least Squares Filtering

    Wiener filter needs knowledge of the noise PSD as wellas the PSD of the Undegraded Image.

    Estimates of the noise PSD arent always accurate.

    In the least squares filter only the noise characteristicsare needed and can be gathered from the degradedimage.

    The wiener filter is optimal in an average sense

    the least squares filter is optimal to each image it isapplied to.

  • 8/9/2019 Image Restoration & Color Fundamentals

    3/25

    Example of Restoration from MotionDeblurring & Additive Noise

    http://www.mathworks.com/products/image/demos.html?file=

    /products/demos/shipping/images/ipexwiener.html

  • 8/9/2019 Image Restoration & Color Fundamentals

    4/25

    Geometric Transformations

    They can be divided into twotypes

    1) spatial transformations

    2) grey level interpolations

    Spatial Transformations

    The geometric distortion in an image can be expressed as

    ),( yxrx

    ),( yxsy If the distortion functions are known analytical functions then theoriginal image can be reconstructed form the distorted image directly.

  • 8/9/2019 Image Restoration & Color Fundamentals

    5/25

    Spatial Transformations

    4321),( cxycycxcyxr

    The distortion functions may not be known and in that case thedistortion functions are obtained by using Tie Points

    The locations of the Tie Pointsis exactly known in the original and thedistorted images.

    8765),( cxycycxcyxs

    The value of the image over a scan is picked by passing the indices

    throught the distortion function and picking the value at the output image.

  • 8/9/2019 Image Restoration & Color Fundamentals

    6/25

    Grey Level Interpolation

    The spatial transformation may lead to non integer values forthe location hence there may be need to interpolate the valuefrom the closest integer locations.

    Nearest Neighbor, Cubic and Bilinear Interpolation are among

    the commonly used interpolations.

    Nearest Neighbor Interpolation

  • 8/9/2019 Image Restoration & Color Fundamentals

    7/25

    Color Image Processing

    Two types: Full Color andPseudo Color Processing.

    Full Color is where the color isobtained from the scanner or

    camera.

    Pseudo Color is when thecolor is to be allotted to acertain gray scale image.

    Certain gray scale methodsare directly applicable to thecolor images whereas someneed modifications.

    Visible Spectrum

    violet 380450 nm

    blue 450495 nm

    green 495570 nm

    yellow 570590 nm

    orange 590620 nm

    red 620750 nm

  • 8/9/2019 Image Restoration & Color Fundamentals

    8/25

    Color Basics

    Green objects mostly reflect radiation in the green regionof the spectrum.

    Intensity maps to gray levels

    Radiance is the total amount of energy that flows fromthe light source. Measured in watts (W).

    Luminance is the perceived brightness measured in

    lumens (lm).

    Color perception in the human eye is carried out bycones. 65% are sensitive to red 33% are sensitive togreen and 2% are sensitive to blue.

  • 8/9/2019 Image Restoration & Color Fundamentals

    9/25

    Primary and Secondary colors

    Red Green Blue primary colors

    [Red+Blue] magenta

    [Blue+Green] cyan secondary colors

    [Red+Green] yellow

    Additive Mixing Subtractive Mixing

    light pigments

    magenta

    cyanyellow

    red blue

  • 8/9/2019 Image Restoration & Color Fundamentals

    10/25

    Color Basics

    ZYX

    X

    x

    ZYX

    Yy

    Brightness, hue and saturation are characteristics used todistinguish Colors.

    Hue is an attribute that maps to the wavelength red orange yelloware hues.

    Saturation is the amount of white light mixed with the hue.

    Pure colors like red are fully saturated pink is not saturated

    Tristimulus values

    ZYX

    Zz

  • 8/9/2019 Image Restoration & Color Fundamentals

    11/25

    Chromaticity Diagram

    Point of equal energy is white.

    The colors along the boundary are theSaturated colors

    A straight line joining two points on thisdiagram can show all possible shadesobtainable by mixing different proportionsof those two colors.

    A line from the point of equal energy to

    the boundary will show all shades ofthat hue.

    A triangle with 3 fixed vertices cantEnclose the tongue shape hence 3 primaryColors arent sufficient to reproduce all colors.

  • 8/9/2019 Image Restoration & Color Fundamentals

    12/25

    Color Models

    Color Models are spatial representations of the colorpalettes, any point in the space would be representing acolor.

    RGB is the most popular for cameras and monitors.

    CMY and CMYK for color printing.

    HSI is close to the way humans perceive color anddecouples the color and grey scale information in animage allowing application of the grey scale processingtechniques.

  • 8/9/2019 Image Restoration & Color Fundamentals

    13/25

    RGB Color Model

    The RGB color model is based on a cartesian coordinatesystem.

    www.mathworks.com image processing toolbox

    8 bits per color plane3 color planesResults in 16,777,216 colors

    Most displays may not have theability to display all such colors

    Hence a subset called Safe RGBhas been developed.

  • 8/9/2019 Image Restoration & Color Fundamentals

    14/25

    Web Safe RGB Color Model

    6 shades of each color

    digit hexadecimal decimal

    0 00 0

    3 33 51

    6 66 1029 99 153

    C or (12) CC 204

    F or (15) FF 255

    These numbers are used todefine all the web safe colors

    Each triplet is made up of 24 bits

    Each color plane 8 bits.8 bits consist of 2 hex numbers.

    The 6 numbers yield (6)3 = 216colors

    For Example pure bright redwould be FF0000

    RGB safe color cube

  • 8/9/2019 Image Restoration & Color Fundamentals

    15/25

    Web Safe RGB Color Model

    Web-Safe Colors

    *000* 300 600 900 C00 *F00* *003* 303 603 903 C03 *F03*

    006 306 606 906 C06 F06 009 309 609 909 C09 F09

    00C 30C 60C 90C C0C F0C *00F* 30F 60F 90F C0F *F0F*

    030 330 630 930 C30 F30 033 333 633 933 C33 F33

    036 336 636 936 C36 F36 039 339 639 939 C39 F39

    03C 33C 63C 93C C3C F3C 03F 33F 63F 93F C3F F3F

    060 360 660 960 C60 F60 063 363 663 963 C63 F63

    066 366 666 966 C66 F66 069 369 669 969 C69 F69

    06C 36C 66C 96C C6C F6C 06F 36F 66F 96F C6F F6F

    090 390 690 990 C90 F90 093 393 693 993 C93 F93

    096 396 696 996 C96 F96 099 399 699 999 C99 F99

    09C 39C 69C 99C C9C F9C 09F 39F 69F 99F C9F F9F

    0C0 3C0 6C0 9C0 CC0 FC0 0C3 3C3 6C3 9C3 CC3 FC3

    0C6 3C6 6C6 9C6 CC6 FC6 0C9 3C9 6C9 9C9 CC9 FC9

    0CC 3CC 6CC 9CC CCC FCC 0CF 3CF 6CF 9CF CCF FCF

    *0F0* 3F0 *6F0* 9F0 CF0 *FF0* 0F3 *3F3* *6F3* 9F3 CF3 *FF3*

    *0F6* *3F6* 6F6 9F6 *CF6* *FF6* 0F9 3F9 6F9 9F9 CF9 FF9

    *0FC* *3FC* 6FC 9FC CFC FFC *0FF* *3FF* *6FF* 9FF CFF *FFF*

  • 8/9/2019 Image Restoration & Color Fundamentals

    16/25

    CMY and CMYK model

    The color printers use a model which is subtractive. i.e

    a Cyan pigment will not reflect any Red light whenilluminated by white light.

    B

    G

    R

    Y

    M

    C

    1

    1

    1

    The printing devices internally do a RGB to CMY conversion .

    The black obtained by mixing all the CMY components looks

    muddy hence an additional black component is added tomake the CMYK model.

  • 8/9/2019 Image Restoration & Color Fundamentals

    17/25

    HSI Color Map

    The human color perception is closer to the HSI model.

    We describe objects as light or dark and having a certaincolor.

    RGB color model

    black

    blue red

    cyan yellow

    white

    Intensity [gray scale] is along the line from blackto white saturation is perpendicular distance from

    this intensity axis

  • 8/9/2019 Image Restoration & Color Fundamentals

    18/25

    HSI Color Model

    Usually Red is considered zero degrees

  • 8/9/2019 Image Restoration & Color Fundamentals

    19/25

    Pseudocolor Image Processing

    Pseudocolor Image Processing is used to assign colors to grey

    scale images.

    The reason is that an instant the human eye can discern

    thousands of colors and intensities but only a few grey levels.

    Intensity Slicing

    The grey level images are

    quantized into several levels

    where each level is mappedto a particular color.

  • 8/9/2019 Image Restoration & Color Fundamentals

    20/25

    Grey Level to Color Transformations

    Red Transformation

    Green Transformation

    Blue Transformation

    fr(x,y)

    fg(xy)

    fb(x,y)

    Transformation T1

    Transformation T2

    Transformation T3

    g1(x,y)

    g2(xy)

    gk(x,y)

    f1(x,y)

    f2(x,y)

    fk(x,y)

    AdditionalProcessing

    hr(xy)

    hb(xy)

    hg(xy)

  • 8/9/2019 Image Restoration & Color Fundamentals

    21/25

    Color Image Processing

    Histograms [some may be only on the Icomponent of HSI]

    Smoothing/Sharpening

    Complements and Slicing

    Segmentation

    Compression

  • 8/9/2019 Image Restoration & Color Fundamentals

    22/25

    Tone and Color Corrections

    The different print media as well as monitors of different typesshould be able to correctly display color gamut.

    A device independent color model is used.

    The most common being CIELAB

    The L* a* b* color components are given by

    16116

    wY

    YhL

    ww Y

    Yh

    X

    Xha 500

    ww Z

    Zh

    Y

    Yhb 200

    )(qh3 q

    116/16787.7 q

    008856.0q

    008856.0q{

  • 8/9/2019 Image Restoration & Color Fundamentals

    23/25

    Tone and Color Corrections

    Xw, Yw and Zw are the white tristimulus valueswhich match with the white of the CIEchromaticity diagram.

    L* a* b* colorimetric, perceptually uniform anddevice independent.

    It is not a directly displayable format.

    Decouples intensity from color useful in imagemanipulation and compression.

  • 8/9/2019 Image Restoration & Color Fundamentals

    24/25

    Tone and Color Corrections

    Saturation is corrected after correcting the tonalrange.

    Tonal range is also called the images key type.Which could be high low or medium.

    The transformations can be carried out

    individually in any of the color planes.

    The transformations are similar to the grey levelpiecewise linear and power law transformations

  • 8/9/2019 Image Restoration & Color Fundamentals

    25/25

    Mid Terms next week

    Bring Calculators

    Pencils eraser scale

    Closed book exam