Lecture # 2: Module # 1 Title: Introduction To Image Processing
Lecture # 2: Module # 1 Title: Introduction To Image Processing
Lecture # 2
Module # 1
Title: Introduction to image processing.
Explanation:
An image may be defined as a 2-D function f(x, y), where x and y are spatial (time or
plane) co-ordinates and the amplitude ‘f’ at any pair of coordinates (x,y) is called the intensity or
gray level of the image at that point. When f, x and y are finite and discrete, we can call the
image a digital one.
Digital image processing refers to the manipulation of an image by means of a processor.
Image acquisition:
o Involves pre-processing such as scaling.
Image enhancement:
o A subjective quality improvement process.
o Brings out the details that are obscured or simply highlight certain features of
interest in an image.
Image restoration:
o For improving the appearance of an image.
o It is an objective quality improvement process in the sense that restoration
techniques tend to be based on mathematical or probabilistic models of image
degradation.
EC370/DIP 1
Lecture Note
EC370/DIP 2
Lecture Note
Questions:
1. Define digital image processing.
2. Explain the different steps involved in digital image processing.
References:
1. “Digital image processing”, by Gonzalez and Woods. 3rd ed. (Page no: 25-27)
EC370/DIP 3
Lecture Note
Lecture # 3
Module # 1
Title: Elements/Components of an image processing system
Explanation:
With reference to sensing, two elements are required to acquire digital images. The first
is a physical device that is sensitive to the energy radiated by the object we wish to
image. The second, called a digitizer, is a device for converting the output of the physical
sensing device into digital form. For instance, in a digital video camera, the sensors
produce an electrical output proportional to light intensity. The digitizer converts these
outputs to digital data.
Specialized image processing hardware usually consists of the digitizer just mentioned,
plus hardware that performs other primitive operations, such as an arithmetic logic unit
(ALU), which performs arithmetic and logical operations in parallel on entire images.
One example of how an ALU is used is in averaging images as quickly as they are
digitized, for the purpose of noise reduction. This type of hardware sometimes is called a
front-end subsystem, and its most distinguishing characteristic is speed. In other words,
EC370/DIP 4
Lecture Note
this unit performs functions that require fast data throughputs (e.g., digitizing and
averaging video images at 30 framess) that the typical main computer cannot handle.
The computer in an image processing system is a general-purpose computer and can
range from a PC to a supercomputer. In dedicated applications, some times specially
designed computers are used to achieve a required level of performance, but our interest
here is on general-purpose image processing systems. In these systems, almost any well
equipped PC-type machine is suitable for offline image processing tasks.
Software for image processing consists of specialized modules that perform specific
tasks. A well-designed package also includes the capability for the user to write code that,
as a minimum, utilizes the specialized modules. More sophisticated software packages
allow the integration of those modules and general-purpose software commands from at
least one computer language.
Mass storage capability is a must in image processing applications. An image of size
1024*1024 pixels, in which the intensity of each pixel is an 8-bit quantity, requires one
megabyte of storage space if the image is not compressed. When dealing with thousands,
or even millions, of images, providing adequate storage in an image processing system
can be a challenge. Digital storage for image processing applications falls into three
principal categories: (1) short-term storage for use during processing, (2) on-line storage
for relatively fast re-call, and (3) archival storage, characterized by infrequent access.
Image displays in use today are mainly color (preferably flat screen) TV monitors.
Monitors are driven by the outputs of image and graphics display cards that are an
integral part of the computer system. Seldom are there requirements for image display
applications that cannot be met by display cards available commercially as part of the
computer system. In some cases, it is necessary to have stereo displays, and these are
implemented in the form of headgear containing two small displays embedded in goggles
worn by the user.
Hardcopy devices for recording images include laser printers, film cameras, heat-
sensitive devices, inkjet units, and digital units, such as optical and CD-ROM disks. Film
provides the highest possible resolution, but paper is the obvious medium of choice for
written material. For presentations, images are displayed on film transparencies or in a
digital medium if image projection equipment is used. The latter approach is gaining
acceptance as the standard for image presentations.
Networking is almost a default function in any computer system in use today. Because of
the large amount of data inherent in image processing applications, the key consideration
in image transmission is bandwidth. In dedicated networks, this typically is not a
problem, but communications with remote sites via the Internet are not always as
efficient. Fortunately, this situation is improving quickly as a result of optical fiber and
other broadband technologies.
EC370/DIP 5
Lecture Note
Questions:
1. Explain the elements of a digital image processing system.
References:
EC370/DIP 6
Lecture Note
Lecture # 4
Module # 1
Title: Brightness, contrast, hue, saturation, mach band effect
Explanation:
Brightness:
Digital images are displayed as a discrete set of intensities. The eye’s ability to discriminate
between different intensity levels is an important consideration in presenting image-processing
results. The range of light intensity levels to which the human visual system can adapt is
enormous—on the order of 1010—from the scotopic threshold to the glare limit. Experimental
evidence indicates that subjective brightness (intensity as perceived by the human visual
system) is a logarithmic function of the light intensity incident on the eye. Brightness is an
attribute of visual perception in which a source appears to be radiating or reflecting light. In
other words, brightness is the perception elicited by the luminance of a visual target. It is not
necessarily proportional to luminance. This is a subjective attribute/property of an object being
observed and one of the color appearance parameters of color appearance models.
Contrast:
Contrast is the difference in luminance or colour that makes an object (or its representation in an
image or display) distinguishable. In visual perception of the real world, contrast is determined
by the difference in the color and brightness of the object and other objects within the same field
of view. Contrast is the relative brightness of an object with respect to other.
As an example, consider the following figure. All the inner squares have the same
intensity, but they appear progressively darker as the background becomes lighter.
Hue:
This is the predominant spectral color in the light. Hue is one of the main properties (called color
appearance parameters) of a color, defined technically, as "the degree to which a stimulus can be
described as similar to or different from stimuli that are described as red, green, blue and yellow"
Saturation:
Saturation indicates the spectral purity of the color in the light. That means amount of white light
in a colour. It is the "colorfulness of an area judged in proportion to its brightness",[6][2] which
EC370/DIP 7
Lecture Note
in effect is the perceived freedom from whitishness of the light coming from the area.[7] A note
accompanying this definition in effect indicates that an object with a given spectral reflectance
exhibits approximately constant saturation for all levels of illumination, unless the brightness is
very high.
The visual system tends to undershoot or overshoot around the boundary of regions of different
intensities. Above figure shows an example of this phenomenon. Although the intensity of the
stripes is constant, we actually perceive a brightness pattern that is strongly scalloped, especially
near the boundaries. These seemingly scalloped bands are called Mach bands after Ernst Mach,
who first described the phenomenon in 1865.
Questions:
1. Define the following.
a) Brightness
EC370/DIP 8
Lecture Note
b) Contrast
c) Hue
d) Saturation
e) Mach band effect
References:
EC370/DIP 9
Lecture Note
Lecture # 5
Module # 1
Title: Elements of visual perception-simple image formation model
Explanation:
Digital images can be represented by two-dimensional functions of the form f(x, y). The value or
amplitude of f at spatial coordinates (x, y) is a positive scalar quantity whose physical meaning is
determined by the source of the image. Most of the images in which we are interested in this
book are monochromatic images, whose values are said to span the gray scale. When an image is
generated from a physical process, its values are proportional to energy radiated by a physical
source (e.g., electromagnetic waves). As a consequence, f(x, y) must be nonzero and finite; that
is,
0 < 𝑓(𝑥, 𝑦) < ∞
The function f(x, y) may be characterized by two components:
(1) The amount of source illumination incident on the scene being viewed, and
(2) The amount of illumination reflected by the objects in the scene.
Appropriately, these are called the illumination and reflectance components and are denoted by
i(x, y) and r(x, y), respectively. The two functions combine as a product to form f(x, y):
𝑓(𝑥, 𝑦) = 𝑖(𝑥, 𝑦)𝑟(𝑥, 𝑦)
Where
0 < 𝑖(𝑥, 𝑦) < ∞
EC370/DIP 10
Lecture Note
And
0 < 𝑟(𝑥, 𝑦) < 1
The above equations indicate that reflectance is bounded by 0 (total absorption) and 1 (total
reflectance).The nature of i(x, y) is determined by the illumination source, and r(x, y) is
determined by the characteristics of the imaged objects. It is noted that these expressions also are
applicable to images formed via transmission of the illumination through a medium, such as a
chest X-ray.
Questions:
1. Explain a simple image formation model.
References:
EC370/DIP 11
Lecture Note
Lecture # 6
Module # 1
Title: Vidicon and Digital Camera working principles
Explanation:
Construction
The Vidicon consists of a glass envelope with an optically flat face plate as shown in
figure.
A photosensitive, target plate is available on the inner side of the face plate. The target
plate has two layers. To the front, facing the face plate, is a thin layer of tin oxide. This is
transparent to light but electrically conductive. The other side of the target plate is coated
with a semiconductor, photosensitive antimony trisulphide. The tin oxide layer is
connected to a power supply of 50V.
Grid-1 is the electron gun, consisting a cathode and a control grid.
The emitted electrons are accelerated by Grid-2.
The accelerated electrons are focussed on the photo conductive layer by Grid-3.
Vertical and Horizontal deflecting coils, placed around the tube are used to deflect the
electron beam for scanning the target.
EC370/DIP 12
Lecture Note
Working
The light from a scene is focussed on the target. Light passes through the face plate and
tin oxide, incident on the photo conductive layer. Due to the variations in the light
intensity of the scene, the resistance of the photo conductive layer varies.
The emitted electrons from antimony trisulphide reach the positive tin oxide layer. So,
each point on the photo conductive layer acquires positive charge. Hence, a charge image
that corresponds to the incident optical image is produced.
As the electron beam from the gun is incident on the charge image, drop in voltage takes
place. As a result, a varying current is produced. This current produces the video-signal
output of the camera.
Digital camera
The digital camera can be considered as an alteration of the conventional analog camera. Most of
the associated components are also the same, except that instead of light falling on a
photosensitive film like an analog camera, image sensors are used in digital cameras.
The basic components are all the same for both analog and digital cameras. But, the only
difference is that the images received in an analog camera will be printed on a photographic
paper
This difficulty is not seen in digital photos. The photos from a digital camera are already in the
digital format which the computer can easily recognize (0 and 1). The 0’s and 1’s in a digital
camera are kept as strings of tiny dots called pixels.
The image sensors used in an digital can be either a Charge Coupled Device (CCD) or a
Complimentary Metal Oxide Semi-conductor (CMOS). CCD is used to convert a electrical
signal into a digital signal. The image sensor is basically a micro-chip with a width of about
10mm. The chip consists of arrays of sensors, which can convert the light into electrical charges.
Though both CMOS and CCD are very common, CMOS chips are known to be more cheaper.
But for higher pixel range and costly cameras mostly CCD technology is used.
A digital camera has lens/lenses which are used to focus the light that is to be projected and
created. This light is made to focus on an image sensor which converts the light signals into
electric signals. The light hits the image sensor as soon as the photographer hits the shutter
button. As soon as the shutter opens the pixels are illuminated by the light in different intensities.
Thus an electric signal is generated. This electric signal is then further broke down to digital data
and stored in a computer.
EC370/DIP 13
Lecture Note
The clarity of the photos taken from a digital camera depends on the resolution of the camera.
This resolution is always measured in the pixels. If the numbers of pixels are more, the resolution
increases, thereby increasing the picture quality. There are many type of resolutions available for
cameras. They differ mainly in the price.
256×256 – This is the basic resolution a camera has. The images taken in such a resolution
will look blurred and grainy. They are the cheapest and also unacceptable.
640×480 – This is a little more high resolution camera than 256×256 type. Though a clearer
image than the former can be obtained, they are frequently considered to be low end. These
type of cameras are suitable for posting pics and images in websites.
1216×912 – This resolution is normally used in studios for printing pictures. A total of
1,109,000 pixels are available.
1600×1200 – This is the high resolution type. The pictures are in their high end and can be
used to make a 4×5 with the same quality as that you would get from a photo lab.
2240×1680 – This is commonly referred to as a 4 megapixel cameras. With this resolution
you can easily take a photo print up to 16×20 inches.
4064×2704 – This is commonly referred to as a 11.1 megapixel camera. 11.1 megapixels
takes pictures at this resolution. With this resolution you can easily take a photo print up to
13.5×9 inch prints with no loss of picture quality.
There are even higher resolution cameras up to 20 million pixels or so.
The sensors used in digital cameras are actually coloured blind. All it knows is to keep a track of
the intensity of light hitting on it. To get the colour image, the photosites use filters so as to
obtain the three primary colours. Once these colours are combined the required spectrum is
obtained.
For this, a mechanism called interpolation is carried out. A colour filter array is placed over each
individual photosite. Thus, the sensor is divided into red, green and blue pixels providing
accurate result of the true colour at a particular location. The filter most commonly used for this
process is called Bayer filter pattern. In this pattern an alternative row of red and green filters
with a row of blue and green filters. The number of green pixels available will be equal to the
number of blue and red combined. It is designed in a different proportion as the human eye is not
equally sensitive to all three colours. Our eyes will percept a true vision only if the green pixels
are more.
The main advantage of this method is that only one sensor is required for the recording of all the
colour information. Thus the size of the camera as well as its price can be lessened to a great
extent. Thus by using a Bayer Filter a mosaic of all the main colours are obtained in various
intensities. These various intensities can be further simplified into equal sized mosaics through a
method called demosaicing algorithms. For this the three composite colours from a single pixel
are mixed to form a single true colour by finding out the average values of the closest
surrounding pixels.
EC370/DIP 14
Lecture Note
Like a film camera, a digital camera also has certain parameters. These parameters decide the
clarity of the image. First of all the amount of light that enters through the lens and hits the
sensor has to be controlled. For this, the parameters are
1. Aperture – Aperture refers to the diameter of the opening in the camera. This can be set in
automatic as well as the manual mode. Professionals prefer manual mode, as they can bring
their own touch to the image.
2. Shutter Speed – Shutter speed refers to the rate and amount of light that passes through the
aperture. This can be automatic only. Both the aperture and the shutter speed play important
roles in making a good image.
3. Focal Length – The focal length is a factor that is designed by the manufacturer. It is the
distance between the lens and the sensor. It also depends on the size of the sensor. If the size
of the sensor is small, the focal length will also be reduced by a proportional amount.
4. Lens – There are mainly four types of lenses used for a digital camera. They differ according
to the cost of the camera, and also focal length adjustment. They are
Fixed-focus, fixed-zoom lens – They are very common and are used in inexpensive
cameras.
EC370/DIP 15
Lecture Note
Optical-zoom lenses with automatic focus – These are lenses with focal length adjustments.
They also have the “wide” and “telephoto” options.
Digital zoom – Full-sized images are produced by taking pixels from the centre of the
image sensor. This method also depends on the resolution as well as the sensor used in the
camera.
Replaceable lens systems – Some digital cameras replace their lenses with 35mm camera
lenses so as to obtain better images.
The picture quality obtained in a film camera is much better than that in a digital camera.
The rise of technology has made filming the help of digital techniques easier as well as
popular.
Since the digtal copy can be posted in websites, photos can be sent to anyone in this world.
Questions:
1. Explain the working principle of a Vidicon camera
2. Explain the working of a digital camera.
References:
EC370/DIP 16
Lecture Note
Lecture # 7 and 8
Module # 1
Title: Colour image fundamentals-RGB, CMY, HIS models
Explanation:
The human visual system can distinguish hundreds of thousands of different colour shades and
intensities, but only around 100 shades of grey. Therefore, in an image, a great deal of extra
information may be contained in the colour, and this extra information can then be used to
simplify image analysis, e.g. object identification and extraction based on colour.
Three independent quantities are used to describe any particular colour. The hue is determined
by the dominant wavelength. Visible colours occur between about 400nm (violet) and 700nm
(red) on the electromagnetic spectrum, as shown below
EC370/DIP 17
Lecture Note
EC370/DIP 18
Lecture Note
Colour Models
Colour models provide a standard way to specify a particular colour, by defining a 3D coordinate
system, and a subspace that contains all constructible colours within a particular model. Any
colour that can be specified using a model will correspond to a single point within the subspace it
defines. Each colour model is oriented towards either specific hardware (RGB,CMY,YIQ) or
image processing applications (HSI).
RGB (red, green, blue) model for color monitors and a board class of color video cameras.
CMY (cyan, magenta, yellow) and CMYK (cyan, magenta, yellow, black) models for color
printing.
HIS (hue, saturation, intensity) model, which corresponds closely with the way humans
describe and interpret color. The HIS model also has the advantage that it decouples the color
and gray-scale information in an image, making it suitable for many of the gray-scale
techniques.
RGB Model
In the RGB model, an image consists of three independent image planes, one in each of the
primary colours: red, green and blue. (The standard wavelengths for the three primaries are
as shown in above figure).
EC370/DIP 19
Lecture Note
Specifying a particular colour is by specifying the amount of each of the primary components
present. Figure shows the geometry of the RGB colour model for specifying colours using a
Cartesian coordinate system.
The greyscale spectrum, i.e. those colours made from equal amounts of each primary, lies on
the line joining the black and white vertices.
RGB image in which each of the red, green, and blue images is an 8-bit image.
The term full-color image is used often to denote a 24-bit RGB color image.
This is an additive model, i.e. the colours present in the light add to form new colours, and is
appropriate for the mixing of coloured light for example.
The RGB model is used for colour monitors and most video cameras.
CMY Model
black to get a particular colour, the CMY model asks what is subtracted from white. In this case,
the primaries are cyan, magenta and yellow, with red, green and blue as secondary colours.
𝐶 1 𝑅
[𝑀] = [1] − [𝐺 ]
𝑌 1 𝐵
HIS model
When humans view a color object, we describe it by its hue, saturation, and brightness.
Whereas saturation gives a measure of the degree to which a pure color is diluted by white
light.
Brightness is a subjective descriptor that is practically impossible to measure. It embodies the
achromatic notion of intensity and is one of the key factors in describing color sensation.
EC370/DIP 21
Lecture Note
The HSI color space is very important and attractive color model for image processing
applications because it represents color s similarly how the human eye senses colors.
The HSI color model represents every color with three components: hue (H), saturation (S),
intensity (I). The below figure illustrates how the HIS color space represents colors.
EC370/DIP 22
Lecture Note
The Hue component describes the color itself in the form of an angle between [0,360]
degrees. 0 degree mean red, 120 means green and 240 means blue. 60 degrees is yellow, 180
degrees for cyan and 300 degrees is magenta.
The Saturation component signals how much the color is polluted with white color. The
range of the S component is [0, 1].
The Intensity range is between [0, 1] and 0 means black, 1 means white.
As the above figure shows, hue is more meaningful when saturation approaches 1 and less
meaningful when saturation approaches 0 or when intensity approaches 0 or 1. Intensity also
limits the saturation values.
Formula that converts from RGB to HSI colour model is given by
Questions:
1. Explain the following colour models.
a) RGB color model
b) CMY color model
c) HIS or HIS color model
References:
EC370/DIP 23