Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 376b Introduction to Computer Vision 03 / 04 / 2008 Instructor: Michael Eckmann.

Similar presentations


Presentation on theme: "CS 376b Introduction to Computer Vision 03 / 04 / 2008 Instructor: Michael Eckmann."— Presentation transcript:

1 CS 376b Introduction to Computer Vision 03 / 04 / 2008 Instructor: Michael Eckmann

2 Michael Eckmann - Skidmore College - CS 376b - Spring 2008 Today’s Topics Comments/Questions Enhancing images (Chap. 5)‏ –vectors and operations, basis etc. –Frei-Chen basis –intro to Fourier theory

3 Michael Eckmann - Skidmore College - CS 376 - Spring 2008 Background vector length of vector sum of vectors (denoted in our text as + in a circle)‏ product of a scalar and a vector dot product of vectors (denoted in our text as a hollow circle)‏ cross product of vectors orthogonal orthonormal basis of vectors

4 Michael Eckmann - Skidmore College - CS 376 - Spring 2008 vectors A vector is a directed line segment that has magnitude (length) and direction. We can define a vector as the difference between two points. (Example on board.)‏ In 2 dimensions: V = P 2 -P 1 = (v x, v y )‏ In 3 dimensions: V = P 2 -P 1 = (v x, v y, v z )‏ Magnitude (length) of a Vector is determined by the Pythagorean theorem: For 2d: |V| = sqrt(v x 2 + v y 2 ) and for 3d: |V| = sqrt(v x 2 + v y 2 + v z 2 )‏ In general it is the sqrt of the sum of the squares of the elements

5 Michael Eckmann - Skidmore College - CS 376 - Spring 2008 vectors Vector addition: V 1 + V 2 = (v 1x +v 2x, v 1y +v 2y, v 1z +v 2z )‏ Scalar multiplication: sV = (sv x, sv y, sv z )‏ Dot product (aka scalar product) of 2 vectors results in a scalar: V 1 ● V 2 = |V 1 | |V 2 |cos θ θ is the (smaller) angle between the two vectors alternatively: V 1 ● V 2 = v 1x v 2x +v 1y v 2y +v 1z v 2z What would be the dot product of two perpendicular vectors (those with the angle between them being 90 degrees)?

6 Michael Eckmann - Skidmore College - CS 376 - Spring 2008 vectors Normalized Dot product of 2 vectors is: V 1 ● V 2 ------------ |V 1 | |V 2 |

7 Michael Eckmann - Skidmore College - CS 376 - Spring 2008 vectors Cross product (aka vector product) of 2 vectors results in a vector: V 1 x V 2 = u |V 1 | |V 2 |sin θ θ is the angle between the two vectors u is a unit vector (length = 1) perpendicular to both V 1 and V 2 u's direction is determined by the right-hand rule Right-hand rule is: with your right hand, grasp the axis perpendicular to the plane of the two vectors and make sure that the direction of your fingers curve from v1 to v2. u's direction is the direction of your thumb. Alternatively: V 1 x V 2 = (v 1y v 2z – v 1z v 2y, v 1z v 2x – v 1x v 2z, v 1x v 2y – v 1y v 2x )‏

8 Michael Eckmann - Skidmore College - CS 376 - Spring 2008 Background orthogonal = (perpendicular vectors == the dot product = 0)‏ orthonormal = orthogonal and each have unit length basis of vectors = a set of vectors that are linearly independent and span the vector space –what does linearly independent mean? if a set of vectors V span spans the vector space, then any vector in the space can be represented by a linear combination of the vectors in V span

9 Michael Eckmann - Skidmore College - CS 376 - Spring 2008 Energy A vector can be thought of as a signal and the energy of a signal is defined to be the squared length of the signal. The squared length of a signal is the sum of the squared coordinates (elements.)‏

10 Michael Eckmann - Skidmore College - CS 376 - Spring 2008 Exercise 5.13 b Represent S = [10, 19, 10] in terms of the orthonormal basis: {w 1, w 2, w 3 } = {(1/sqrt(2))[-1,0,1], (1/sqrt(3))[1,1,1], (1/sqrt(6))[-1,2,-1] } Take dot product of S with each of the basis vectors The sum of these dot products multiplied by each of the appropriate basis vectors is equivalent to S. Energy of S = 10 2 + 19 2 + 10 2 = 561. Ignoring for now the amount of energy associated with the constant basis vector, what percentage of the remaining energy is associated with w 1 vs. w 3

11 Michael Eckmann - Skidmore College - CS 376 - Spring 2008 Similarity to basis vectors The larger energies imply similarity to what the basis vector represents. The lower and 0 energies imply dissimilarity. So, in that last example, the vector S = [10, 19, 10] had high similarity to w 3 and was very dissimilar to w 1. That means it that vector is not like a step edge but is like an impulse.

12 Michael Eckmann - Skidmore College - CS 376 - Spring 2008 Basis for 3x3 images This idea can be extended into 2-dimensions. One basis for the 3x3 images is simply a set of 9 3x3 images each one with one 1 and 8 zeros, none of which have the 1 in the same place. That is called the standard basis. Every 3x3 image can be specified as a linear combination of the basis matrices. However, those basis vectors don't give us any description of the underlying structure.

13 Michael Eckmann - Skidmore College - CS 376 - Spring 2008 Basis for 3x3 images Another more useful basis is the Frei-Chen basis. –see figure 5.32 in text These basis matrices represent –gradients –ripples (draw on board)‏ –lines –laplacians (draw on board)‏ –and constant Every 3x3 image can be specified as a linear combination of the basis matrices. Why is the Frei-Chen basis more useful than the standard basis?

14 Michael Eckmann - Skidmore College - CS 376 - Spring 2008 Sinusoids as a Basis Read the section 5.11 on Fourier theory.


Download ppt "CS 376b Introduction to Computer Vision 03 / 04 / 2008 Instructor: Michael Eckmann."

Similar presentations


Ads by Google