0% found this document useful (0 votes)
29 views11 pages

Reference Detail For Chapter - 2 Topic Text Reference Chapter No. Page No

This document provides an overview of chapter 2 from a computer vision course textbook. It discusses [1] basic relationships between pixels such as coordinates, resolution, and neighbors; [2] common geometric transformations including translation, rotation, scaling, reflection, and shear; and [3] the pinhole camera model which describes the mathematical mapping from 3D scenes to 2D images.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views11 pages

Reference Detail For Chapter - 2 Topic Text Reference Chapter No. Page No

This document provides an overview of chapter 2 from a computer vision course textbook. It discusses [1] basic relationships between pixels such as coordinates, resolution, and neighbors; [2] common geometric transformations including translation, rotation, scaling, reflection, and shear; and [3] the pinhole camera model which describes the mathematical mapping from 3D scenes to 2D images.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Computer Vision

Course Code: 234CS

Chapter 2
Basic Relationships between pixels, Geometric Transformation and Pin hole Camera

Subject Coordinator: Dr. Gran Badshah


Subject Teacher: Mrs. Mariyam Aysha Bivi
Lecturer,
Department of Computer Science,
King Khalid University
Abha,KSA

REFERENCE DETAIL FOR CHAPTER - 2


Topic Text Reference Chapter No. Page No
Basic relationships between pixels, Neighborhood, II Chapter 2 66,67
Connectivity

2D Geometric Transformations, Camera Models. I Chapter 1 1


Chapter 6 158
27
2.1 Basic Relationships between pixels
There are important relationships between pixels in a digital image.
A digital image is denoted by f(x, y).

 The coordinates (x, y) are discrete spatial quantities.


 The values of the coordinates at the origin are (x, y)=(0, 0). The next coordinate values along the first row
of the image are represented as (x, y)=(0, 1).
 Each element of this matrix array is called an image element, picture element, pixel, or pel.

 This image has a spatial resolution of M*N pixels and a gray-level resolution of L gray levels.
 L=2k is the number of discrete gray levels from [0, L-1].

 k is the number of binary bits required to store a gray level.


 When an image can have 2k gray levels, it is common practice to refer to the image as a “k-bit
image.”
 For example, an image with 256 possible gray-level values is called an 8-bit image.

28
2.2 Neighbors of a Pixel:
 A pixel p at coordinates (x, y) has two horizontal and two vertical neighbors whose
coordinates are given by
(x+1, y), (x-1, y), (x, y+1), (x, y-1)

 This set of pixels, called the 4-neighbors of p, is denoted by N4(p).

 Each pixel is a unit distance from (x, y).


 Some of the neighbors of p lie outside the digital image if (x, y) is on the border of
the image.

29
The four diagonal neighbors of p have coordinates
(x+1, y+1), (x+1, y-1), (x-1, y+1), (x-1, y-1)
and are denoted by ND(p).

8-neighbors of p
 four diagonal neighbors of p, together with the 4-vertical and horizontal neighbors,
are called the 8-neighbors of p, denoted by N8(p).
 Some of the points in ND(p) and N8(p) fall outside the image if (x, y) is on the
border of the image.

30
2.3 Connectivity:
 Let V be the set of gray-level values used to define adjacency.
 In a binary image, V={1} if we are referring to adjacency of pixels with value 1. In a grayscale
image, the idea is the same, but set V typically contains more elements.

 For example, in the adjacency of pixels with a range of possible gray-level values
0 to 255, set V could be any subset of these 256 values.

 4-conneceted. Two pixels p and q with values from V are 4-connected if q is in the set N4(p).

 8- conneceted. Two pixels p and q with values from V are 8- connected if q is in the set N8(p).

31
2.4 Basic Geometric Transformations:
 Geometric Transformation is an operation which alters the position, size and shape of an object.
 It includes translation, rotation, scaling, reflection, shear etc.
 These transformations are very important in the fields of Computer Graphics and Computer
Vision.
 Basic transformations are translation, rotation, scaling.

2.4.1 Translation

 It is an operation which alters the position of an object.


 It moves every point of the object by a fixed distance in the same direction.
 Equation of translation is defined by
x' = x +tx
y' = y +ty
 where (x , y) is the initial co-ordinates and (x’, y’) is the output co-ordinates and tx and ty are the
translation distances respectively in x and y directions.
 The homogenous matrix representation for translation is defined by

32
2.4.2 Rotation

 A rotation is a transformation that is performed by spinning the object around a fixed point
known as center of rotation (the pivot).

 The object can be rotated at any degree. The rotations are done counter-clockwise for
positive rotations and vice-versa.

 Equation of Rotation is defined by

 The homogenous matrix representation for rotation is defined by

33
2.4.3 Scaling

 It is an operation which alters the size of an object.

 Equation of Scaling is defined by


x' = x . Sx y' = y . Sy

 where (x , y) is the initial co-ordinates and (x’, y’) is the output co-ordinates and Sx and Sy
are the scaling factors respectively in x and y directions.

o If Sx = Sy > 1, the scaling is enlargement.

o If Sx = Sy < 1, the scaling is compression

34
2.4.4 Reflection

 It is an operation which gives the mirror effect to an object with respect to axis.

2.4.5 Shear

 It is an operation which rotates one of the axis of the object so that both axes are not perpendicular.
 After shear a rectangle becomes a parallelogram and a circle becomes an ellipse

35
2.5 Pin Hole camera model
 The pinhole camera model also known as dark chamber is a simple optical imaging device.

 It describes the mathematical relationship between the co-ordinates of a 3D point and its
projection onto the 2D image plane.

 An ideal pinhole camera is a light proof box, the camera aperture is described as a point and no
lenses are used to focus light.

 Light from a scene passes through this point and projects an inverted image on the opposite
side of the box.

 The model does not include, for example, geometric distortions or blurring of unfocused
objects caused by lenses and finite sized apertures.

 It also does not take into account that most practical cameras have only discrete image
coordinates.

 This means that the pinhole camera model can only be used as a first order approximation of
the mapping from a 3D scene to a 2D image.

 Its validity depends on the quality of the camera and, in general, decreases from the center of
the image to the edges as lens distortion effects increase.

36
37

You might also like