Image Sampling and Quantization

Slides:



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

Teaching assistant: Yimo Guo Digital Image Processing (Digitaalinen kuvankäsittely) Exercise 1.
Projective Geometry- 3D
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,
Objective of Computer Vision
Objective of Computer Vision
Geometry: Dilations. We have already discussed translations, reflections and rotations. Each of these transformations is an isometry, which means.
1 Image Processing(IP) 1. Introduction 2. Digital Image Fundamentals 3. Image Enhancement in the spatial Domain 4. Image Enhancement in the Frequency Domain.
CAP4730: Computational Structures in Computer Graphics
Applied Discrete Mathematics Week 10: Equivalence Relations
Digital Image Processing
Digital Image Processing Lecture 2
Course 12 Calibration. 1.Introduction In theoretic discussions, we have assumed: Camera is located at the origin of coordinate system of scene.
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.
University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction to computer vision Chapter 2: Image.
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 1-The Basics Calculus, 2ed, by Blank & Krantz, Copyright 2011 by John Wiley & Sons, Inc, All Rights Reserved.
Magnitude of a Vector The magnitude of a vector, denoted as |a|, is defined as the square root of the sum of the squares of its components: |a| = (x 2.
Geometric Camera Models
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.
3. Image Sampling & Quantisation 3.1 Basic Concepts To create a digital image, we need to convert continuous sensed data into digital form. This involves.
1 Closures of Relations: Transitive Closure and Partitions Sections 8.4 and 8.5.
CHAPTER 3 FUZZY RELATION and COMPOSITION. 3.1 Crisp relation Product set Definition (Product set) Let A and B be two non-empty sets, the product.
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.
CS654: Digital Image Analysis Lecture 4: Basic relationship between Pixels.
Digital Topology CIS 601 Fall 2004 Longin Jan Latecki.
Chapter 8: Relations. 8.1 Relations and Their Properties Binary relations: Let A and B be any two sets. A binary relation R from A to B, written R : A.
Digital Image Processing Additional Material : Imaging Geometry 11 September 2006 Digital Image Processing Additional Material : Imaging Geometry 11 September.
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.
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.
1 Objective To provide background material in support of topics in Digital Image Processing that are based on matrices and/or vectors. Review Matrices.
Write Bresenham’s algorithm for generation of line also indicate which raster locations would be chosen by Bresenham’s algorithm when scan converting.
Robotics Chapter 3 – Forward Kinematics
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?
Some Basic Relationships Between Pixels
Digital Image Fundamentals
Image Representation and Description – Representation Schemes
图像处理技术讲座(3) Digital Image Processing (3) Basic Image Operations
IT472: Digital Image Processing
Copyright © Cengage Learning. All rights reserved.
F(x,y) قيمة البيكسل الواحد توجد 3 مراحل لمعالجة الصورة
IMAGE PROCESSING Questions and Answers.
Matrices and Vectors Review Objective
Chapter 3 VECTORS.
Computer Vision Lecture 5: Binary Image Processing
Fitting Curve Models to Edges
T490 (IP): Tutorial 2 Chapter 2: Digital Image Fundamentals
Geometric Camera Models
Pixel Relations.
Digital Image Fundamentals
CSC 381/481 Quarter: Fall 03/04 Daniela Stan Raicu
(c) University of Wisconsin, CS559
Subject Name: IMAGE PROCESSING Subject Code: 10EC763
Computer and Robot Vision I
Introduction to Relations and Functions
Objective To provide background material in support of topics in Digital Image Processing that are based on matrices and/or vectors.
Digital Image Processing
Calculus and analytic geometry
REVISION Relation. REVISION Relation Introduction to Relations and Functions.
Presentation transcript:

Image Sampling and Quantization Representing Digital Images The notation introduced in the preceding paragraph allows us to write the complete M*N digital image in the following compact matrix. This digitization process requires decisions about values for M, N, and for the number, L, of discrete gray levels allowed for each pixel. There are no requirements on M and N, other than that they have to be positive integers. Due to processing, storage, and sampling hardware considerations, the number of gray levels typically is an integer power of 2: L = 2k.

Representing digital images

Each pixel have an value equal f that is gray value

Image Sampling and Quantization The number, b, of bits required to store a digitized image is b = M * N * k. When M=N, this equation becomes b = N2k. Table 2.1 shows the number of bits required to store square images with various values of N and k.

Pixels relations N4 connectivity (b) D – connectivity together type called 8- connectivity

4-adjacency: if q is in the set N4(p). m-adjacency: if if q is in the set N4(p), or if q is in the set ND(p) and the set N4(p)∩N4(q) has no pixels whose values are from V.

3 1 2 1 2 2 0 2 1 2 1 1 1 0 1 2 لايوجد مسار بين P و q فى حالة N4 Example let v = {0,1} compute 4,8 and m-path between p and q q 3 1 2 1 2 2 0 2 1 2 1 1 1 0 1 2 لايوجد مسار بين P و q فى حالة N4 p

3 1 2 1 2 2 0 2 1 2 1 1 1 0 1 2 اقل مسار بين P و q فى حالة N8 = 4 Example let v = {0,1} compute 4,8 and m-path between p and q q 3 1 2 1 2 2 0 2 1 2 1 1 1 0 1 2 اقل مسار بين P و q فى حالة N8 = 4 p

m-adjacency :if q is in the set N4(p), or m- path the length of this path is 5 q 3 1 2 1 2 2 0 2 1 2 1 1 1 0 1 2 p m-adjacency :if q is in the set N4(p), or if q is in the set ND(p) and the set N4(p)∩N4(q) has no pixels whose values are from V.

3 1 2 1 2 2 0 2 1 2 1 1 1 0 1 2 يوجد مسار بين P و q فى حالة N4 = 6 Example let v = {1,2} compute 4,8 and m-path between p and q 3 1 2 1 2 2 0 2 1 2 1 1 1 0 1 2 q يوجد مسار بين P و q فى حالة N4 = 6 p

3 1 2 1 2 2 0 2 1 2 1 1 1 0 1 2 q يوجد مسار بين P و q فى حالة N8 = 4 p

3 1 2 1 2 2 0 2 1 2 1 1 1 0 1 2 يوجد مسار بين P و q فى حالة m = 6 3 1 2 1 2 2 0 2 1 2 1 1 1 0 1 2 q يوجد مسار بين P و q فى حالة m = 6 ”لاتاخذ الاقطار الا اذا توافرت الشروط“ p

Consider the tow image S1 and S2 for v {1} determine whether s1 and S2 connected (4 or 8 or m) ? 0 0 0 0 0 0 1 0 0 2 1 0 0 1 1 1 0 0 1 1 0 1 0 0 1 1 0 0 0 0 0 0

S1 and S2 are not 4- connected because q is not in set N4(p), S1 and S2 are 8- connected because q is in set N8(p), S1 and S2 are m- connected because q is in set ND(p) and set N4(p) intersection N4(q) is empty S1 S2 0 0 0 0 0 0 1 0 0 2 1 0 0 1 1 1 0 0 1 1 0 1 0 0 1 1 0 0 0 0 0 0 q p

* * * Labeling of connected components Scan an image pixel by pixel from left to right and form top to bottom 4-connected components * * * r t p

When we get p point points r and t have already been countered ( and label if they were 1’s ) * If the value of p=0 then move on the next scanning position If the value of p=1 then if r=0 and t=0 then assign a new label to p else

If r=1 ant t=0 then assign the label of r to p Else If r=0 and t=1 then assign the value t to p Else if r =1 and t=1 and have different label then assign one of the label to p

Note ( that the two label are equivalent ) else If r=1 ant t=1 and have the same e label then assign that label to p

The label 8- connected components we process the same way but the to upper diagonal neighbors of p denoted by q and s , also have to be examined r * * * * * q s t p

Relations , equivalence and transitive closure A binary (two) relation R on a set A is a set of pairs of elements from A For example the set of pair of point A = { p1 ,p2, p3 ,p4 } arranged as p1 p2 p3 p4

And define the relation 4- connected in case R is the set of pairs of point A that are 4- connected that is R = {( p1 ,p2) , (p2,p1) ,(p1,p3) ,(p3,p1) } A binary relation R over set A is said to be

(A) reflexive if for each a in A , a R a (b) symmetric if for each a and b in A , a R b implies b R a , and (c) transitive if for a,b and c in in A , a R b and b R c implies a R c A relation satisfying these three properties is called equivalence relation

Distance measures For pixels p ,q and z with coordinates (x,y) , (s,t) and (u,v) respectively , D is a distance function or metric if

The Euclidean distance between p and q define as: The 4- distance also called city block distance between p and q is defines as

Note the pixels with D4 <= 2 from (x,y) (the center point) from the folloing contours 2 1 2 2 1 0 1 2

the pixels with with D4 = 1 are the 4- neighbors of (x,y) the 8- distance (also called chessboard distance between p and q defined as:

Note the pixels with D8 <= 2 from (x,y) (the center point) from the folloing contours 2 2 2 2 2 2 1 1 1 2 2 1 0 1 2

the pixels with with D8 = 1 are the 8- neighbors of (x,y) For m connectivity the value of distance ( length of the path) between two pixels depends on the values of the pixels along the path for instance consider the following arrangement of pixels

p3 p4 p1 p2 p Assume that p , p2 and p4 have avalue of 1 and that p1 and p3 can have a value of 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 p3 p4 p1 p2 p 1 1 1

If either p1 or p3 is 1 , the distance is 3 p3 p4 p1 p2 p 1 1 1

If both p1 and p3 are 1 , the distance is 4 p3 p4 p1 p2 p 1 1 1 1

Image geometry Some basic transformation Translation To translate a point with coordinates (x,y,z) to a new location by using displacements (x0,y0,z0) the translation is accomplished by using the equations:

Z (x*,y*,z*) v (x0,y0,z0) X Y

X* = x+x0 Y* = y+y0 Z* = z+z0 Where (x*,y*,z*) are the coordinates of the new point. This equations can expressed in matrix form as

Transformation Matrix Note the use of square matrix simplifies the notational representation of this process we can written the previous equation as Transformation Matrix

Similarly to translate the point (x,y) to a new point x* = x + x0 y* = y + y0 Can be expressed in matrix form as:

Scaling Scaling by factors sx,sy and sz along the X,Y and Z axes is given by thr transformation matrix

Rotation Rotation in 3D is more complex than 2D . In 2D a rotation is prescribed by an angle of rotation and center of rotation P 3D rotation require the prescription of an angle of rotation and an axis of rotation.

Rotation

Rotation a bout Z axis (x*,y*,z*)= (x,y,z) Where

Rotation a bout Z axis in matrix form

Rotation a bout Y axis (x*,y*,z*)= (x,y,z) Where

Rotation a bout Y axis in matrix form

Rotation a bout X axis (x*,y*,z*)= (x,y,z) Where

Rotation a bout X axis in matrix form

Example Rotation original Angle 45 : rotation Angle 90 : rotation

Example :Rotation & scaling

Example Translation original X 30, y 45 translation

Translation & rotation Rotation  translation

f(x) (2,5) 5 3 (1,3) X 1 2 f (x) = m x + b

Z (x,y,z) c (0,0,0) X b a Y