Presentation is loading. Please wait.

Presentation is loading. Please wait.

University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction to computer vision Chapter 2: Image.

Similar presentations


Presentation on theme: "University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction to computer vision Chapter 2: Image."— Presentation transcript:

1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction to computer vision Chapter 2: Image Formation

2 Objective Before we can analyze and manipulate images, we need to establish a vocabulary for describing the geometry of a scene ( المشهد هندسة ). We also need to understand the image formation process that produced a particular image given  a set of lighting conditions,  scene geometry,  surface properties, and  camera optics. In this chapter, we present a simplified model of such an image formation process.

3 Outlines 2.1 Geometric primitives and transformations  introduces the basic geometric primitives used throughout the book (points, lines, and planes) and the geometric transformations that project these 3D quantities into 2D image features. 2.2 Photometric image formation  describes how lighting, surface properties, and camera optics interact in order to produce the color values that fall onto the image sensor. 2.3 The digital camera  describes how continuous color images are turned into discrete digital samples inside the image sensor and how to avoid (or at least characterize) sampling deficiencies, such as aliasing.

4 Geometric primitives and transformations Euclidean geometry is troublesome in one major respect which is intersection of lines. Two lines (we are thinking here of 2-dimensional geometry) almost always meet in a point, but there are some pairs of lines that do not do so - those that we call parallel. A common linguistic device for getting around this is to say that parallel lines meet "at infinity". However this is not altogether convincing, since infinity does not exist.

5 Geometric primitives and transformations We can get around this by enhancing the Euclidean plane by the addition of these points at infinity where parallel lines meet, and resolving the difficulty with infinity by calling them "ideal points." By adding these points at infinity, the familiar Euclidean space is transformed into a new type called projective space. There is nothing very mysterious about projective space - it is just an extension of Euclidean space in which two lines always meet in a point, though sometimes at mysterious points at infinity.

6 Geometric primitives and transformations

7 A point in Euclidean 2-space is represented by an ordered pair of real numbers, (x, y). We may add an extra coordinate to this pair, giving a triple (x, y, 1), that we declare to represent the same point. We now take the important conceptual step of asking why the last coordinate needs to be 1 ?? What about a coordinate triple (x,y,2)??? It is here that we make a definition and say that (x, y, 1) and (2x, 2y, 2) represent the same point, and furthermore, (kx,ky,k) represents the same point as well, for any non- zero value k. These are called the homogeneous coordinates of the point. Given a coordinate triple (kx, ky, k), we can get the original coordinates back by dividing by k to get (x,y).

8 Geometric primitives and transformations although (x, y, 1) represents the same point as the coordinate pair (x, y), there is no point that corresponds to the triple (x, y, 0). If we try to divide by the last coordinate, we get the point (.x/0, y/0) which is infinite. This is how the points at infinity arise then. They are the points represented by homogeneous coordinates in which the last coordinate is zero

9 Geometric primitives and transformations although (x, y, 1) represents the same point as the coordinate pair (x, y), there is no point that corresponds to the triple (x, y, 0). If we try to divide by the last coordinate, we get the point (.x/0, y/0) which is infinite. This is how the points at infinity arise then. They are the points represented by homogeneous coordinates in which the last coordinate is zero Thus, 2-dimensional Euclidean space can be extended to a projective space by representing points as homogeneous points

10 Geometric primitives Geometric primitives form the basic building blocks used to describe three-dimensional shapes. 2D points  2D points (pixel coordinates in an image) can be denoted using a pair of values,, or alternatively,  2D points can also be represented using homogeneous coordinates,  where vectors that differ only by scale are considered to be equivalent.  is called the 2D projective space.

11 Geometric primitives A homogeneous vector can be converted back into an inhomogeneous vector x by dividing through by the last element, i.e.,

12 Geometric primitives 2D lines A line in the plane is represented by an equation such as ax + by + c = 0, different choices of a, b and c giving rise to different lines. Thus, a line may naturally be represented by the vector (a, b, c) T. the lines ax + by + c = 0 and (ka)x + (kb)y + (kc) = 0 are the same, for any non-zero constant k. Thus, the vectors (a, b, c) T and k(a, b, c) T represent the same line, for any non-zero k

13 Geometric primitives 2D lines A point x = (x, y) lies on the line if and only if ax + by + c = 0. This may be written in terms of an inner product (dot product) of vectors representing the point as (x, y, 1).(a, b, c) = The dot product of two vectors a = [a 1, a 2,..., a n ] and b = [b 1, b 2,..., b n ] is defined as:

14 Geometric primitives When using homogeneous coordinates, we can compute the intersection of two lines as: where  is the cross product operator. Similarly, the line joining two points can be written as

15 Geometric primitives The definition of the cross product can also be represented by the determinant of a formal matrix:

16 2D transformations The simplest transformations occur in the 2D plane and are illustrated in Figure 2.4

17 2D transformations Translation:

18 2D transformations Translation: where 0 is the zero vector. Using a 2x3 matrix results in a more compact notation, whereas using a full-rank 3x3 matrix (which can be obtained from the 2x3 matrix by appending a [0 T 1] row) makes it possible to chain transformations using matrix multiplication.

19 2D transformations Rotation + translation: This transformation is also known as 2D rigid body motion or the 2D Euclidean transformation (since Euclidean distances are preserved). It can be written as

20 2D transformations Scaled rotation: Also known as the similarity transform, this transformation can be expressed as:

21 2D transformations Affine: The affine transformation is written as

22 2D transformations Projective: This transformation, also known as a perspective transform or homography, operates on homogeneous coordinates, Perspective transformations preserve straight lines (i.e., they remain straight after the transformation).

23 2D transformations Hierarchy of 2D transformations: The preceding set of transformations are summarized in Table 2.1. Each (simpler) group is a subset of the more complex group below it.


Download ppt "University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction to computer vision Chapter 2: Image."

Similar presentations


Ads by Google