Digital Image Fundamentals II

Similar documents
Interpolation is a basic tool used extensively in tasks such as zooming, shrinking, rotating, and geometric corrections.

Basic relations between pixels (Chapter 2)

ECE 178: Introduction (contd.)

Digital Image Processing

Chapter 2: Digital Image Fundamentals

CS4733 Class Notes, Computer Vision

Chapter 10 Image Segmentation. Yinghua He

Digital Image Processing. Introduction

2D TRANSFORMATIONS AND MATRICES

Babu Madhav Institute of Information Technology Years Integrated M.Sc.(IT)(Semester - 7)

EE795: Computer Vision and Intelligent Systems

Morphological Image Processing

VC 16/17 TP5 Single Pixel Manipulation

Ulrik Söderström 16 Feb Image Processing. Segmentation

Biomedical Image Analysis. Point, Edge and Line Detection

Lecture 1 Introduction & Fundamentals

UNIT 2 2D TRANSFORMATIONS

Mathematical Morphology and Distance Transforms. Robin Strand

Limits and Continuity: section 12.2

Image Reconstruction from Projection

What will we learn? Neighborhood processing. Convolution and correlation. Neighborhood processing. Chapter 10 Neighborhood Processing

Introduction to Digital Image Processing

Unit - I Computer vision Fundamentals

Image warping , , Computational Photography Fall 2017, Lecture 10

Lecture 6: Multimedia Information Retrieval Dr. Jian Zhang

UNIT-2 IMAGE REPRESENTATION IMAGE REPRESENTATION IMAGE SENSORS IMAGE SENSORS- FLEX CIRCUIT ASSEMBLY

Image Processing. BITS Pilani. Dr Jagadish Nayak. Dubai Campus

Lecture: Segmentation I FMAN30: Medical Image Analysis. Anders Heyden

Noise Model. Important Noise Probability Density Functions (Cont.) Important Noise Probability Density Functions

Edge pixel with coordinates (s,t) in S xy has an angle similar to pixel at α(s,t) α(x,y) <A

Topic 4 Image Segmentation

Computer Vision. The image formation process

Coordinate transformations. 5554: Packet 8 1

Image Processing. Traitement d images. Yuliya Tarabalka Tel.

EE 584 MACHINE VISION

Texture. Frequency Descriptors. Frequency Descriptors. Frequency Descriptors. Frequency Descriptors. Frequency Descriptors

Filtering Images. Contents

Spatial Enhancement Definition

Chapter 18. Geometric Operations

Computer Assisted Image Analysis TF 3p and MN1 5p Lecture 1, (GW 1, )

EE795: Computer Vision and Intelligent Systems

Chapter6 Image Reconstruction

Digital Image Analysis and Processing

Image Enhancement in Spatial Domain. By Dr. Rajeev Srivastava

Digital Image Processing. Image Enhancement in the Spatial Domain (Chapter 4)

Digital Image Processing. Image Enhancement - Filtering

CITS 4402 Computer Vision

Topological structure of images

An Introduction to Images

Affine Transformation. Edith Law & Mike Terry

Statistical Image Compression using Fast Fourier Coefficients

Exercise: Simulating spatial processing in the visual pathway with convolution

CS 548: Computer Vision and Image Processing Digital Image Basics. Spring 2016 Dr. Michael J. Reale

Transformations Computer Graphics I Lecture 4

Topological structure of images

Edge and local feature detection - 2. Importance of edge detection in computer vision

Lecture 4. Digital Image Enhancement. 1. Principle of image enhancement 2. Spatial domain transformation. Histogram processing

Vector Algebra Transformations. Lecture 4

Texture Analysis. Selim Aksoy Department of Computer Engineering Bilkent University

Chapter 3: Intensity Transformations and Spatial Filtering

Fitting: The Hough transform

Lecture 6: Edge Detection

Image Processing. Bilkent University. CS554 Computer Vision Pinar Duygulu

ECG782: Multidimensional Digital Signal Processing

Histograms. h(r k ) = n k. p(r k )= n k /NM. Histogram: number of times intensity level rk appears in the image

