A pyramid is a structure whose outer surfaces are triangular and converge to a single step at the top, making the shape roughly a pyramid in the geometric sense. The base of a pyramid can be trilateral, quadrilateral, or of any polygon shape. As such, a pyramid has at least three outer triangular surfaces. Wikipedia
पिरामिड जैसे ज्यामितीय आकार से मिलती जुलती संरचनाओं को पिरामिड कहते हैं। विश्व में बहुत सी संरचनाएँ पिरैमिड के आकार की हैं जिनमें मिस्र के पिरामिड बहुत प्रसिद्ध हैं। पिरामिड आकार की संरचनाओं की सबसे बड़ी विशेषता यह है कि इसके भार का अधिकांश भाग जमीन के पास होता हैA pyramid is a structure whose outer surfaces are triangular and converge to a single step at the top, making the shape roughly a pyramid in the geometric sense. The base of a pyramid can be trilateral, quadrilateral, or of any polygon shape. As such, a pyramid has at least three outer triangular surfaces. Wikipedia
पिरामिड जैसे ज्यामितीय आकार से मिलती जुलती संरचनाओं को पिरामिड कहते हैं। विश्व में बहुत सी संरचनाएँ पिरैमिड के आकार की हैं जिनमें मिस्र के पिरामिड बहुत प्रसिद्ध हैं। पिरामिड आकार की संरचनाओं की सबसे बड़ी विशेषता यह है कि इसके भार का अधिकांश भाग जमीन के पास होता है
2. • Most computer vision applications makes use of image processing operations to pre-
process the image and convert it into a form suitable for further analysis.
• Examples of such operations include
• Exposure correction
• Color balancing
• Reduction of image noise
• Increasing sharpness
• Straightening the image by rotating it
• Transformation: A function or operator that takes an image as its input, performs some
function on the image and produces an image as its output.
• Depending on the transform chosen, the input and output images may appear entirely
different and have different interpretations.
Introduction
Neetu Singla, NSUT
15. • Translation is shifting an image in coordinate space by adding a specified value to
the x- and y- coordinates.
• So, if you know the shift in (x,y) direction, then you can create transformation
matrix as follows:
What is Translation?
Neetu Singla, NSUT
u=1*x + 0*y +tx* 1
u = x + 0 + 100
u= x + 100
[1 0 0 1 1 ]
16. • Translation is shifting an image in coordinate space by adding a specified value to
the x- and y- coordinates.
• So, if you know the shift in (x,y) direction, then you can create transformation
matrix as follows:
What is Translation?
Neetu Singla, NSUT
(0,0)
(15,13)
17. • This technique rotates an image by a specified angle and by the given axis or
point.
• Rotation about the origin by an angle theta is given by:
What is Rotation?
Neetu Singla, NSUT
18. What is Scaling?
Neetu Singla, NSUT
• Scaling means resizing an image which means an image is made bigger or smaller
in x- or/and y- direction.
• We can resize an image in terms of scaling factor.
• If we have an image of size (300 x 400) and we want to transform it into an image
of shape (600 x 200).
• The scaling in x-direction will be: 600/300 = 2. (Sx =2)
• Similarily, Sy = 200/400 = ½.
19. • Shearing an image means shifting the pixels values either horizontally or
vertically.
• Basically, this shifts some part of an image to one direction and other part to
opposite direction.
• Horizontal shearing will shift the upper part to the right and lower part to the left.
• Here you can see in Figure that the upper part has shifted to the right and the
lower part to the left.
What is Shearing?
Neetu Singla, NSUT
20. • It is a combination of Translation and Rotation.
• Properties:
• Three degree of Freedom
• Two for Translation
• One for Rotation
• Distance remains preserved
• Angle remains preserved
• Shapes remains preserved
• Rectangle will remain rectangle
• Theta- Rotation we want to give
• tx – Translation in x-axis
• ty – Translation in y-axis
What is Euclidean Transform? (Isometric)
Neetu Singla, NSUT
21. • It is a combination of Translation, Rotation, Scaling and Shearing.
• An affine transformation is a transformation that preserves co-linearity and the
ratio of distances ( for example- the midpoint of a line segment is still the
midpoint even after the transformation)
• The parallel lines in the original image will be parallel in the output image.
What is Affine Transform?
Neetu Singla, NSUT
Three control points are needed for
generating Transformation Matrix
22. • Changes the view point.
• The projective transform can handle changes caused by a tilt of the image plane relative
to the object plane.
• A projective transformation shows how the perceived objects change as the observer's
viewpoint changes. These transformations allow the creating of perspective distortion.
Affine transformations are used for scaling, skewing and rotation.
• Projective transformations do not preserve parallelism, length, and angle.
What is Projective Transform?
Neetu Singla, NSUT
26. Assignment
a. Read an image into a variable.
b. Display the image.
c. Convert the image to grayscale.
d. Check the height and width of the image.
e. Extract R, G, B Channels. (BGR)
f. Extract the middle 100 pixels from the greyscale image.
g. Write a pair of nested "for" loops to set a grid of every 10th pixel horizontally and every
20th pixel vertically to 0.
h. Flip the image vertically. Then show the original and the flipped image side-by-side.
i. Write the combined image back to a new file.