Digital Image Processing CCS331 Relationships of Pixel 1.

Slides:



Advertisements
Similar presentations
電腦視覺 Computer and Robot Vision I
Advertisements

November 12, 2013Computer Vision Lecture 12: Texture 1Signature Another popular method of representing shape is called the signature. In order to compute.
Table of Contents 9.5 Some Basic Morphological Algorithm
Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Lecture Slides Elementary Statistics Eleventh Edition and the Triola.
CDS 301 Fall, 2009 Image Visualization Chap. 9 November 5, 2009 Jie Zhang Copyright ©
Digital Image Processing Lecture 12: Image Topology
Each pixel is 0 or 1, background or foreground Image processing to
图像处理技术讲座( 7 ) Digital Image Processing (7) 二值形态学 Binary morphology 顾 力栩 上海交通大学 计算机系
Morphological Image Processing Md. Rokanujjaman Assistant Professor Dept of Computer Science and Engineering Rajshahi University.
September 10, 2013Computer Vision Lecture 3: Binary Image Processing 1Thresholding Here, the right image is created from the left image by thresholding,
Morphology Structural processing of images Image Processing and Computer Vision: 33 Morphological Transformations Set theoretic methods of extracting.
EE 7730 Image Segmentation.
The Segmentation Problem
Image Analysis Preprocessing Arithmetic and Logic Operations Spatial Filters Image Quantization.
E.G.M. PetrakisBinary Image Processing1 Binary Image Analysis Segmentation produces homogenous regions –each region has uniform gray-level –each region.
CS 376b Introduction to Computer Vision 02 / 26 / 2008 Instructor: Michael Eckmann.
Digital Image Processing
October 14, 2014Computer Vision Lecture 11: Image Segmentation I 1Contours How should we represent contours? A good contour representation should meet.
Digital Image Processing CCS331 Basic Transformations 1.
Digital Image Processing CCS331 Image Interpolation 1.
Digital Image Processing CCS331
Digital Image Processing CSC331
CS 6825: Binary Image Processing – binary blob metrics
Digital Image Fundamentals II 1.Image modeling and representations 2.Pixels and Pixel relations 3.Arithmetic operations of images 4.Image geometry operation.
CS 376b Introduction to Computer Vision 02 / 22 / 2008 Instructor: Michael Eckmann.
Under Supervision of Dr. Kamel A. Arram Eng. Lamiaa Said Wed
Digital Image Processing CSC331
September 23, 2014Computer Vision Lecture 5: Binary Image Processing 1 Binary Images Binary images are grayscale images with only two possible levels of.
Multimedia Data Introduction to Image Processing Dr Sandra I. Woolley Electronic, Electrical.
Morphological Image Processing
Introduction Image geometry studies rotation, translation, scaling, distortion, etc. Image topology studies, e.g., (i) the number of occurrences.
Digital Image Processing CSC331 Image Enhancement 1.
Digital Image Processing DIGITIZATION. Summery of previous lecture Digital image processing techniques Application areas of the digital image processing.
Digital Image Processing CSC331 Morphological image processing 1.
Digital Image Processing CSC331 Image restoration 1.
Digital Image Processing CSC331 Morphological image processing 1.
CS654: Digital Image Analysis Lecture 5: Pixels Relationships.
CS654: Digital Image Analysis Lecture 4: Basic relationship between Pixels.
CS654: Digital Image Analysis
Digital Image Processing
Lecture 10: Lines from Edges, Interest Points, Binary Operations CAP 5415: Computer Vision Fall 2006.
Digital Image Processing CSC331 Image Enhancement 1.
CDS 301 Fall, 2008 Image Visualization Chap. 9 November 11, 2008 Jie Zhang Copyright ©
1 Mathematic Morphology used to extract image components that are useful in the representation and description of region shape, such as boundaries extraction.
Digital Image Processing CSC331 Image restoration 1.
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.
Machine Vision ENT 273 Hema C.R. Binary Image Processing Lecture 3.
Digital Image Processing
Digital Image Processing CSC331
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.
Morphological Image Processing (Chapter 9) CSC 446 Lecturer: Nada ALZaben.
Morphological Image Processing
Digital Image Processing CCS331 Relationships of Pixel 1.
Sheng-Fang Huang Chapter 11 part I.  After the image is segmented into regions, how to represent and describe these regions? ◦ In terms of its external.
Digital Image Processing CCS331 Camera Model and Imaging Geometry 1.
Course : T Computer Vision
Digital Image Processing CSC331
Mean Shift Segmentation
Computer Vision Lecture 5: Binary Image Processing
Fitting Curve Models to Edges
Binary Image processing بهمن 92
Computer and Robot Vision I
CSC 381/481 Quarter: Fall 03/04 Daniela Stan Raicu
Department of Computer Engineering
Digital Image Processing
Computer and Robot Vision I
DIGITAL IMAGE PROCESSING Elective 3 (5th Sem.)
Presentation transcript:

