Group 1-Intruduction and Digital Image Fundamental
Group 1-Intruduction and Digital Image Fundamental
An Assignment
On
Introduction and Digital Image Fundamentals (Chapter 1-2)
Submitted To
Sohely Jahan
Lecturer,
Department Of Computer Science and Engineering
University of Barishal
Submitted By
Group (1)
It is the manipulation of the digital data with the help of computer hardware and
software to produce digital maps in which the specific information has been extracted
and highlighted.
Digital image processing deals with manipulation of digital images through a digital
computer. It is a subfield of signals and systems but focus particularly on images. DIP
focuses on developing a computer system that is able to perform processing on an
image.
Image processing is a method to perform some operations on an image, in order to get
an enhanced image or to extract some useful information from it. It is a type of signal
processing in which input is an image and output may be image or
characteristics/features associated with that image.
Digital Image Processing provides a platform to perform various operations like image
enhancing, processing of analog and digital signals, image signals, voice signals etc.
2. Image Enhancement
Image enhancement is among the simplest and most appealing areas of digital image processing.
Basically, the idea behind enhancement techniques is to bring out detail that is obscured, or
simply to highlight certain features of interest in an image. Such as changing brightness &
contrast etc.
7. Morphological Processing
Morphological processing deals with tools for extracting image components that are useful in the
representation and description of shape.
8. Segmentation
Segmentation procedures partition an image into its constituent parts or objects. In general,
autonomous segmentation is one of the most difficult tasks in digital image processing. A rugged
segmentation procedure brings the process a long way toward successful solution of imaging
problems that require objects to be identified individually.
Fig.9. An example of Segmentation in DIP
Image Sensors
It refers to sensing.
An image sensor is a 2D array of light-sensitive elements that convert photons into electrons.
Image sensors have two elements that are required to capture digital images.
The first is a physical device (sensor) that is sensitive to the energy radiated by the object we wish
to convert to image.
CCD (Charged Coupled Device) and CMOS (Complementary Metal-Oxide Conductor) image
sensors are widely used in image-capturing devices like digital cameras.
It consists of the digitizer and hardware that performs primitive operations, such as an
Arithmetic Logic Unit (ALU), which performs arithmetic and logical operations in
parallel on entire images.
This type of hardware sometimes is called a frontend subsystem, and its most
distinguishing characteristic is speed. In other words, this unit performs functions that
require fast data throughputs that the typical main computer cannot handle.
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.
Example: Photoshop, GIMP(GNU Image Manipulation Program), Fireworks, Pixelmator
and Inkscape.
Fig.13. Photoshop
Computer
The computer in an image processing system is a general-purpose computer and
can range from a PC to a supercomputer.
In dedicated applications, sometimes specially designed computers are used to
achieve a required level of performance.
Mass Storage
Mass storage refers to the storage of a large amount of data in persisting and machine-readable
fashion.
The mass storage capability is a must in image processing applications.
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 recall.
3. Archival storage, characterized by infrequent access.
Image Display
Used for recording images, include laser printers, film cameras, heat-sensitive devices, inkjet
units and digital units, such as optical and CD-Rom disks.
Image Display
Image display is the final link in the digital image processing chain.
Image displays are mainly colored TV monitors.
Networking
The analog image processing is applied on analog The digital image processing is applied to
signals and it processes only two-dimensional digital signals that work on analyzing and
signals. manipulating the images.
Analog signal is time-varying signals so the It improves the digital quality of the image
images formed under analog image processing get and intensity distribution is perfect in it.
varied.
Analog image processing is a slower and costlier Digital image processing is a cheaper and fast
process. image storage and retrieval process.
Analog signal is a real-world but not good quality It uses good image compression techniques
of images. that reduce the amount of data required and
produce good quality of images
Difference between the Analog signals and Digital signals
Analog signals are difficult to get analysed at Digital signals are easy to analyse.
first.
Analog signals are more accurate than digital Digital signals are less accurate.
signals.
Analog signals take time to be stored. It has Digital signals can be easily stored.
infinite memory.
To record an analog signal, the technique In recording digital signal, the sample signals are
used, preserves the original signals. taken and preserved.
Analog signals produce too much noise. Digital signals do not produce noise.
Examples of analog signals are Human voice, Examples of digital signals are Computers, Digital
Thermometer, Analog phones etc. Phones, Digital pens, etc.
Dimensions of image
Image dimensions have the length and width of a digital image. It does not have depth. An image
is measured in pixels. An image is only of 2-dimensional that is why an image is defined as a 2-
dimensional signal. Many graphics programmers view and work image in inches or centimeters.
Depending on the plane, size of the image can be changed.
The same concept is used on television. For example, if we a playing a video, then it is nothing
but 2-dimensional pictures moving over the time dimension. As 2-dimensional objects are
moving on 3rd dimension object, then we can say it is a three dimensional.
Different dimensions of signals
1-Dimension Signal
A noisy voice signal is an example of 1 dimension signal. In maths, it can be represented as:
F(x)=waveform
A question arises here that as it is a one-dimensional signal then why it has two axes?
Even, it is a one-dimensional signal but drawn on two-dimensional space. Or we can say that to
represent 1-dimensional signal we have used 2-dimensional space.
2-Dimension Signal
Any object which has length and height comes under 2-dimension signal. It has two independent
variables. In math’s, it can be represented as:
F (x, y) = Object
For example, below picture is a 2-dimensional signal of coordinates X and Y. At each point, an
intensity value is given and mapped on the computer screen known as 2-dimensional images.
3-Dimension Signal
Any object which has length and height and depth comes under 3-dimension signal. It has three
independent variables: In math, it can be represented as:
4-Dimension Signal
Any object which has length, height, depth and time comes under 4-dimension signal. It has four
independent variables. In math, it can be represented as:
In reality, animated movies are 4D in which 3 dimensions are used and the 4th dimension is
time. In animated movies, each character is 3D and moves with respect to the time.
Pixel
Pixel is the smallest element of an image. Each pixel correspond to any one value. In an 8-bit gray scale
image, the value of the pixel between 0 and 255. The value of a pixel at any point correspond to the intensity
of the light photons striking at that point. Each pixel store a value proportional to the light intensity at that
particular location.
PEL
A pixel is also known as PEL. You can have more understanding of the pixel from the pictures given below.
In the above picture, there may be thousands of pixels, that together make up this image. We will zoom that
image to the extent that we are able to see some pixels division. It is shown in the image below.
In the above picture, there may be thousands of pixels, that together make up this image. We will zoom that
image to the extent that we are able to see some pixels division. It is shown in the image below.
Or we can say that the number of (x,y) coordinate pairs make up the total number of pixels. We will look in
more detail in the tutorial of image types , that how do we calculate the pixels in a color image.
Gray level
The value of the pixel at any point denotes the intensity of image at that location, and that is also known as
gray level. We will see in more detail about the value of the pixels in the image storage and bits per pixel
tutorial, but for now we will just look at the concept of only one pixel value.
Pixel value
As it has already been define in the beginning of this tutorial, that each pixel can have only one value and
each value denotes the intensity of light at that point of the image. We will now look at a very unique value 0.
The value 0 means absence of light. It means that 0 denotes dark, and it further means that whenever a pixel
has a value of 0, it means at that point , black color would be formed.
0 0 0
0 0 0
0 0 0
Now this image matrix has all filled up with 0. All the pixels have a value of 0. If we were to calculate the
total number of pixels form this matrix , this is how we are going to do it.
=3X3
= 9.
Bits in mathematics:
If we devise a formula for the calculation of total number of combinations that can be made from bit , it
would be like this.
Where, bpp denotes bits per pixel. Put 1 in the formula you get 2, put 2 in the formula , you get 4. It grows
exponentially.
Now as we said it in the beginning, that the number of different colors depend on the number of bits per pixel.
Shades
You can easily notice the pattern of the exponential growth. The famous gray scale image is of 8 bpp , means it
has 256 different colors in it or 256 shades. hades can be represented as:
Color images are usually of the 24 bpp format , or 16 bpp. We will see more about other color formats and image
types in the tutorial of image types.
After the discussion of bits per pixel , now we have every thing that we need to calculate a size of an image.
Number of rows
Number of columns
The formula for calculating the size is given below. Size of an image = rows * cols * bpp. It means that if you
have an image, lets say this one:
Assuming it has 1024 rows and it has 1024 columns. And since it is a gray scale image , it has 256 different
shades of gray or it has bits per pixel. Then putting these values in the formula , we get
= 1024 * 1024 * 8
= 8388608 bits.
But since its not a standard answer that we recognize , so will convert it into our format.
1. Structure of Eye
2. Image Formation in the Eye
3. Brightness Adaptation and Discrimination
Structure of Eye
The human eye is a slightly asymmetrical sphere with an average diameter of the length of
20mm to 25mm. It has a volume of about 6.5cc. The eye is just like a camera. The external
object is seen as the camera take the picture of any object. Light enters the eye through a small
hole called the pupil, a black looking aperture having the quality of contraction of eye when
exposed to bright light and is focused on the retina which is like a camera film.
The lens, iris, and cornea are nourished by clear fluid, know as anterior chamber. The fluid
flows from ciliary body to the pupil and is absorbed through the channels in the angle of the
anterior chamber. The delicate balance of aqueous production and absorption controls pressure
within the eye.
Cones in eye number between 6 to 7 million which are highly sensitive to colors. Human
visualizes the colored image in daylight due to these cones. The cone vision is also called as
photopic or bright-light vision.
Rods in the eye are much larger between 75 to 150 million and are distributed over the retinal
surface. Rods are not involved in the color vision and are sensitive to low levels of
illumination.
Image Formation in the Eye
When the lens of the eye focus an image of the outside world onto a light-sensitive membrane in the
back of the eye, called retina the image is formed. The lens of the eye focuses light on the
photoreceptive cells of the retina which detects the photons of light and responds by producing neural
impulses.
Digital images are displayed as a discrete set of intensities. The eyes ability to discriminate black and
white at different intensity levels is an important consideration in presenting image processing result.
The range of light intensity levels to which the human visual system can adapt is of the order of 1010 from the
scotopic threshold to the glare limit. In a photopic vision, the range is about 10 6.
Sampling, Quantization and Resolution
Image Acquisition
Images are typically generated by illuminating a scene and absorbing the energy reflected by the
objects in that scene.
• X-rays of a skeleton
• Ultrasound of an
unborn baby
• Electro-microscopic
images of molecules
Image Sensing
• Incoming energy lands on a sensor material responsive to that type of energy and this
generates a voltage
• Collections of sensors are arranged to capture images
Imaging
Sensor
Line of Image Sensors Array of Image Sensors
Sampling and quantization
In order to become suitable for digital processing, an image function f (x, y) must be digitized
both spatially and in amplitude. Typically, a frame grabber or digitizer is used to sample and
quantize the analogue video signal. Hence in order to create an image which is digital, we need
to covert continuous data into digital form. There are two steps in which it is done:
Sampling
Quantization
The sampling rate determines the spatial resolution of the digitized image, while the quantization
level determines the number of grey levels in the digitized image. A magnitude of the sampled
image is expressed as a digital value in image processing. The transition between continuous
values of the image function and its digital equivalent is called quantization.
The number of quantization levels should be high enough for human perception of fine shading
details in the image. The occurrence of false contours is the main problem in image which has
been quantized with insufficient brightness levels.
Digitizing a signal
As we have seen in the previous tutorials, that digitizing an analog signal into a digital, requires
two basic steps. Sampling and quantization. Sampling is done on x axis. It is the conversion of x
axis (infinite values) to digital values. The below figure shows sampling of a signal.
Sampling with relation to digital images
The concept of sampling is directly related to zooming. The more samples you take, the more
pixels, you get. Oversampling can also be called as zooming. This has been discussed under
sampling and zooming tutorial.
But the story of digitizing a signal does not end at sampling too, there is another step involved
which is known as Quantization.
What is quantization?
Quantization is opposite to sampling. It is done on y axis. When you are quantizing an image,
you are actually dividing a signal into quanta(partitions).
On the x axis of the signal, are the co-ordinate values, and on the y axis, we have amplitudes. So
digitizing the amplitudes is known as Quantization.
Quantization
You can see in this image, that the signal has been quantified into three different levels. That
means that when we sample an image, we actually gather a lot of values, and in quantization, we
set levels to these values. This can be more clear in the image below.
Quantization levels
In the figure shown in sampling, although the samples has been taken, but they were still
spanning vertically to a continuous range of gray level values. In the figure shown above, these
vertically ranging values have been quantized into 5 different levels or partitions. Ranging from
0 black to 4 white. This level could vary according to the type of image you want.
The relation of quantization with gray levels has been further discussed below.
The quantized figure shown above has 5 different levels of gray. It means that the image formed
from this signal, would only have 5 different colors. It would be a black and white image more or
less with some colors of gray. Now if you were to make the quality of the image better, there is
one thing you can do here. Which is, to increase the levels, or gray level resolution up. If you
increase this level to 256, it means you have a gray scale image. Which is far better than simple
black and white image.
Now 256, or 5 or whatever level you choose is called gray level. Remember the formula that we
discussed in the previous tutorial of gray level resolution which is,
We have discussed that gray level can be defined in two ways. Which were these two.
Image Representation
Before we discuss image acquisition recall that a digital image is composed of M rows and N
columns of pixels each storing value Pixel values are most often grey levels in the range 0-
255(black-white) We will see later on that image can easily be represented as matrices.
Coordinate convention used to represent digital images. Because coordinate values are integers,
there is a one-to-one correspondence between x and y and the rows (r) and columns (c) of a
matrix.
(a) Image plotted as a surface. (b) Image displayed as a visual intensity array. (c) Image shown
as a 2-D numerical array. (The numbers 0, .5, and 1 represent black, gray, and white,
respectively.
Spatial Resolution
• The spatial resolution of an image is determined by how sampling was carried out
• Spatial resolution simply refers to the smallest discern able detail in an image
• Vision specialists will
often talk about pixel
size
• Graphic designers will
talk about dots per
inch (DPI)
• Intensity level resolution refers to the number of intensity levels used to represent the
image
• The more intensity levels used, the finer the level of detail discern able in an
image
• Intensity level resolution is usually given in terms of the number of bits used to
store each intensity level
Image Saturation
Neighbors of a Pixel
⮚ Any pixel p(x, y) has two vertical and two horizontal neighbors, given by (x+1, y),
(x-1, y), (x, y+1), (x, y-1)
⮚ This set of pixels are called the 4-neighbors of P, and is denoted by N4(P).
⮚ The four diagonal neighbors of p(x,y) are given by, (x+1, y+1), (x+1, y-1), (x-1, y+1),
(x-1 ,y-1)
⮚ This set is denoted by ND(P).
⮚ The points ND(P) and N4(P) are together known as 8-neighbors of the point P, denoted
by N8(P).
⮚ Some of the points in the N4, ND and N8 may fall outside image when P lies on the
border of image.
❖ 4-neighbors of a pixel p are its vertical and horizontal neighbors denoted by N4(p)
p
N4(p)
❖ 8-neighbors of a pixel p are its vertical horizontal and 4 diagonal neighbors denoted by
N8(p)
p
N8(p)
ND N4 ND
N4 P N 4
ND N4 ND
▪ N4- 4-neighbors
▪ ND - diagonal neighbors
▪ N8- 8-neighbors (N4 U ND)
Adjacency
⮚ Two pixels are connected if they are neighbors and their gray levels satisfy some
specified criterion of similarity.
⮚ For example, in a binary image two pixels are connected if they are 4-neighbors and have
same value (0/1).
⮚ Let V be set of gray levels values used to define adjacency.
⮚ 4-adjacency: Two pixels p and q with values from V are 4-adjacent if q is in the set
N4(p).
⮚ 8-adjacency: Two pixels p and q with values from V are 8-adjacent if q is in the set
N8(p).
⮚ m-adjacency: Two pixels p and q with values from V are madjacent if,
▪ q is in N4(P).
▪ q is in ND(p) and the set [N4(p)N4(q)] is empty (has no pixels whose
values are from V).
Connectivity
0 0 1
0 1 1
0 2 0
0 0 1
Adjacency/Connectivity
S 1
S 2
Connected Components
⮚ For every pixel p in S, the set of pixels in S that are connected to p is called a connected
component of S.
⮚ The boundary of the region R is the set of pixels in the region that have one or more
neighbors that are not in R.
Distance measures
❑ Given pixels p, q and z with coordinates (x, y), (s, t), (u, v) respectively, the distance
function D has following properties:
⮚ Euclidean Distance :
De(p, q) = [(x-s)2 + (y-t)2]
❖ Smoothing / averaging.
❖ Noise removal / filtering.
❖ Edge detection.
❖ Contrast enhancement
⮚ Light is just a particular part of the electromagnetic spectrum that can be sensed by the
human eye.
⮚ The electromagnetic spectrum is split up according to the wavelengths of different forms
of energy.