International Journal of Advance Engineering and Research Development. Applications of Set Theory in Digital Image Processing

Introduction. Computer Vision & Digital Image Processing. Preview. Basic Concepts from Set Theory

Biomedical Image Analysis. Spatial Filtering

Problem definition Image acquisition Image segmentation Connected component analysis. Machine vision systems - 1

IMAGE ENHANCEMENT in SPATIAL DOMAIN by Intensity Transformations

EC-433 Digital Image Processing

Edge linking. Two types of approaches. This process needs to be able to bridge gaps in detected edges due to the reason mentioned above

Image Enhancement: To improve the quality of images

Introduction to Computer Vision. Human Eye Sampling

UNIT-I. Digital image processing is the manipulation of digital images by mean of a computer. It has two main applications:

One image is worth 1,000 words

Vivekananda. Collegee of Engineering & Technology. Question and Answers on 10CS762 /10IS762 UNIT- 5 : IMAGE ENHANCEMENT.

Practical Image and Video Processing Using MATLAB

Homogeneous Coordinates and Transformations of the Plane

Short Survey on Static Hand Gesture Recognition

Basic Algorithms for Digital Image Analysis: a course

Review for Exam I, EE552 2/2009

GEOMETRIC TRANSFORMATIONS AND VIEWING

3. (a) Prove any four properties of 2D Fourier Transform. (b) Determine the kernel coefficients of 2D Hadamard transforms for N=8.

CoE4TN4 Image Processing. Chapter 5 Image Restoration and Reconstruction

Subpixel Corner Detection Using Spatial Moment 1)

ECG782: Multidimensional Digital Signal Processing

CHAPTER 3 IMAGE ENHANCEMENT IN THE SPATIAL DOMAIN

CSG obj. oper3. obj1 obj2 obj3. obj5. obj4

Transformations Computer Graphics I Lecture 4

Image representation. 1. Introduction

Richard Liu Associate Professor, Principle Investigator. Xiemin Chen Research Associate. Min Wu Research Assistant. Project No.

Perception. Autonomous Mobile Robots. Sensors Vision Uncertainties, Line extraction from laser scans. Autonomous Systems Lab. Zürich.

Texture Segmentation and Classification in Biomedical Image Processing

SYSTEMS OF NONLINEAR EQUATIONS

2D and 3D Transformations AUI Course Denbigh Starkey

Content Based Image Retrieval Using Combined Color & Texture Features

Topic 5 Image Compression

1. (10 pts) Order the following three images by how much memory they occupy:

INTENSITY TRANSFORMATION AND SPATIAL FILTERING

Transcription:

Digital Image Fundamentals II 1. Image modeling and representations 2. Pixels and Pixel relations 3. Arithmetic operations of images 4. Image geometry operation 5. Image processing with Matlab - Image Processing Toolbox (IPT)

1. Image modeling and representation A 2D image is a function of any quantity over a finite spatial extent: f ( x, y) x x x 1 2 y y y 1 2 The value of f(x, y,) can be real number, integer, or 0,1 Continuous space image: x and y are chosen as real numbers Discrete space: x and y are chosen as integers

