15
Computer Vision Computer Vision Lecture #2 Lecture #2 Hossam Abdelmunim 1 & Aly A. Farag 2 1 Computer & Systems Engineering Department, Ain Shams University, Cairo, Egypt 2 Electerical and Computer Engineering Department, University of Louisville, Louisville, KY, USA ECE619/645 – Spring 2011

Computer Vision Lecture #2 Hossam Abdelmunim 1 & Aly A. Farag 2 1 Computer & Systems Engineering Department, Ain Shams University, Cairo, Egypt 2 Electerical

Embed Size (px)

Citation preview

Page 1: Computer Vision Lecture #2 Hossam Abdelmunim 1 & Aly A. Farag 2 1 Computer & Systems Engineering Department, Ain Shams University, Cairo, Egypt 2 Electerical

Computer VisionComputer VisionLecture #2Lecture #2

Hossam Abdelmunim1 & Aly A. Farag2

1Computer & Systems Engineering Department, Ain Shams University, Cairo, Egypt

2Electerical and Computer Engineering Department, University of Louisville, Louisville, KY, USA

ECE619/645 – Spring 2011

Page 2: Computer Vision Lecture #2 Hossam Abdelmunim 1 & Aly A. Farag 2 1 Computer & Systems Engineering Department, Ain Shams University, Cairo, Egypt 2 Electerical

Geometric Primitives and Geometric Primitives and TransformationsTransformations

Geometric Primitives and Geometric Primitives and TransformationsTransformations

• 2D Point– x=(x1,x2,1)

• 2D Line– ax1+bx2+c=0

Page 3: Computer Vision Lecture #2 Hossam Abdelmunim 1 & Aly A. Farag 2 1 Computer & Systems Engineering Department, Ain Shams University, Cairo, Egypt 2 Electerical

Geometric Primitives and Geometric Primitives and TransformationsTransformations

Geometric Primitives and Geometric Primitives and TransformationsTransformations

• 3D Point– x=(x1,x2,x3,1)

• 3D Line

Derive the line equation shown above.

Page 4: Computer Vision Lecture #2 Hossam Abdelmunim 1 & Aly A. Farag 2 1 Computer & Systems Engineering Department, Ain Shams University, Cairo, Egypt 2 Electerical

Geometric Primitives and Geometric Primitives and TransformationsTransformations

Geometric Primitives and Geometric Primitives and TransformationsTransformations

• 3D Plane– ax+by+cz+d=0;

Derive the plane equation shown above.

Page 5: Computer Vision Lecture #2 Hossam Abdelmunim 1 & Aly A. Farag 2 1 Computer & Systems Engineering Department, Ain Shams University, Cairo, Egypt 2 Electerical

Transformation MatrixTransformation MatrixTransformation MatrixTransformation Matrix

• Translation (Example in 2D)

Page 6: Computer Vision Lecture #2 Hossam Abdelmunim 1 & Aly A. Farag 2 1 Computer & Systems Engineering Department, Ain Shams University, Cairo, Egypt 2 Electerical

Transformation MatrixTransformation MatrixTransformation MatrixTransformation Matrix

• Rotation Matrix (Example in 2D)

Page 7: Computer Vision Lecture #2 Hossam Abdelmunim 1 & Aly A. Farag 2 1 Computer & Systems Engineering Department, Ain Shams University, Cairo, Egypt 2 Electerical

Transformation MatrixTransformation MatrixTransformation MatrixTransformation Matrix

• Scaling Matrix (Example in 3D)

Page 8: Computer Vision Lecture #2 Hossam Abdelmunim 1 & Aly A. Farag 2 1 Computer & Systems Engineering Department, Ain Shams University, Cairo, Egypt 2 Electerical

Projective Transformation MatrixProjective Transformation MatrixProjective Transformation MatrixProjective Transformation Matrix

Page 9: Computer Vision Lecture #2 Hossam Abdelmunim 1 & Aly A. Farag 2 1 Computer & Systems Engineering Department, Ain Shams University, Cairo, Egypt 2 Electerical

Hierarchy of Coordinate Hierarchy of Coordinate TransformationsTransformations

Hierarchy of Coordinate Hierarchy of Coordinate TransformationsTransformations

*Homogeneous Scaling, rotation, and translation

*

Page 10: Computer Vision Lecture #2 Hossam Abdelmunim 1 & Aly A. Farag 2 1 Computer & Systems Engineering Department, Ain Shams University, Cairo, Egypt 2 Electerical

3D to 2D Projection3D to 2D Projection3D to 2D Projection3D to 2D Projection

Page 11: Computer Vision Lecture #2 Hossam Abdelmunim 1 & Aly A. Farag 2 1 Computer & Systems Engineering Department, Ain Shams University, Cairo, Egypt 2 Electerical

What do we need?What do we need?What do we need?What do we need?

we need to specify how 3D primitives (points) are projected onto the image plane. We can do this

using a linear 3D to 2D projection matrix.

Page 12: Computer Vision Lecture #2 Hossam Abdelmunim 1 & Aly A. Farag 2 1 Computer & Systems Engineering Department, Ain Shams University, Cairo, Egypt 2 Electerical

ExampleExampleExampleExample

Page 13: Computer Vision Lecture #2 Hossam Abdelmunim 1 & Aly A. Farag 2 1 Computer & Systems Engineering Department, Ain Shams University, Cairo, Egypt 2 Electerical

Geometric InterpretationGeometric InterpretationGeometric InterpretationGeometric Interpretation

Perspective v's Parallel (orthogonal) Projection

Page 14: Computer Vision Lecture #2 Hossam Abdelmunim 1 & Aly A. Farag 2 1 Computer & Systems Engineering Department, Ain Shams University, Cairo, Egypt 2 Electerical

Perspective Projection Matrix Perspective Projection Matrix EquationEquation

Perspective Projection Matrix Perspective Projection Matrix EquationEquation

Page 15: Computer Vision Lecture #2 Hossam Abdelmunim 1 & Aly A. Farag 2 1 Computer & Systems Engineering Department, Ain Shams University, Cairo, Egypt 2 Electerical

Para-Perspective ProjectionPara-Perspective ProjectionPara-Perspective ProjectionPara-Perspective Projection