Reference Detail For Chapter - 2 Topic Text Reference Chapter No. Page No
Reference Detail For Chapter - 2 Topic Text Reference Chapter No. Page No
Chapter 2
Basic Relationships between pixels, Geometric Transformation and Pin hole Camera
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].
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)
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
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.
33
2.4.3 Scaling
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.
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