Digital images in discrete space 2D digital image x = 0,, M-1, y = 0,, N-1, and f(x, y) are integers in binary format of 8 bits, 16 bits (or d bits). (i, j) is pixel, f(x, y) is its pixel or intensity Resolution: M N, i.e. number of pixels Size: M N d i.e., the total number of bits to represent the image Represented as a matrix f ( x, y ) f (0,0) f (0,1)... f (0, M 1) (1, 0) (1,1)... (1, M 1) f (, f (,) f (, =............ f ( N 1,0) f ( N 1,1)... f ( N 1, M 1)

Pixel coordinate and spatial coordinate Discrete domain Continuous demain

For color image, f(x, y) is triple of integers: f ( x, y ) = ( z ( x, y ), z ( x, y ), z ( x, y )) f 1 2 3

One-Dimensional Image 1D image is a function f ( x ), x x x 1 2 One-dimensional (1D) image can be represented as a sequence of numbers: xn ( ), n= 0,1,..., M 1 Graphical representation

Image representation A 1D image of one point δ ( x) 1, x = 0 = 0, x 0 Represent image of discrete domain by continuous image function. xn ( ), n= 0,1,..., N 1 Representation in continuous domain N 1 X ( x) = x( n) δ ( x n), < x < n = 0

Image representation 2D image of one point 1( 1, x, y ) = (00) (0, 0) δ ( x, y) = 0,( x, y) (0,0) Represent image of discrete domain by continuous image function. f ( x, y ), x = 0,1,..., M 1, y = 0,1,..., N 1 M 1 N 1 F ( x, y ) = f ( x, y ) δ ( x i, y j ), i= 0 j= 0 < x <, < y <

2. Relations of pixels Neighbors of a pixel p at (x, y) 4-neighbors of p: N 4 (p) ={ (x+1, y), (x-1,y),(x,y+1), (x,y-1)} 4-diagonal neighbors of p: N D (p) = { (x+1, y+1), (x+1,y-1),(x-1,y+1), (x-1,y-1)} 8-neighbors of p : N 8 (p) = N 4 (p) U N D (p)

Connectivity Let V be the set of gray-level values used to defined connectivity 4-connectivity : 2 pixels p and q with values from V are 4-connected if q is in the set N 4 (p) 8-connectivity : 2 pixels p and q with values from V are 8-connected if q is in the set N 8 (p) m-connectivity (mixed connectivity): 2 pixels p and q with values from V are m-connected if q is in the set N 4 (p), or q is in the set N D (p) and the set N 4 (p) N 4 (q) is empty. (the set of pixels that are 4- neighbors of both p and q whose values are from V )

Adjacent, path and connected component Adjacent: a pixel p is adjacent to a pixel q if they are connected Two image area subsets S1 and S2 are adjacent if some pixel in S1 is adjacent to some pixel S2 Path a path from pixel p(x,y) to pixel q(s,t) is a sequence of distinct pixels with coordinates (x,y)=(x 0,y 0 ), (x 1,y 1 ),, (x n, y n ), where (x 0, y 0 ) = (x, y), (x n, y n ) = (s, t) and (x i, y i ) is adjacent to (x i-1,y i-1 ), n is the length of the path C t d t f i l h th t it Connected component: a group of pixels such that it contains a path connecting every pair of its pixels.

Example

Example Consider the two image subsets S1 and S2 : For V={1}, determine whether S1 and S2 are 4-connected, 8-connected, m-connected

Labeling of Connected Components scan the image from left to right Let p denote the pixel at any step in the scanning process. Let t denote the upper neighbor of p. Let l denote the left-hand neighbors of p, respectively. when we get to p, points t and l have already been encountered and labeled if they were 1 s. if the value of p = 0, move on. if the value of p = 1, examine t and l. if they are both 0, assign a new label to p. if only one of them is 1, assign its label to p. if they are both 1 if they have the same label, assign that label to p. if not, assign one of the labels to p and make a note that the two labels are equivalent. (t and l are connected through p). at the end of the scan, all points with value 1 have been labeled. do a second scan, assign a new label for each equivalent labels

Example 0 0 0 1 0 0 0 a 0 0 0 d 0 0 1 1 0 0 b a 0 0 d d,( a b ) 1 0 0 0 c 0 0 0 c 0 0 0 1 1 0 0 c c 0 0 c c 0 0 0 0 0 d 0 0 0 0 0 0 d d 0 0 0 0, 0 0 0 0 c 0 0 0 0 0 0 0 c c 0 0 How to find the bounding box of a connected component?

Distance Measures Given pixels p(x,y), q(s,t) and z(u,v). D is a distance function or metric if (a)d(p,q) 0 ; D(p,q) = 0 iff p=q (b)d(p,q) = D(q,p) (c)d(p,z) (p ) D(p,q) + D(q,z)

Euclidean Distance Euclidean distance between p and q pxy (, ), qst (, ), D (, ) ( ) ( ) e pq = s x + t y 2 2

Manhattan Distance Manhattan distance p ( xy, ), qst (, ), D = m ( p, q ) s x + t y e.g. the diamond centered at (x, y) 2 212 2 2 1 0 1 2 2 1 2 2

Chessboard distance D 8 distance pxy (, ), qst (, ), D ( pq, ) = max{ s x, t y } 8

Other distances D 4 distance defined by the length of the shortest D 4 path D 8 distance defined by the length of the shortest D 8 path m-connectivity s distance defined d by the length of the shortest t m-connectivity it path

Arithmetic Operators of Images Arithmetic operations of two images are carried out by the arithmetic operations of the corresponding pixels of the two images. Addition : p+q used in image average to reduce noise. Subtraction : p-q basic tool in medical imaging. Multiplication : pxq to correct gray-level shading result from non-uniformities in illumination or in the sensor used to acquire the image. Division : p/q

Logic operations AND : p AND q OR : p OR q COMPLEMENT : NOT q ( ) logic operations apply only to binary images Arithmetic operations apply to multi-valued pixels l i ti d f t k h ki f t logic operations used for tasks such as masking, feature detection, and shape analysis.

Mask Operation Besides pixel-by-pixel processing on entire images, arithmetic and Logical operations are used in neighborhood h oriented operations. The value of a pixel is arithmetic result of its neighbors. eg e.g 9 Z = wz i i W i are called mask coefficients. When w Z i i = 1/ 9, i = 1,...,9 9 1 = Z 9 i i

Mask coefficient Proper selection of the coefficients and application of the mask at each pixel position in an image makes possible a variety of useful image operations noise reduction region thinning edge detection Applying a mask at each pixel location in an image is a computationally expensive task. More mathematics will be involved.

Image Geometry Transformation Geometry transformation p(x, y) => p (x, y ) Basic transformations Translation Scaling Rotation The composition of transformations Transformation matrix p ' = Tp

Translate x' = x+ x 0 y' = y+ y 0 x' x x0 = + y' y y 0 Translate point P to point P along a vector (x 0, y 0 ) Homogeneous coordinates x ' 1 0 x0 x 1 0 x0 y ' = 0 1 y 0 y, T ( x0, y0 ) = 0 1 y 0 1 0 0 1 1 0 0 1

Rotation x ' = xcosθ + ysinθ y ' = x sin θ + y cos θ x ' cosθ sinθ 0 x y' = sinθ cosθ 0 y 1 0 0 1 1 cosθ sinθ 0 Tx ( θ) = sinθ cosθ 0 0 0 1 Rotate w.r.t x -axis

Scaling x ' = c x x y ' = c y y x ' c x 0 0 x y ' = 0 c y 0 y 1 0 0 1 1 c x 0 0 T s ( c x, c y ) = 0 c y 0 0 0 1

Composition of Transformations The transformation matrix of a sequence of transformation is equal to the product of transformation matrices of each individual matrix. T T T k 1 P 1 P 2... P 1 2 k Pk = TPT 1, =?

Image Transformation Input an image output another image T f ( x, y ) g ( x, y ) g = T( f) Geometry transformation gxy (, ) = f( Mxy (, )') Intensity transformation gxy (, ) = T( f( xy, )) These transformation works directly on pixels. They are spatial transformation, or in spatial domain.

Image Transformation The transformation can be complicate in transformation domain T f ( xy, ) gxy (, ), g= T( f) M 1N 1 = Tuv (, ) f ( xyrxyuv, ) (,,, ) x= 0 y= 0 M 1N 1 = f ( xy, ) T ( uvsxyuv, )(,,, ) u= 0 v= 0

Image Transformation Example: 2-D Fourier transformation rxyuv (,,, ) sxyuv (,,, ) = = e j 2 π ( ux / M+ vy / N ) 1 MN e j2 π ( ux / M + vy / N ) Tuv (, ) M 1N 1 = x= 0 y= 0 j2 π ( ux / M + vy / N ) M 1 N 1 1 f( x, y) = T( u, v) e MN e u= 0 v= 0 j2 π ( ux / M + vy / N )