Some Basic Relationships Between Pixels

Slides:



Advertisements
Similar presentations
Goal: a graph representation of the topology of a gray scale image. The graph represents the hierarchy of the lower and upper level sets of the gray level.
Advertisements

Image Processing Ch2: Digital image Fundamentals Part 2 Prepared by: Tahani Khatib.
電腦視覺 Computer and Robot Vision I
Digital Image Processing
Digital Image Processing Lecture 12: Image Topology
Each pixel is 0 or 1, background or foreground Image processing to
September 10, 2013Computer Vision Lecture 3: Binary Image Processing 1Thresholding Here, the right image is created from the left image by thresholding,
6/9/2015Digital Image Processing1. 2 Example Histogram.
Chapter 10 Image Segmentation.
Region Segmentation. Find sets of pixels, such that All pixels in region i satisfy some constraint of similarity.
Digital Image Processing Chapter 2: Digital Image Fundamentals.
Chapter 10 Image Segmentation.
Digital Image Fundamentals
Digital Image Processing
Digital Image Processing Lecture 2
Edge Linking & Boundary Detection
Digital Image Fundamentals II 1.Image modeling and representations 2.Pixels and Pixel relations 3.Arithmetic operations of images 4.Image geometry operation.
September 23, 2014Computer Vision Lecture 5: Binary Image Processing 1 Binary Images Binary images are grayscale images with only two possible levels of.
Chapter Two Digital Image Fundamentals. Agenda: –Light and Electromagnetic Spectrum –Image Sensing & Acquisition –Image Sampling & quantization –Relationship.
Digital Image Processing CCS331 Relationships of Pixel 1.
Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.
Chapter 10 Image Segmentation.
Introduction Image geometry studies rotation, translation, scaling, distortion, etc. Image topology studies, e.g., (i) the number of occurrences.
Digital Image Fundamentals Faculty of Science Silpakorn University.
Digital Image Processing (DIP) Lecture # 5 Dr. Abdul Basit Siddiqui Assistant Professor-FURC 1FURC-BCSE7.
Pixel Connectivity Pixel connectivity is a central concept of both edge- and region- based approaches to segmentation The notation of pixel connectivity.
Medical Image Processing & Neural Networks Laboratory 1 Medical Image Processing Chapter 2 Digital Image Fundamentals 國立雲林科技大學 資訊工程研究所 張傳育 (Chuan-Yu Chang.
Digital Image Processing In The Name Of God Digital Image Processing Lecture2: Digital Image Fundamental M. Ghelich Oghli By: M. Ghelich Oghli
CS654: Digital Image Analysis Lecture 5: Pixels Relationships.
Miguel Tavares Coimbra
CS654: Digital Image Analysis Lecture 4: Basic relationship between Pixels.
Digital Topology CIS 601 Fall 2004 Longin Jan Latecki.
ISAN-DSP GROUP Digital Image Fundamentals ISAN-DSP GROUP What is Digital Image Processing ? Processing of a multidimensional pictures by a digital computer.
Digital Image Processing
Some Basic Relationships Between Pixels Definitions: –f(x,y): digital image –Pixels: q, p –Subset of pixels of f(x,y): S.
Machine Vision ENT 273 Hema C.R. Binary Image Processing Lecture 3.
Digital Image Processing, 3rd ed. © 1992–2008 R. C. Gonzalez & R. E. Woods Gonzalez & Woods Chapter 11 Representation and.
Course 3 Binary Image Binary Images have only two gray levels: “1” and “0”, i.e., black / white. —— save memory —— fast processing —— many features of.
Image Processing Chapter(3) Part 1:Relationships between pixels Prepared by: Hanan Hardan.
Relationship between pixels Neighbors of a pixel – 4-neighbors (N,S,W,E pixels) == N 4 (p). A pixel p at coordinates (x,y) has four horizontal and vertical.
Digital Image Processing CCS331 Relationships of Pixel 1.
October 3, 2013Computer Vision Lecture 10: Contour Fitting 1 Edge Relaxation Typically, this technique works on crack edges: pixelpixelpixel pixelpixelpixelebg.
Digital image basics Human vision perception system Image formation
What is Digital Image Processing?
Image Sampling and Quantization
Digital Image Fundamentals
图像处理技术讲座(3) Digital Image Processing (3) Basic Image Operations
Computer and Robot Vision I
Chapter 3 The Real Numbers.
Computer Vision Lecture 13: Image Segmentation III
F(x,y) قيمة البيكسل الواحد توجد 3 مراحل لمعالجة الصورة
IMAGE PROCESSING Questions and Answers.
Image Formation and Processing
Chapter 3 The Real Numbers.
Computer Vision Lecture 12: Image Segmentation II
Computer Vision Lecture 5: Binary Image Processing
T490 (IP): Tutorial 2 Chapter 2: Digital Image Fundamentals
ICS 353: Design and Analysis of Algorithms
Copyright © Cengage Learning. All rights reserved.
Pixel Relations.
Digital Image Fundamentals
Computer and Robot Vision I
CSC 381/481 Quarter: Fall 03/04 Daniela Stan Raicu
Subject Name: IMAGE PROCESSING Subject Code: 10EC763
Computer and Robot Vision I
Digital Image Processing
Digital Image Processing
Computer and Robot Vision I
IT523 Digital Image Processing
Detecting and analysing motion
Presentation transcript:

Some Basic Relationships Between Pixels Definitions: f(x,y): digital image Pixels: q, p Subset of pixels of f(x,y): S

Conventional indexing method Basic Relationship of Pixels (0,0) x (x,y) (x+1,y) (x-1,y) (x,y-1) (x,y+1) (x+1,y-1) (x-1,y-1) (x-1,y+1) (x+1,y+1) y Conventional indexing method

Neighbors of a Pixel A pixel p at (x,y) has 2 horizontal and 2 vertical neighbors: (x+1,y), (x-1,y), (x,y+1), (x,y-1) This set of pixels is called the 4-neighbors of p: N4(p)

Neighbors of a Pixel The 4 diagonal neighbors of p are: (ND(p)) (x+1,y+1), (x+1,y-1), (x-1,y+1), (x-1,y-1) N4(p) + ND(p)  N8(p): the 8-neighbors of p

N4(p) = 4-neighbors of p: Neighbors of a Pixel Neighborhood relation is used to tell adjacent pixels. It is useful for analyzing regions. (x,y-1) 4-neighbors of p: (x-1,y) (x+1,y) (x-1,y) (x+1,y) (x,y-1) (x,y+1) N4(p) = p (x,y+1) 4-neighborhood relation considers only vertical and horizontal neighbors. Note: q Î N4(p) implies p Î N4(q)

N8(p) = 8-neighbors of p: Neighbors of a Pixel (cont.) (x-1,y-1) 8-neighborhood relation considers all neighbor pixels.

Diagonal neighbors of p: Neighbors of a Pixel (cont.) Diagonal neighbors of p: (x-1,y-1) (x+1,y-1) (x-1,y-1) (x+1,y-1) (x-1,y+1) (x+1,y+1) p ND(p) = (x-1,y+1) (x+1,y+1) Diagonal -neighborhood relation considers only diagonal neighbor pixels.

Connectivity Connectivity is adapted from neighborhood relation. Two pixels are connected if they are in the same class (i.e. the same color or the same range of intensity) and they are neighbors of one another. For p and q from the same class w 4-connectivity: p and q are 4-connected if q Î N4(p) w 8-connectivity: p and q are 8-connected if q Î N8(p) w mixed-connectivity (m-connectivity): p and q are m-connected if q Î N4(p) or q Î ND(p) and N4(p) Ç N4(q) = Æ

Connectivity Connectivity between pixels is important: Because it is used in establishing boundaries of objects and components of regions in an image

Connectivity Two pixels are connected if: They are neighbors (i.e. adjacent in some sense -- e.g. N4(p), N8(p), …) Their gray levels satisfy a specified criterion of similarity (e.g. equality, …) V is the set of gray-level values used to define adjacency (e.g. V={1} for adjacency of pixels of value 1)

Adjacency We consider three types of adjacency: 4-adjacency: two pixels p and q with values from V are 4-adjacent if q is in the set N4(p) 8-adjacency : p & q are 8- adjacent if q is in the set N8(p)

Adjacency The third type of adjacency: m-adjacency: p & q with values from V are m-adjacent if q is in N4(p) or q is in ND(p) and the set N4(p)N4(q) has no pixels with values from V

Adjacency Mixed adjacency is a modification of 8-adjacency and is used to eliminate the multiple path connections that often arise when 8-adjacency is used.

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

Adjacency A pixel p is adjacent to pixel q is they are connected. Two image subsets S1 and S2 are adjacent if some pixel in S1 is adjacent to some pixel in S2 S1 S2 We can define type of adjacency: 4-adjacency, 8-adjacency or m-adjacency depending on type of connectivity.

Path A path (curve) from pixel p with coordinates (x,y) to pixel q with coordinates (s,t) is a sequence of distinct pixels: (x0,y0), (x1,y1), …, (xn,yn) where (x0,y0)=(x,y), (xn,yn)=(s,t), and (xi,yi) is adjacent to (xi-1,yi-1), for 1≤i ≤n ; n is the length of the path. If (xo, yo) = (xn, yn): a closed path

Paths 4-, 8-, m-paths can be defined depending on the type of adjacency specified. If p,q  S, then q is connected to p in S if there is a path from p to q consisting entirely of pixels in S.

Path A path from pixel p at (x,y) to pixel q at (s,t) is a sequence of distinct pixels: (x0,y0), (x1,y1), (x2,y2),…, (xn,yn) such that (x0,y0) = (x,y) and (xn,yn) = (s,t) and (xi,yi) is adjacent to (xi-1,yi-1), i = 1,…,n q p We can define type of path: 4-path, 8-path or m-path depending on type of adjacency.

Path (cont.) 8-path m-path p q p q p q m-path from p to q solves this ambiguity 8-path from p to q results in some ambiguity

Connectivity For any pixel p in S, the set of pixels in S that are connected to p is a connected component of S. If S has only one connected component then S is called a connected set.

Boundary R a subset of pixels: R is a region if R is a connected set. Its boundary (border, contour) is the set of pixels in R that have at least one neighbor not in R Edge can be the region boundary (in binary images)

Ri Rj (a) (b) (c ) Two regions (of 1s) that are adjacent if 8-adjencency is used. The circled point is part of the boundary of the 1-valued pixels only if 8-adjacency between the region and background is used. The inner boundary of the 1-valued region does not form a closed path, but its outer boundary does.

Distance Measures For pixels p,q,z with coordinates (x,y), (s,t), (u,v), D is a distance function or metric if: D(p,q) ≥ 0 (D(p,q)=0 iff p=q) D(p,q) = D(q,p) and D(p,z) ≤ D(p,q) + D(q,z)

Distance Measures Euclidean distance: De(p,q) = [(x-s)2 + (y-t)2]1/2 Points (pixels) having a distance less than or equal to r from (x,y) are contained in a disk of radius r centered at (x,y).

Distance Measures D4 distance (city-block distance): D4(p,q) = |x-s| + |y-t| forms a diamond centered at (x,y) e.g. pixels with D4≤2 from p D4 = 1 are the 4-neighbors of p

Distance Measures D8 distance (chessboard distance): D8(p,q) = max(|x-s|,|y-t|) Forms a square centered at p e.g. pixels with D8≤2 from p D8 = 1 are the 8-neighbors of p

Distance Measures D4 and D8 distances between p and q are independent of any paths that exist between the points because these distances involve only the coordinates of the points (regardless of whether a connected path exists between them).

Distance Measures However, for m-connectivity the value of the distance (length of path) between two pixels depends on the values of the pixels along the path and those of their neighbors.

Distance Measures e.g. assume p, p2, p4 = 1 p1, p3 = can have either 0 or 1 If only connectivity of pixels valued 1 is allowed, and p1 and p3 are 0, the m-distance between p and p4 is 2. If either p1 or p3 is 1, the distance is 3. If both p1 and p3 are 1, the distance is 4 (pp1p2p3p4)

Distance For pixel p, q, and z with coordinates (x,y), (s,t) and (u,v), D is a distance function or metric if w D(p,q) ³ 0 (D(p,q) = 0 if and only if p = q) w D(p,q) = D(q,p) w D(p,z) £ D(p,q) + D(q,z) Example: Euclidean distance

Distance (cont.) D4-distance (city-block distance) is defined as 1 2 Pixels with D4(p) = 1 is 4-neighbors of p.

Distance (cont.) D8-distance (chessboard distance) is defined as 2 2 2 2 2 2 1 1 1 2 2 1 1 2 2 1 1 1 2 2 2 2 2 2 Pixels with D8(p) = 1 is 8-neighbors of p.