+ All Categories
Home > Documents > ip_lecture02-funda

ip_lecture02-funda

Date post: 07-Apr-2018
Category:
Upload: shivani-singh
View: 217 times
Download: 0 times
Share this document with a friend

of 26

Transcript
  • 8/4/2019 ip_lecture02-funda

    1/26

    Digital Image Processingigital Image Processing(UST 2007 FallUST 2007 Fall)

    Sang Chul Ahn

    [email protected]

    Digital Image FundamentalsDigital Image Fundamentals

  • 8/4/2019 ip_lecture02-funda

    2/26

    Elements of Visual PerceptionElements of Visual Perception

    Although the digital image processing field is built on afoundation of mathematical and probabilistic formulations,

    human intuition and analysis play a central role in the choice oftechniques

    Basic understanding of human visual perception is important

    The mechanics and parameters related to how images areformed in the eye

    The physical limitations of human vision in terms of factors thatalso are used in digital image processing

    The factors how human and electronic imaging compare in

    terms of resolution and ability to adapt to changes in illumination

    Nearly a sphere with

    an average diameter

    of 2cm

    3 membranes enclosethe eye

    Cornea() &

    Sclera()

    Choroid()

    ciliary body, iris

    diaphragm

    Retina ()

    Structure of the Human EyeStructure of the Human Eye

  • 8/4/2019 ip_lecture02-funda

    3/26

    Structure of the Human EyeStructure of the Human Eye

    Cornea: transparent

    sclera: opaque

    Choroid

    contains blood vessels

    heavily pigmented and reduce the

    amount of light entering the eye and

    backscatter within the eye

    At anterior, Ciliary body & iris diaphragm

    Iris: control the amount of light, 2~8mm

    Lens:

    60~70% water, 6% fat, and protein,

    slightly yellow,

    absorbs approximately 8% of the visible light spectrum

    Retina Image is focused on retina

    Two classes of receptors: cones and rods

    Cones

    6~7million

    Located primarily in the fovea

    Color sense

    One nerve for one cone: resolve fine detail

    Cone vision called photopic or bright-light vision

    Rods

    75~105million

    Distributed over the retinal surface

    One nerve for several rods

    Sensitive to low levels of illumination

    Rod vision called scotopic or dim-light vision

    Structure of the Human EyeStructure of the Human Eye

  • 8/4/2019 ip_lecture02-funda

    4/26

    Structure of the Human EyeStructure of the Human Eye

    Blind spot

    Receptor distribution

    Fovea Circular indentation of about 1.5mm in diameter

    Density of cones is approximately 150,000 cones/mm2

    1.5mm x 1.5mm square 337,000 cones

    Image FormationImage Formation

    The shape of lens is controlled by tension of theciliary body

    Lens flattened for distant objects

    The distance between the center of the lens and theretina(focal length) varies 17mm~14mm

  • 8/4/2019 ip_lecture02-funda

    5/26

    Bright AdaptationBright Adaptation

    Bright adaptation range is on the order of 1010

    Subjective brightness is a logarithmic function of the light intensity

    The range of photopic vision is about 106

    The visual system cannot operate over the range simultaneously

    It is done by changes in its overall sensitivity

    Bright adaptation

    DiscriminationDiscrimination

    Weber ratio Ic/I, where Ic is the increment of illumination discriminable 50%

    of the time

    Small value represents good brightness discrimination

    poor by rods

    good by cones

  • 8/4/2019 ip_lecture02-funda

    6/26

    DiscriminationDiscrimination

    Perceived brightness is not a simple function of intensity

    The visual system tends to undershoot or overshoot around theboundary of regions of different intensities

    Mach bands

    Although the intensity of the

    stripes is constant, we actually

    perceive a brightness pattern

    that is strongly scalloped

    DiscriminationDiscrimination

    A regions perceived brightness does not depend simply on itsintensity

    simultaneous constrast

    All the center squares have exactly the same intensity. However,

    they appear to the eye to become darker as the background getslighter

  • 8/4/2019 ip_lecture02-funda

    7/26

    Optical illusionOptical illusion

    The eye fills in nonexisting information or wronglyperceives geometrical properties of objects

    Electromagnetic SpectrumElectromagnetic Spectrum

    In 1666, Sir Isaac Newton discovered that when a beam of sunlight ispassed through a glass prism, the emerging beam of light is not whitebut consists instead of a continuous spectrum of colors ranging fromviolet to red

  • 8/4/2019 ip_lecture02-funda

    8/26

    Physics of Light and EM SpectrumPhysics of Light and EM Spectrum

    Frequency( orf ) vs. wavelength()

    f= c/ c: 2.998x108

    m/s (the speed of light)Energy (unit: electron-volt)

    E = h h: Plancks constant

    Energy is proportional to frequency

    Higher-frequency electromagnetic phenomena carry

    more energy per photon

    Gamma rays are dangerous to living organisms

    Physics of Light and EM SpectrumPhysics of Light and EM Spectrum

    Light that is void of color is called achromatic or monochromaticlight

    The only attribute of such light is its intensity, or amount

    Chromatic light spans the electomagnetic energy spectrum from

    approximately 0.43 to 0.79um Three basic quantities are used to describe the quality of a

    chromatic light source: radiance, luminance, and brightness

    Radiance(unit: W) is the total amount of energy that flows from thelight source

    Luminance(unit: lm, lumens) gives a measure of the amount ofenergy an observer perceives from a light source

    ex) Light emitted from a source operating in the far infrared region of thespectrum could have high radiance, but an observer would hardly

    perceive it(zero luminance) Brightness is a subjective descriptor of light perception that is

    practically impossible to measure. It embodies the achromaticnotion of intensity

  • 8/4/2019 ip_lecture02-funda

    9/26

    Physics of Light and EM SpectrumPhysics of Light and EM Spectrum

    Near-infrared: the part of the infrared band close to thevisible spectrum

    Far-infrared: the part of the infrared band close to themicrowave band

    It is important to note that the wavelength of anelectromagnetic wave required to see an object mustbe of the same size as or smaller than the object.

    For example, a water molecule has a diameter on theorder of10-10m. Thus, to study molecules, we wouldneed a source capable of emitting in the far ultravioletor soft X-ray region

    Image SensorsImage Sensors

  • 8/4/2019 ip_lecture02-funda

    10/26

    Image SensingImage Sensing

    CCD vs. CMOSCCD vs. CMOS

    A CCD is like a threedecker sandwich. The bottom layer

    contains the photosites. Above them is a layer of colored

    filters that determines which color each site records. Finally,

    the top layer contains microlenses that gather light.Courtesy

    of Fujifilm.

    CCD (charge-coupled device) and CMOS (complimentary metal-oxide

    semiconductor)

  • 8/4/2019 ip_lecture02-funda

    11/26

    CCD vs. CMOSCCD vs. CMOS

    In a CCD device, the charge is actually transported across the chip

    and read at one corner of the array. An analog-to-digital converter

    turns each pixel's value into a digital value. In most CMOS devices, there are several transistors at each pixel that

    amplify and move the charge using more traditional wires. The CMOS

    approach is more flexible because each pixel can be read individually.

    CCDs use a special manufacturing process to create the ability to

    transport charge across the chip without distortion. This process leads

    to very high-quality sensors in terms of fidelity and light sensitivity.

    CMOS chips, on the other hand, use traditional manufacturing

    processes to create the chip. CMOS sensors, traditionally, are more

    susceptible to noise. Because each pixel on a CMOS sensor has several transistors located

    next to it, the light sensitivity of a CMOS chip tends to be lower. Many

    of the photons hitting the chip hit the transistors instead of the

    photodiode.

    CCD vs. CMOSCCD vs. CMOS

    http://www.pictureline.com/newsletter/2004/september/pixels.html

    http://www.axis.com/edu/axis/index.htm

  • 8/4/2019 ip_lecture02-funda

    12/26

    Simple Image ModelSimple Image Model

    Monochrome(Gray) Image : f(x,y)f(x,y) = intensity value at coordinates (x,y)

    0 < f(x,y) < ; f(x,y) is energy

    Light TransportLight Transport

    Simple image formationf(x,y) = i(x,y)r(x,y)

    0 < i(x,y) < ; illumination

    0 < r(x,y) < 1 ; reflectance

    In real situationLmin l (=f(x,y)) Lmax

  • 8/4/2019 ip_lecture02-funda

    13/26

    Sampling & QuantizationSampling & Quantization

    Image sampling Digitization of spatial coordinates (x,y)

    Quantization Amplitude digitization

    The quality of a digital image is determined to a largedegree by the number of samples and discrete graylevels used in sampling and quantization

    f(x,y) f(0,0) f(1,0) f(M-1,0)

    f(0,1) f(1,1) f(M-1,1)

    :f(0,N-1) f(1,N-1) f(M-1,N-1)

    Digital image

    Continuousimage

    Sampling & QuantizationSampling & Quantization

  • 8/4/2019 ip_lecture02-funda

    14/26

    Sampling & QuantizationSampling & Quantization

    What isWhat is Digital Image?Digital Image?

    x

    y

    Origin

    (0,0)

    Pixel

    Digital image : x,y,f(x,y), three values are all

    discretized

    Pixel : Image elements, Picture elements, Pels

  • 8/4/2019 ip_lecture02-funda

    15/26

    What isWhat is Digital Image?Digital Image?

    Digital Color Image R(x,y), G(x,y), B(x,y), three values are assigned at

    the same pixel location

    HSI, YIQ, CMY representation

    We can use more than 3 values for a pixel such asCMYK representation

    Comparison f(x,y) : 2D still image

    f(x,y,z) : 3D object

    f(x,y,t) : Video or Image Sequence

    f(x,y,z,t) : moving 3D object

    What isWhat is Digital Image?Digital Image?

    Meaningbrightness(luminance) or color of an object

    TV camera, scanner

    absorption characteristics of objects(especially bodies) X-ray imaging, Ultrasonic imaging, CT

    distance between objects and measuringinstrument sonar imaging, radar imaging, range camera

    temperature of an object IR(infrared) camera

  • 8/4/2019 ip_lecture02-funda

    16/26

    What isWhat is Digital Image?Digital Image?

    Spatial Resolution (x,y)

    Spatial resolution is the smallest discernible detail in an image

    A line pair : a line and its adjacent space

    A widely used definition of resolution is the smallest number of

    discernible line pairs per unit distance

    ex) 100 line pairs/mm

    But, unit distance or unit area is omitted in most cases

    Spatial ResolutionSpatial Resolution

  • 8/4/2019 ip_lecture02-funda

    17/26

    cf) Full HD

    Screen resolution [wikipedia]

    Spatial ResolutionSpatial Resolution

    What isWhat is Digital Image?Digital Image?

    Gray-level Resolution

    Gray-level resolution is the smallest discernible change in

    gray level (but, highly subjective!)

    Due to hardware considerations, we only considerquantization level

    Usually an integer power of 2. The most common level is

    28=256

    However, we can find some systems that can digitize the

    gray levels of an image with 10 to 12 bits of accuracy.

  • 8/4/2019 ip_lecture02-funda

    18/26

    GrayGray--level Resolutionlevel Resolution

    Image displayed in 256, 128, 64, 32, 16, 8, 4, 2 gray-levels

    StorageStorage

    ForMxNimage with L(=2k) discrete gray level

    The number, b, of bits required to store the image is

    b = MNk

    ex1) 1024x1024x8bit = 1Mbytes

  • 8/4/2019 ip_lecture02-funda

    19/26

    IsopreferenceIsopreference curvescurves

    Relation between subjective image quality andresolution

    Tested by images with low/medium/high detail

    Result

    A few gray levels may be needed for high

    detailed image

    Perceived quality in the other two image

    categories remained the same in some intervals

    in which the spatial resolution was increased,

    but the number of gray levels actually decreased

    AliasingAliasing

    Shannon sampling theorem

    if the function is sampled at a rate equal to or greater than twice its

    highest frequency, it is possible to recover completely the original

    function from its samples

    if the function is undersampled, then a phenomenon called aliasingcorrupts the sampled image

    The corruption is in the form of additional frequency components being

    introduced into the sampled function. These are called aliased

    frequencies

    Nyquist freq. = 0.5 x sampling rate

  • 8/4/2019 ip_lecture02-funda

    20/26

    AliasingAliasing

    Except for a special case, it is impossible to satisfy the sampling

    theorem in practice

    The principal approach for reducing the aliasing effects on an image

    is to reduce its high-frequency components by blurring the image

    prior to sampling

    However, aliasing is always present in a sampled image

    The effect of aliased frequencies can be seen under the right

    conditions in the form of so-called Moir patterns

    Aliasing in ImagesAliasing in Images When we view a digital photograph, the reconstruction (interpolation)

    is performed by a display or printer device, and by our eyes and our

    brain.

    Typical aliasing in images can be seen in the form ofJaggies

    The checkers should become smaller as the distance from theviewer increases. However, the checkers become larger or

    irregularly shapedwhen their distance from the viewer becomes too

    great

    Anti-aliasing is the technique of minimizing the distortion artifacts

    known as aliasing when representing a high-resolution signal at a

    lower resolution

    (a)Aliased (b),(c)Anti-aliasing is applied

  • 8/4/2019 ip_lecture02-funda

    21/26

    N4(p) : 4-neighbors of pixelp(y,x)

    { p(y+1,x), p(y-1,x), p(y,x+1), p(y,x-1)}

    ND(p) : diagonal neighbors of pixelp(y,x){ p(y+1,x+1), p(y-1,x-1), p(y-1,x+1), p(y+1,x-1)}

    N8(p) : 8-neighbors of pixelp(y,x)

    N8(p) = N4(p) ND(p)

    Some of the neighbors of pixel p lie outside the digital image ifthe pixel p is on the border of the image

    p(x,y

    )

    N4

    ND

    N8

    Neighbors of a PixelNeighbors of a Pixel

    V : set of gray-level values to define adjacency

    ex) V={1} ; binary image

    V={32,33,,63,64} ; gray image

    4-adjacency: Two pixels p, q with values from V are 4-adjacency if q is in the set N4(p)

    8-adjacency: Two pixels p, q with values from V are 8-adjacency if q is in the set N8(p)

    m-adjacency(mixed adjacency) : Two pixels p and q withvalues from V are m-adjacency if

    i) q is in N4(p), or

    ii) q is in ND(p) and the set N4(p) N4(q) has no pixels whose

    values are from V

    AdjacencyAdjacency

  • 8/4/2019 ip_lecture02-funda

    22/26

    m- adjacency

    AdjacencyAdjacency

    8-adjacency

    PathPath

    A (digital)path(or curve) from pixelp at (x,y) to pixel

    q at (s,t) is a sequence of distinct pixels with

    coordinates

    (x0,y0), (x1,y1), ,, (xn,yn)where (x0,y0) =(x,y), (xn,yn)=(s,t), and pixel (xi,yi) and

    (xi-1,yi-1) are adjacent for1in

    n is the length of the path

    If(x0,y0) =(xn,yn), the path is a closedpath

    The path can be defined 4-,8-,m-paths depending on

    adjacency type

  • 8/4/2019 ip_lecture02-funda

    23/26

    ConnectivityConnectivity

    Let Sbe a subset of pixels in an image. Two pixelspand q are said to be connectedin Sif there exists a

    path between them consisting entirely of pixels in S For any pixelp in S, the set of pixels that are

    connected to it in Sis called a connected componentofS.

    If it only has one connected component, then set Siscalled a connected set.

    Let Rbe a subset of pixels in an image. We call Raregion of the image ifRis a connected set

    The boundaryof a region Ris the set of pixels in theregion that have one or more neighbors that are notin R

    Distance MeasuresDistance Measures

    Let pixels be

    p=p(x,y), q=q(s,t), z=z(u,v)

    D() is a distance function ormetricif(a) D(p,q) 0 (D(p,q)=0 iff p=q)

    (b) D(p,q) = D(q,p)

    (c) D(p,z) D(p,q) + D(q,z)

  • 8/4/2019 ip_lecture02-funda

    24/26

    Distance MeasuresDistance Measures

    Euclidean distanceDe(p,q) = [(x-s)

    2+ (y-t)2]1/2

    D4 distance (city-block distance)D4(p,q) = |x-s| + |y-t|

    2

    2 1 2

    2 1 0 1 22 1 2

    2

    Distance MeasuresDistance Measures

    D8distance (chessboard distance)D8(p,q) = max(|x-s|, |y-t|)

    2 2 2 2 2

    2 1 1 1 2

    2 1 0 1 2

    2 1 1 1 2

    2 2 2 2 2

  • 8/4/2019 ip_lecture02-funda

    25/26

    Arithmetic/Logic OperationsArithmetic/Logic Operations

    Arithmetic operation

    Addition: p+qSubtraction: p-q

    Multiplication: pxq

    Division: p q

    Logic Operation

    AND: p AND q (p. q)

    OR: p OR q (p + q)COMPLEMENT: NOT q ( q )

    Logic OperationsLogic Operations

    A B

    NOT(A) A AND B A OR B

    A - B

    A XOR B

  • 8/4/2019 ip_lecture02-funda

    26/26

    2D Image transformation

    Translation

    Scaling

    Rotation

    Order of application is important !!

    x

    y

    x

    y

    tx

    ty= +

    x

    y

    Sx 0

    0 Sy=

    x

    y

    x

    y

    cos sin

    -sin cos

    =x

    y

    Original

    Scaling(Sx=2, Sy=2)

    2D Image transformation

    30deg. rotation

    y axis translation +100

    Origin


Recommended