Image Processing Chapter(3) Part 1:Relationships between pixels Prepared by: Hanan Hardan.

Slides:



Advertisements
Similar presentations
Image Processing Ch2: Digital image Fundamentals Part 2 Prepared by: Tahani Khatib.
Advertisements

Course Syllabus 1.Color 2.Camera models, camera calibration 3.Advanced image pre-processing Line detection Corner detection Maximally stable extremal regions.
Teaching assistant: Yimo Guo Digital Image Processing (Digitaalinen kuvankäsittely) Exercise 1.
Chapter 9: Morphological Image Processing
Some Basic Morphological Algorithm
Course Syllabus 1.Color 2.Camera models, camera calibration 3.Advanced image pre-processing Line detection Corner detection Maximally stable extremal regions.
Digital Image Processing Lecture 12: Image Topology
September 10, 2013Computer Vision Lecture 3: Binary Image Processing 1Thresholding Here, the right image is created from the left image by thresholding,
Digital Image Processing Chapter 2: Digital Image Fundamentals.
Morphological Image Processing
E.G.M. PetrakisBinary Image Processing1 Binary Image Analysis Segmentation produces homogenous regions –each region has uniform gray-level –each region.
1 Image Processing(IP) 1. Introduction 2. Digital Image Fundamentals 3. Image Enhancement in the spatial Domain 4. Image Enhancement in the Frequency Domain.
Chapter 2: Digital Image Fundamentals Fall 2003, 劉震昌.
Chapter 2 Digital Image Fundamentals
Digital Image Fundamentals
Chapter 3 Binary Image Analysis. Types of images ► Digital image = I[r][c] is discrete for I, r, and c.  B[r][c] = binary image - range of I is in {0,1}
Digital Image Processing
Digital Image Processing
Digital Image Processing Lecture 2
Chapter 9.  Mathematical morphology: ◦ A useful tool for extracting image components in the representation of region shape.  Boundaries, skeletons,
Digital Image Processing, 3rd ed. © 1992–2008 R. C. Gonzalez & R. E. Woods Gonzalez & Woods Matrices and Vectors Objective.
Digital Image Fundamentals II 1.Image modeling and representations 2.Pixels and Pixel relations 3.Arithmetic operations of images 4.Image geometry operation.
Discrete Math for CS Binary Relation: A binary relation between sets A and B is a subset of the Cartesian Product A x B. If A = B we say that the relation.
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.
Digital Image Processing Lecture 18: Segmentation: Thresholding & Region-Based Prof. Charlene Tsai.
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.
CS 376b Introduction to Computer Vision 02 / 11 / 2008 Instructor: Michael Eckmann.
Miguel Tavares Coimbra
CS654: Digital Image Analysis Lecture 4: Basic relationship between Pixels.
Morphological Image Processing การทำงานกับรูปภาพด้วยวิธีมอร์โฟโลจิคัล
References Books: Chapter 11, Image Processing, Analysis, and Machine Vision, Sonka et al Chapter 9, Digital Image Processing, Gonzalez & Woods.
Digital Topology CIS 601 Fall 2004 Longin Jan Latecki.
Digital Image Processing
1 Mathematic Morphology used to extract image components that are useful in the representation and description of region shape, such as boundaries extraction.
Some Basic Relationships Between Pixels Definitions: –f(x,y): digital image –Pixels: q, p –Subset of pixels of f(x,y): S.
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
BYST Morp-1 DIP - WS2002: Morphology Digital Image Processing Morphological Image Processing Bundit Thipakorn, Ph.D. Computer Engineering Department.
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.
Chapter 6 Skeleton & Morphological Operation. Image Processing for Pattern Recognition Feature Extraction Acquisition Preprocessing Classification Post.
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.
1 Objective To provide background material in support of topics in Digital Image Processing that are based on matrices and/or vectors. Review Matrices.
Binary Relation: A binary relation between sets A and B is a subset of the Cartesian Product A x B. If A = B we say that the relation is a relation on.
What is Digital Image Processing?
Image Sampling and Quantization
Some Basic Relationships Between Pixels
Digital Image Fundamentals
图像处理技术讲座(3) Digital Image Processing (3) Basic Image Operations
Image Formation and Processing
Computer Vision Lecture 5: Binary Image Processing
T490 (IP): Tutorial 2 Chapter 2: Digital Image Fundamentals
Pixel Relations.
Digital Image Fundamentals
Binary Image processing بهمن 92
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
IT523 Digital Image Processing
Presentation transcript:

Image Processing Chapter(3) Part 1:Relationships between pixels Prepared by: Hanan Hardan

Neighbors of a pixel Ch3: Some basic Relationships between pixels  some of the points in N D (p) and N 8 (p) fall outside the image if (x,y) is on the border of the 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 and Connectivity  Let V: a set of intensity values used to define adjacency and connectivity.  In a binary image, V = {1}, if we are referring to adjacency of pixels with value 1.  In a gray-scale image, the idea is the same, but V typically contains more elements, for example, V = {180, 181, 182, …, 200}  If the possible intensity values 0 – 255, V set can be any subset of these 256 values

