Lecture-4
Lecture-4
Presented By
Dr. Yin Win Chit
Associate Professor
Geometric primitives
Geometric primitives are the basic building blocks used in computer graphics, computer
vision, and computational geometry.
These simple shapes and objects form the foundation for modeling more complex
structures and scenes.
• Some people prefer to consider triangles primitives, because every polygon can be
constructed from triangles.
Example:
If X = (3.5, -2) , x=3.5 , y=-2 , Therefore (3.5, -2) € R
2D lines
R
X
R 5
𝟏𝟎
R 𝒇 : 𝑹× 𝑹⇒ 𝑹
5
𝟎
Y 10 5
(R, G, B)
( 𝒂) 𝒇 : 𝑹 × 𝑹 × 𝑹 ⇒ 𝑹
3
( 𝒄 ) 𝒇 : 𝑹× 𝑹× 𝑹⇒ 𝑹× 𝑹× 𝑹
( 𝒅 ) 𝒇 : 𝑹× 𝑹⇒ 𝑹× 𝑹× 𝑹
channels or planes Ans: b and d
Compute image size
X
30
Y height 215
3 colors
245
45150
10 220
width 210 area 45150
Digital Images
• In computer vision we typically operate on digital (discrete) images:
• Sample the 2D space on regular grid
• Quantize each sample (round to nearest integer)
• Image thus represented as a matrix of integer values.
Quantize an image
Quantize an image
Quantize an image
2.6 -1.2 4 8 2 0 4 5
What is the equation used to obtain I(Intensity) component of each RGB pixel in RGB
color format?
a) I=1/2(R+G+B)
b) I=1/3(R+G+B)
c) I=1/3(R-G-B)
d) I=1/3(R-G+B)
Ans: b
Quiz
Ans: a
Let's summarize:
• Which are basic geometric primitives
• Color channels and image size calculation
• How computer see the images
Lecture End!