neighbouhood cells

Upload: arun-kumar

Post on 07-Apr-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/6/2019 Neighbouhood cells

    1/22

    Basic Relationships Between

    Pixels

    Neighborhood

    Adjacency Connectivity

    Paths Regions and boundaries

  • 8/6/2019 Neighbouhood cells

    2/22

  • 8/6/2019 Neighbouhood cells

    3/22

    The four diagonal neighbors of p(x,y) are

    given by,(x+1, y+1), (x+1, y-1), (x-1, y+1), (x-1 ,y-1)

    This set is denoted by ND(P).

    Each of them are at Euclidean distance of

    1.414 from P.

    Neighbors of a Pixel (Contd..)

  • 8/6/2019 Neighbouhood cells

    4/22

  • 8/6/2019 Neighbouhood cells

    5/22

    Neighbors of a pixel

    a. 4-neighbors of a pixel pare its vertical and

    horizontal neighbors

    denoted by N4(p)b. 8-neighbors of a pixel p

    are its vertical

    horizontal and 4diagonal neighbors

    denoted by N8(p)

    pN4(p)

    p

    N8(p)

    Neighbors of a Pixel (Contd..)

  • 8/6/2019 Neighbouhood cells

    6/22

    Neighbors of a Pixel (Contd..)

    ND N4 ND

    N4 P N4

    ND N4 ND

    N4 - 4-neighborsND - diagonal neighbors

    N8 - 8-neighbors (N4 U ND)

  • 8/6/2019 Neighbouhood cells

    7/22

    Adjacency

    Two pixels are connected if they are

    neighbors and their gray levels satisfysome specified criterion of similarity.

    For example, in a binary image two pixels

    are connected if they are 4-neighbors and

    have same value (0/1).

  • 8/6/2019 Neighbouhood cells

    8/22

  • 8/6/2019 Neighbouhood cells

    9/22

    Connectivity :

    To determine whether the pixelsare adjacent in some sense.

    Let V be the set of gray-levelvalues used to define connectivity;

    then Two pixels p, q that have values

    from the set V are:

    a. 4-connected, if q is in the set N4(p)

    b. 8-connected, if q is in the set N8(p)

    c. m-connected, iff

    i. q is in N4(p) or

    ii. q is in ND(p) and the set

    is empty

    0 1 1

    0 2 0

    0 0 1

    0 1 1

    0 2 0

    0 0 1

    a.

    b.

    c.

    V = {1, 2}

    )()(44

    qNpN I

    0 1 1

    0 2 0

    0 0 1

  • 8/6/2019 Neighbouhood cells

    10/22

    Adjacency/Connectivity

    0 1 1

    0 1 0

    0 0 1

    8-adjacent

    m-adjacent

  • 8/6/2019 Neighbouhood cells

    11/22

    Pixel p is adjacentto pixel q if they are connected.

    Two image subsets S1 and S2 are adjacent if somepixel in S1 is adjacent to some pixel in S2

    Adjacency/Connectivity

    S1

    S2

  • 8/6/2019 Neighbouhood cells

    12/22

    Paths & Path lengths

    Apath from pixel p with coordinates(x, y) to pixel q with coordinates (s, t)

    is a sequence of distinct pixels withcoordinates:

    (x0, y0), (x1, y1), (x2, y2) (xn, yn),

    where (x0, y0)=(x, y) and (xn, yn)=(s, t);(xi, yi) is adjacent to (xi-1, yi-1)

    Here n is the length of the path.

    We can define 4-, 8-, and m-paths basedon type of adjacency used.

    ni 1

  • 8/6/2019 Neighbouhood cells

    13/22

    Connected Components

    Ifp and q are pixels of an image subset S

    thenp isconnectedto q in S if there is a

    path fromp to q consisting entirely of

    pixels in S.

    For every pixelp in S, the set of pixels inS that are connected top is called a

    connected component of S. If S has only one connected component

    then S is called Connected Set.

  • 8/6/2019 Neighbouhood cells

    14/22

    Regions and Boundaries

    A subset R of pixels in an image is

    called aRegion of the image if R is aconnected set.

    The boundary of the region R is theset of pixels in the region that haveone or more neighbors that are notin R.

    If R happens to be entire Image?

  • 8/6/2019 Neighbouhood cells

    15/22

    Distance measures

    Given pixelsp, q and zwith coordinates

    (x, y), (s, t), (u, v) respectively, the distancefunction D has following properties:

    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/6/2019 Neighbouhood cells

    16/22

    The follow ing are the different

    Distance measures:

    Euclidean Distance :

    De( p , q ) = [ ( x - s)2

    + ( y - t )2

    ]

    b. City Block Distance: D4( p , q ) = | x -s| + | y - t |

    c. Chess Board Distance: D8( p , q ) = m ax ( | x -s| , | y - t | )

    22222

    21112

    21012

    21112

    22222

    2

    212

    21012212

    2

  • 8/6/2019 Neighbouhood cells

    17/22

    Relationship between pixels (Contd..)

    Arithmetic/Logic Operations:- Addition : p + q

    Subtraction: p q

    Multiplication: p * q

    Division: p / q

    AND: p AND q

    OR : p OR q

    Complement: NOT(q)

  • 8/6/2019 Neighbouhood cells

    18/22

  • 8/6/2019 Neighbouhood cells

    19/22

    Arithmetic/Logic Operations

    Tasks done using neighborhoodprocessing:

    Smoothing / averaging

    Noise removal / filtering

    Edge detection

    Contrast enhancement

  • 8/6/2019 Neighbouhood cells

    20/22

  • 8/6/2019 Neighbouhood cells

    21/22

    END o f Ne ighb or ho od

    and Con nect i v i t y

  • 8/6/2019 Neighbouhood cells

    22/22