Pixel RelationsNeighboring, AdjacencyPath, Connectivity, RegionDistance Metrics© 2002 by Yu Hen Hu1ECE533 Digital Image ProcessingPixel Relations© 2002 by Yu Hen Hu2ECE533 Digital Image ProcessingNeighboring, AdjacencyN4(p): 4-neighborsND(p): 4-diagonal neighborsN8(p) = N4(p) ND(p) : 8-neighbors Adjacency:»V: a set of gray levels s.t. if a pixel’s gray level in V, it will be used to establish adjacency.»4-adjacency»8-adjacency»m-adjacencyppq sprq spr© 2002 by Yu Hen Hu3ECE533 Digital Image ProcessingPath, Connectivity, RegionPath: »a path from p = (s,t) to q = (x,y) is a set adjacent points P(p,q) = {(s,t), …, (xi, yi), …, (x, y)}»If (s, t) = (x, y), P is a closed path. p and q are connected in S if P(p,q) S. The set {q; P(p,q) S} is a Connected Component of p S.S is a connected set if it has only one connected component. S is also called a Region. The boundary of a region R = {p; p R, exists q R, q N(p)}If R is entire image, its boundary is the first and last rows and columns of pixels.© 2002 by Yu Hen Hu4ECE533 Digital Image ProcessingDistance MetricsNormed distanceGiven pixels p, q, r, a function D(p,q) is a distance function ifEuclidean distance»L2 normCity-block distance»L1 normChessboard distance»L norm( , ) 0( , ) 0( , ) ( , )( , ) ( , ) ( , )a) and iff b) c) D p qD p q p qD p q D q pD p r D p q D q r�= ==� +( ) ( )2 2( , )eD p q x s y t= - + -4( , ) | | | |D p q x s y t= - + -( )8( , ) max | |,| |D p q x s y t= -
View Full Document