Adjacency Ch3: Some basic Relationships between pixels V: set of gray level values (L), (V is a subset of L.) 3 types of adjacency  4- adjacency: 2 pixels p and q with values from V are 4- adjacent if q is in the set N 4 (p)  8- adjacency: 2 pixels p and q with values from V are 8- adjacent if q is in the set N 8 (p)  m- adjacency: 2 pixels p and q with values from V are m-adjacent if 1. q is in N 4 (p), or 2. q is in N D (p) and the set N 4 (p) ∩ N 4 (q) has no pixels whose values are from V

Types of Adjacency  In this example, we can note that to connect between two pixels (finding a path between two pixels): In 8-adjacency way, you can find multiple paths between two pixels While, in m-adjacency, you can find only one path between two pixels  So, m-adjacency has eliminated the multiple path connection that has been generated by the 8-adjacency.

Types of Adjacency  Two subsets S1 and S2 are adjacent, if some pixel in S1 is adjacent to some pixel in S2. Adjacent means, either 4-, 8- or m- adjacency.

A digital path  A digital path from pixel p with coordinates (x,y) to pixel q with coordinates (s,t) is a sequence of distinct pixels with coordinates (x0,y0), (x1,y1), …, (xn,yn), where (x0,y0)= (x,y) and (xn,yn)=(s,t), and pixels (xi,yi) and (xi-1,yi-1) are adjacent for 1 ≤ i ≤ n.  n is the length of the path  If (x 0,y 0 ) = (x n, y n ), the path is closed.  We can specify 4-, 8- or m-paths depending on the type of adjacency specified. Ch3: Some basic Relationships between pixels

A Digital Path  Return to the previous example: In figure (b) the paths between the top right and bottom right pixels are 8-paths. And the path between the same 2 pixels in figure (c) is m-path

Connectivity  S: a subset of pixels in an image.  Two pixels p and q are said to be connected in S if there exists a path between them consisting entirely of pixels in S.  For any pixel p in S, the set of pixels that are connected to it in S is called a connected component of S. Ch3: Some basic Relationships between pixels

Regions and boundaries  Region Let R be a subset of pixels in an image, we call R a region of the image if R is a connected set  Boundary The boundary (also called border or contour) of a region R is the set of pixels in the region that have one or more neighbors that are not in R. Ch3: Some basic Relationships between pixels

Region and Boundary  If R happens to be an entire image, then its boundary is defined as the set of pixels in the first and last rows and columns in the image.

Foreground and background Suppose that the image contains K disjoint regions Rk none of which touches the image border. Ru : the union of all regions. (Ru) c : is the complement. so Ru is called foreground, and (Ru) c : is the background.

Distance measures If we have 3 pixels: p,q,z respectively p with (x,y) q with (s,t) z with (v,w) Then: 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) Ch3: Some basic Relationships between pixels

Distance measures  Euclidean distance between p and q: De(p,q) = [(x-s) 2 + (y-t) 2 ] 1/2  D4 distance (also called city-block distance): D4(p,q) = |x-s| + |y-t|  D8 distance (also called chessboard distance) : D8(p,q) = max (|x-s|, |y-t|) Ch3: Some basic Relationships between pixels

Distance measures

Example: q p Compute the distance between the two pixels using the three distances : q:(1,1) P: (2,2) Euclidian distance : ((1-2) 2 +(1-2) 2 ) 1/2 = sqrt(2). D4(City Block distance): |1-2| +|1-2| =2 D8(chessboard distance ) : max(|1-2|,|1-2|)= 1 (because it is one of the 8-neighbors )

Distance measures Example : Use the city block distance to prove 4- neighbors ? Pixel A : | 2-2| + |1-2| = 1 Pixel B: | 3-2|+|2-2|= 1 Pixel C: |2-2|+|2-3| =1 Pixel D: |1-2| + |2-2| = 1 Now as a homework try the chessboard distance to proof the 8- neighbors!!!! d cpa b

Distance Measures Example: The pixels with distance D 4 ≤ 2 from (x,y) form the following contours of constant distance. The pixels with D 4 = 1 are the 4-neighbors of (x,y)

Distance Measures Example: D 8 distance ≤ 2 from (x,y) form the following contours of constant distance. D8 = 1 are the 8-neighbors of (x,y)

Distance Measures  Dm distance: is defined as the shortest m-path between the points. In this case, the distance between two pixels will depend on the values of the pixels along the path, as well as the values of their neighbors.

Distance Measures  Example: Consider the following arrangement of pixels and assume that p, p 2, and p 4 have value 1 and that p 1 and p 3 can have a value of 0 or 1 Suppose that we consider the adjacency of pixels values 1 (i.e. V = {1})

Distance Measures  Cont. Example: Now, to compute the D m between points p and p 4 Here we have 4 cases: Case1: If p 1 =0 and p 3 = 0 The length of the shortest m-path (the D m distance) is 2 (p, p 2, p 4 )

Distance Measures  Cont. Example: Case2: If p 1 =1 and p 3 = 0 then, the length of the shortest path will be 3 (p, p 1, p 2, p 4 )

Distance Measures  Cont. Example: Case3: If p 1 =0 and p 3 = 1 The same applies here, and the shortest – m-path will be 3 (p, p 2, p 3, p 4 )

Distance Measures  Cont. Example: Case4: If p 1 =1 and p 3 = 1 The length of the shortest m-path will be 4 (p, p 1, p 2, p 3, p 4 )