Digital Image Processing CCS331 Relationships of Pixel 1

Summery of previous lecture Pixel connectivity What is adjacency Different types of adjacency Connected component labeling problem Component leveling algorithm 2

Todays lecture Different distance measures Application of distance measures Arithmetic and logical operations on images Neighborhood operation on images 3

Connected component We take a sub set S of an image I we take 2 point p and q which belong to this subset S of image I. Then p is connected to q in S. which means if there exists a path from p to q consisting entirely of pixels in S. For any such p belonging to S, the set of pixels in S that are connected to p is called a connected component of S. 4

Connected component labeling To extracting the region property we need to distinguish the components For the identification or group identification, we need identify a set of pixels which are connected; belonging to a particular group, assign a particular identification number. 5

Component labeling Once we identify group of pixels which belong particular region; then we can go for finding out some region properties Region properties may be – shape up that particular region, – area of that particular region, – the boundary, – the length of the boundary – and many other features can be extracted 6

Algorithm for labeling The algorithm is called component leveling algorithm to assign an identification number to each of the connected pixels which will identify a particular region. 7

Component leveling algorithm 8

2 nd level 9

10

11

2 nd pass 12

Distance measures To find the distance between 2 points, we need the coordinate or the location of 2 different points There are various other distance measures which can be used in digital domain. – city block distance – chess board distance and so on. So, to see that if D is a distance function or a distance metric, then what is the property that should be followed by this distance function D? 13

Distance measures Three pixels p,q,z D is a distance measure or valid distance metric. If D (p, q) is greater than or equal to 0 for any p and q, any 2 points p and q; D (p, q) must be greater than or equal to 0 and D (p, q) will be 0 only if p is equal to q. If distance from p to q is same as the distance from q to p. If we take a third point z, then the distance between p and z that is D (p, z) must be less than or equal to the distance between the p and q plus the distance between q and z 14

Euclidean distance So, in case of Euclidean distance, A set of points q where D (p, q) the distance between p and q, is less than or equal to some value r. So, set of all this points are the points contained within a radius r where starts from location p. 15

16

City block distance The second distance measure which is also known as D4 distance or city block distance or Manhattan distance Its defined as D4 (p, q) is equal to x minus s absolute value plus y minus t absolute value. 17

18

Diamond shape All the points having a city block distance from point p less than or equal to some value r, will from a diamond center centered at point p. So p is the point at the center, then all the points having city block distance, they are the 4 neighbors of the point p. Similarly, all the points having the city block distance is equal to 2, they are simply the points which are at distance 2. That is the distance taken in the horizontal direction plus the distance taken in the vertical direction that becomes equal to 2and set of all this points with city block distance is equal to 2 that simply forms a diamond of radius 2 and similarly other points at distances 3 4 and so on. 19

Chess board distance In case of city block distance, the distance between 2 points was defined as the sum of the distances that you cover along x direction plus the distance along the y direction. In case of chess board distance, it is the maximum distances that you can cover along x direction and y direction. 20

Chess board distance D8 (p, q) which is equal to max of x minus s and y minus t where we take the absolute value of both x minus s and y minus t Where the set of points with a chess board distance is less than or equal to r, It forms a square centered at point p. So all the points with a chess board distance of equal to 1 from point p, they are nothing but the 8 neighbors of point p. 21

What are the distance measure ? We need to go for an example to understand. 22

Shape Matching If we want to find the difference in shapes. These 2 shapes are almost similar except that you have a hole in the second shape. 23

Shape Matching To find the feature of shapes We need to take the skeleton of the shapes which are shown in the figures below the shapes 24

The skeleton information By comparing the 2 skeletons, – the skeleton of the first shape, there are only 5 line segments, whereas for the skeleton of the second shape there are 10 line segments. – Similarly, the number of points where more than 2 line segments meet; in the first skeleton there are only 2 such points, whereas in the second skeleton there are 4 such points. By compare the skeleton rather than comparing using the original shape, there is lot of difference that can be found out both in terms of the number of line segments, and also in terms of the number of points where more than 1 line segments meet. 25

Now, the question is how do we get this skeleton? What is skeleton? When we remove some of the foreground points in such a way that the shape information as well as the dimension is more or less retained in the skeleton 26

