CV 2
CV 2
CV 2
Bilal Khan
Digital Image Processing Basics
Digital Image Processing means processing digital image by means of a digital computer. We can also
say that it is a use of computer algorithms, in order to get enhanced image either to extract some useful
information.
Digital image processing is the use of algorithms and mathematical models to process and analyze
digital images. The goal of digital image processing is to enhance the quality of images, extract
meaningful information from images, and automate image-based tasks.
The basic steps involved in digital image
processing are:
• Image acquisition: This involves capturing an image using a digital camera or scanner, or
importing an existing image into a computer.
• Image enhancement: This involves improving the visual quality of an image, such as
increasing contrast, reducing noise, and removing artifacts.
• Image restoration: This involves removing degradation from an image, such as blurring,
noise, and distortion.
• Image segmentation: This involves dividing an image into regions or segments, each of
which corresponds to a specific object or feature in the image.
Image representation and description: This involves representing an image in a way that can
be analyzed and manipulated by a computer, and describing the features of an image in a
compact and meaningful way.
Image analysis: This involves using algorithms and mathematical models to extract
information from an image, such as recognizing objects, detecting patterns, and quantifying
features.
Image synthesis and compression: This involves generating new images or compressing
existing images to reduce storage and transmission requirements.
Output in which result can be altered image or a report which is based on analyzing that
image.
What is an image?
An image is defined as a two-dimensional function,F(x,y), where x and y are spatial coordinates, and the
amplitude of F at any pair of coordinates (x,y) is called the intensity of that image at that point. When
x,y, and amplitude values of F are finite, we call it a digital image.
In other words, an image can be defined by a two-dimensional array specifically arranged in rows and
columns.
Digital Image is composed of a finite number of elements, each of which elements have a particular
value at a particular location.These elements are referred to as picture elements,image elements,and
pixels.A Pixel is most widely used to denote the elements of a Digital Image.
Types of an image
BINARY IMAGE– The binary image as its name suggests, contain only two pixel elements i.e. 0 &
1,where 0 refers to black and 1 refers to white. This image is also known as Monochrome.
BLACK AND WHITE IMAGE– The image which consist of only black and white color is called
BLACK AND WHITE IMAGE.
8 bit COLOR FORMAT– It is the most famous image format. It has 256 different shades of colors in
it and commonly known as Grayscale Image. In this format, 0 stands for Black, and 255 stands for
white, and 127 stands for gray.
16 bit COLOR FORMAT– It is a color image format. It has 65,536 different colors in it. It is also
known as High Color Format. In this format the distribution of color is not as same as Grayscale image.
A 16 bit format is actually divided into three further formats which are Red, Green and Blue. That
famous RGB format.
Image as a Matrix
As we know, images are represented in rows and columns we have the following syntax in
which images are represented:
The right side of this equation is digital image by definition. Every element of this matrix is
called image element , picture element , or pixel.
DIGITAL IMAGE REPRESENTATION
IN MATLAB
In MATLAB, matrices are stored in a variable i.e. X,x,input_image , and so on. The variables must be a
letter as same as other programming languages.
PHASES OF IMAGE PROCESSING
1.ACQUISITION– It could be as simple as being given an image which is in digital form.
The main work involves:
a) Scaling
b) Color conversion(RGB to Gray or vice-versa)
4.COLOR IMAGE PROCESSING– It deals with pseudocolor and full color image
processing color models are applicable to digital image processing.
5.WAVELETS AND MULTI-RESOLUTION PROCESSING– It is foundation of representing
images in various degrees.
7.MORPHOLOGICAL PROCESSING-It deals with tools for extracting image components that are
useful in the representation & description of shape.
Automated image-based tasks: Digital image processing can automate many image-based
tasks, such as object recognition, pattern detection, and measurement.
Increased efficiency: Digital image processing algorithms can process images much faster
than humans, making it possible to analyze large amounts of data in a short amount of time.
Increased accuracy: Digital image processing algorithms can provide more accurate results
than humans, especially for tasks that require precise measurements or quantitative analysis.
Disadvantages of Digital Image Processing
High computational cost: Some digital image processing algorithms are computationally intensive and
require significant computational resources.
Limited interpretability: Some digital image processing algorithms may produce results that are
difficult for humans to interpret, especially for complex or sophisticated algorithms.
Dependence on quality of input: The quality of the output of digital image processing algorithms is
highly dependent on the quality of the input images. Poor quality input images can result in poor quality
output.
Limitations of algorithms: Digital image processing algorithms have limitations, such as the difficulty
of recognizing objects in cluttered or poorly lit scenes, or the inability to recognize objects with
significant deformations or occlusions.
Dependence on good training data: The performance of many digital image processing algorithms is
dependent on the quality of the training data used to develop the algorithms. Poor quality training data
can result in poor performance of the algorit