How to get the Skeleton assume that the foreground region in the input binary image is made of some uniform slow burning material What if we light fire at all the points across the boundary of this region that is the foreground region. Then as the fire lines go in, there will be some points in the foreground region where the fire coming from 2 different boundaries will meet and at that point, the fire will extinguish itself. The set of all those points is what is called the quench line and the skeleton of the region is nothing but the quench line that we obtained by using this fire propagation concept. The set of all those points are called the quench line The skeleton of the region is “the quench line obtained by using fire propagation concept” This is also called “Medial Axis Transformation” 27

28

Simple description of movement of the fire line does not give you an idea of how to compute the skeleton of a particular shape. So, for that we use distance measure. When we a lighting the fire across all the boundary points simultaneously and the fire is moving inside the foreground region slowly, We can note at every point the time the fire takes to reach the particular point so it is a distance transformation of the image. 29

Distance transform is normally used for binary images and we calculate the time value for every point the the fire takes to reach that particular point; so by applying distance transformation, we get an image or the shape of the image is in a grey level image Where the grey level intensity of the points in the inside the foreground region had changed to show the distance of that point from the closest boundary point. 30

Distance transform Here, we have a binary image where the foreground region is a rectangular region and if I take the distance transform, Image in the right all the boundary points, they are getting a distance value equal to 1. Then the points inside the boundary points, they get a distance value equal to 2 and the points further inside, they gets a distance value equal to The intensity value that we are assigning to different points within the foreground region, the intensity value increases slowly from the boundary to the interior points. A grey level image which you get after performing the distance transformation.

By analyzing this distance transformed image, you find that there are few points at which there is some discontinuity of the curvature. So, by identify the points of discontinuity or curvature discontinuity, those are actually the point which lies on the skeleton of this particular shape. 32

original image; the middle column is the distance transformed image and the right most columns is the skeleton By correlating the right most column with the middle column, is the skeleton in the right most columns can now be easily obtained from the middle column 33

Skeletons shapes We can use this method when there is the need for shape matching or discrimination problem; So instead of processing on the original shapes, we compare the shapes using skeleton, 34

Distance measures There are different types of distance measures or distance metrics like Euclidian distance metric, city block distance metric or chess board distance metric; there will be different transformations There are also multiple skeletons algorithms, all the skeletons we get using different distance metrics, they will be a different. But the effect will be more or less similar The skeleton is very useful because it provides a simple and compact representational shape that preserves many of the topological and size characteristics of the original shape. 35

Use of skeleton We can have the length of a shape because by getting the different end points of the skeleton and the distances between every pair of end points in the skeleton, then the maximum of all those pair wise distances will give the length of the shape The skeleton gives us the ability of qualitatively/quantitatively difference between different shapes because 36

Arithmetic and logical operations In case of numerical system, if its decimal number system or binary number system; We can have arithmetic as well as logical operations. Similarly, for images also we can have arithmetic and logical operations. We can add 2 image pixel by pixel. That is a pixel from an image can be added to the corresponding pixel of a second image. 37

NOT operation or invert operation Invert the particular binary image that is I can make a NOT operation or invert operation, A is binary image where by NOT operation, all the pixels in the original image which was black now becomes white or 1 and pixels which are white or 1 in the original pixel, those pixels became become equal to 0. 38

AND, XOR Similarly, 2 images - A and B, A and B, the logical AND operation which is shown in the left image lower. Similarly, the XOR operation the image in the right image lower. 39

Pixel Neighborhood operations 3 by 3 matrix, this represents the part of an image which has nine pixel elements Z1 to Z9 I want to replace every pixel value by the average of its neighborhood considering the pixel itself. The simple average operation at individual at every pixel level We are replacing the intensity by a function of the intensities of its neighborhood pixels. We will see later that this is the simplest form of low pass filtering to remove noise from the image. 40

Using templates We define a 3 by 3 template which is shown on this right hand figure where the template contains nine elements W1 to W9 To perform the neighborhood operation; we put the template, on the original image in such a way that the pixel at which place we want to replace the value, the center of the template just relates with that pixel. We replace the value with the weighted sum of the values taken from the image and the corresponding point from the template. 41 the value which will be replaced is given by Z equal to W i Z i summation of i varying from 1 to 9.

Neighborhood operation The template operation can also be used for edge detection operation in different images. So, with this, we complete our lecture today. 42

Summery of the lecture Different distance measures Application of distance measures Arithmetic and logical operations on images Neighborhood operation on images 43

References Prof.P. K. Biswas Department of Electronics and Electrical Communication Engineering Indian Institute of Technology, Kharagpur Gonzalez R. C. & Woods R.E. (2008). Digital Image Processing. Prentice Hall. Forsyth, D. A. & Ponce, J. (2011).Computer Vision: A Modern Approach. Pearson Education. 44