Image Processing
Image Processing
Since digital image processing has very wide applications and almost
all of the technical fields are impacted by DIP, we will just discuss some
of the major applications of DIP.
Digital image processing has a broad spectrum of applications, such as
1. Remote sensing via satellites and otherspacecrafts
2. Image transmission and storage for businessapplications
3. Medicalprocessing
4. RADAR (Radio Detection and Ranging)
5. SONAR (Sound Navigation and Ranging)
6. Acoustic Image Processing (The study of underwater sound is known
as Underwater Acousticsor
HydroAcoustics)
7. Robotics and automated inspection of industrial
parts Images acquired by satellites are useful in
trackingof
1. Earthresources
2. Geographical mapping
3. Prediction of agriculturalcrops
4. Urban growth and weathermonitoring
5. Flood and fire control and many other
environmentalapplications Space image
applicationsinclude:
1. Recognition and analysis of objects contained in images obtained from
deep space-probemissions.
2. Image transmission and storage applications occur in
broadcasttelevision
3. Teleconferencing
4. Transmission of facsimile images (Printed documents and graphics) for
office automation
5. Communication over computer networks
6. Closed-circuit television-based security monitoring systemsand
7. In military communications
Medical applications:
8. Processing of chest X-rays
9. Cineangiograms
10. Projection images of trans axial tomography and
11. Medical images that occur in radiology nuclear magnetic resonance
(NMR)
12. Ultrasonic scanning
13. IMAGE PROCESSING TOOLBOX (IPT):
14. It is a collection of functions that extend the capability of the
MATLAB numeric computing environment. These functions, and the
expressiveness of the MATLAB language,
Page | 55
Relationship between Pixels:
Distance Measures:
For pixel p,q and z with coordinate (x.y) ,(s,t) and (v,w) respectively D
is a distance function or metric if
D [p.q] ≥ 0 {D[p.q] = 0iffp=q}
D [p.q] = D [p.q] and
D [p.q] ≥ 0 {D[p.q]+D(q,z) The
Euclidean Distance between p and q is definedas:
De(p,q) = [(x – s)2 + (y - t)2]1/2
Pixels having a distance less than or equal to some value r from (x,y)
arethe points contained in a disk of radius „ r „centered at (x,y)
Lowpass filters: Allow passing only low frequency details, attenuates the
high frequency details. Example: Smoothening filters.
Highpass filters: Allows passing only high frequency details, attenuates
the low frequency details. Example: Sharpening mask filters.
Bandreject filters: Attenuate signal in range of a certain frequency.
Allows frequency below a certain threshold and above another threshold
to pass.
Page | 55
Bandpass filters: Only allows signals within a certain band to pass,
attenuates the frequencies below a threshold and above another
threshold to pass.
Cut off frequency D0 defines point at which H(u,v) = 0.5Unlike the ILPF,
the BLPF transfer function does not have a sharp discontinuity that gives
a clear cutoff between passed and filtered frequencies.
GAUSSIAN LOWPASS FILTERS:
The form of these filters in two dimensions is given by
Page | 55
This transfer function is smooth, like Butterworth filter.
Gaussian in frequency domain remains a Gaussian in spatial
domainAdvantage: No ringing artifacts.Where D0 is the cutoff frequency.
When D(u,v) = D0, the GLPF is down to 0.607 of its maximum value.This
means that a spatial Gaussian filter, obtained by computing the
IDFT of above equation., will have no ringing.
Here, each restored pixel is given by the product of the pixel in the
subimage window, raised to the power 1/mm. A geometric mean filter but
it to loosen image details in the process.
Harmonic Mean Filter:
The harmonic mean filtering operation is given by the expression
The harmonic mean filter works well for salt noise but fails for pepper
noise. It does well with Gaussian noise also.
Order statistics are a statistical concept used in image
restoration to enhance or recover degraded images. Here are
some short notes on the application of order statistics in image
restorationOrder statistics are values derived from ordering a
Page | 55
set of data points in ascending or descending order.Common
order statistics include the minimum, maximum, median, and
percentiles.Noise Removal with Order Statistics:Images often
contain various types of noise, such as salt-and-pepper noise
or Gaussian noise, which degrade image quality.Order statistics,
particularly the median filter, are used to reduce noise in
images. The median filter replaces each pixel value with the
median of the neighboring pixel values.The median filter is
particularly effective at preserving edges and fine details in
images while reducing noise.Rank-Order Filtering:Rank-order
filters generalize the concept of median filtering. They allow you
to replace a pixel's value with the result of a custom function
applied to a ranked set of neighboring pixel values.Common
rank-order filters include the minimum, maximum, and
midrange filters, which use different ranking functions to
process pixel values.Adaptive Median Filtering:Adaptive median
filtering is an extension of median filtering where the filter size
varies based on the local characteristics of the image.It starts
with a small window and gradually increases it until the pixel
under consideration is no longer affected by noise. This helps
preserve image details while effectively reducing noise.Order
Statistics for Image Deblurring:In addition to noise removal,
order statistics can be used in image deblurring, which aims to
recover sharp images from blurry ones.By analyzing the point
spread function (PSF) of the blurring process, order statistics
techniques can be employed to estimate and reverse the
blurring effect, enhancing image quality.LimitsOrder statistics
methods are effective for certain types of noise and blurring but
may not perform well in all scenarios.They are sensitive to the
choice of filter size, and selecting an appropriate size can be
challenging.Modern Techniques:While order statistics are
valuable in image restoration, modern deep learning-based
approaches have gained popularity due to their ability to learn
complex mappings between degraded and clean
images.Convolutional neural networks (CNNs) and
autoencoders are commonly used for image restoration tasks
and have shown superior performance in many cases.
IMAGE SEGMENTATION:
Page | 55
Edge Detection:
Edge detection is a fundamental tool in image processing and computer
vision, particularly in the areas of feature detection and feature
extraction,which aim at identifying points in a digital image at which the
imagebrightness changes sharply or more formally has discontinuities.
Motivation: Canny edge detection applied to a photograph
Edge Properties:
The edges extracted from a two-dimensional image of a three-dimensional
scene can be classified as either viewpoint dependent or viewpoint
independent. A viewpoint independent edge typically reflects inherent
properties of the three-dimensional objects, such as surface markings and
surface shape. A viewpoint dependent edge may change as the viewpoint
Page | 55
changes, and typically reflects the geometry of the scene, such as objects
occluding one another.
A typical edge might for instance be the border between a block of red
colorand a block of yellow. In contrast a line(as can be extracted by a ridge
detector) can be a small number of pixels of a different color on an
otherwise unchanging background. For a line, there may therefore usuallybe
one edge on each side of the line.
Page | 55
edge only when the value falls below our lower threshold. This approach
makes the assumption that edges are likely to be in continuous curves,
and allows us to follow a faint section of an edge we have previously seen,
without meaning that every noisy pixel in the image is marked down as an
edge. Still, however, we have the problem of choosing appropriate
thresholding parameters, and suitable thresholding values may vary over
the image.
Edge Thinning:
Edge thinning is a technique used to remove the unwanted spurious
points on the edge of an image. This technique is employed after the
image has been filtered for noise (using median, Gaussian filter etc.),
the edge operator has been applied (like the ones described above) to
detect the edges and after the edges have been smoothed using an
appropriate threshold value. This removes all the unwanted points and if
applied carefully, results in one-pixel thick edge elements.
Advantages:
1) Sharp and thin edges lead to greater efficiency in object recognition.
2) If you are using Hough transforms to detect lines and ellipses
thenthinning could give much better results.
3) If the edge happens to be boundary of a region then, thinning
couldeasily give the image parameters like perimeter without much
algebra.
Thresholding is the simplest method of image segmentation. From a
grayscale image, thresholding can be used to create binary images.
During the thresholding process, individual pixels in an image are
markedas object pixels if their value is greater than some threshold value
(assuming an object to be brighter than the background) and as
―background pixels otherwise. This convention is known as Threshold
Above. Variants include threshold below, which is opposite of threshold
above; threshold inside, where a pixel is labeled "object" if its value is
between two thresholds; and threshold outside, which is the opposite
of threshold inside (Shapiro, et al. 2001:83). Typically, an object pixel is
givena value of ―1ǁ while a background pixel is given a value of ―0. ǁ
Finally, a binary image is created by coloring each pixel white or black,
depending ona pixel's labels.
Threshold Selection:
The key parameter in the thresholding process is the choice of the
threshold value (or values, as mentioned earlier). Several different
methods for choosing a threshold exist; users can manually choose a
threshold value, or a thresholding algorithm can compute a value
automatically, which is known as automatic thresholding (Shapiro, et al.
Page | 55
2001:83). A simple method would be to choose the mean or median
value,the rationale being that if the object pixels are brighter than the
background, they should also be brighter than the average.
Adaptive Thresholding:
Thresholding is called adaptive thresholding when a different threshold
isused for different regions in the image. This may also be known as local
ordynamic thresholding (Shapiro, et al. 2001:89).Mples are clustered in
two parts as background and foreground (object), or alternately are
modeled as a mixture of two Gaussiansentropy-based methods result in
algorithms that use the entropy of the foreground and background
regions, the cross- entropy between the original and binarized image,
etc.object attribute- based methods search a measure of similarity
between the gray- level and the binarized images, such as fuzzy shape
similarity, edge coincidence, etc. Spatial methods [that] use higher-order
probability distribution and/or correlation between pixels. Local methods
adapt the threshold value on each pixel to the local image characteristics.
Multiband Thresholding:
Colour images can also be thresholders. One approach is to designate a
separate threshold for each of the RGB components of the image and then
combine them with an AND operation. This reflects the way the camera
works and how the data is stored in the computer, but it does not
correspond to the way that people recognize color. Therefore, the HSL
andHSV color models are more often used. It is also possible to use the
CMYK color model (Pham et al., 2007).
Region Growing:
Region growing is a simple region-based image segmentation method. It
isalso classified as a pixel- based image segmentation method since it
involves the selection of initial seed points.This approach to segmentation
examines neighboring pixels of initial ―seed pointsǁ and determines
whether the pixel neighbors should be added to the region. The process
is iterated on, in the same manner as general data clustering algorithms.
Region-based Segmentation:
The main goal of segmentation is to partition an image into regions. Some
Page | 55
IMAGE COMPRESSIONThe term data compression refers to the
process of reducing the amount of data required to represent a given
quantity of information. A clear distinction must be made between data
and information. They are not synonymous. In fact, data are the
means by which information is conveyed. Various amounts of data may
be used to represent the same amount of information. Such might be the
case, for example, if a long- winded individual and someone who is short
and to the point where to relate the same story. Here, the information of
interest is the story; wordsare the data used to relate the information. If
the two individuals use a different number of words to tell the same
basic story, two different versions of the story are created, and at
least one includes nonessential data. That is, it contains data (or words)
that either provide no relevant information or simply restate that which is
already known. It is thus said to contain data redundancy.
Data redundancy is a central issue in digital image compression. It is not
CODING REDUNDANCY:
In this, we utilize formulation to show how the gray-level histogram of
animage also can provide a great deal of insight into the construction of
codes to reduce the amount of data used to represent it.Let us assume,
once again, that a discrete random variable rk in the interval [0, 1]
represents the gray levels of an image and that each rk occurs with
probability pr (rk).
where L is the number of gray levels, nk is the number of times
that the kth gray level appears in the image, and n is the total number
of pixels in the image. If the number of bits used to representeach value
of rk is l (rk), then the average number of bits required to represent
each pixel is their evaluations. The evaluations may be made using an
absolute rating scale or by means of side-by-side comparisons of f(x, y)
and f^(x, y).
VARIABLE-LENGTH CODING:
The simplest approach to error-free image compression is to reduce
only coding redundancy. Coding redundancy normally is present in any
natural binary encoding of the gray levels in an image. It can be
eliminated by coding the gray levels. To do so requires construction of a
variable- length code that assigns the shortest possible code words to
themost probable gray levels. Here, we examine several optimal and
near optimal techniques for constructing such a code. These
techniques are formulated in the language of information theory. In
Page | 55
practice, the source symbols may be either the gray levels of an image
or the output of a gray-level mapping operation (pixel differences, run
lengths, and so on).
HUFFMAN CODING:
The most popular technique for removing coding redundancy is due to
Huffman (Huffman [1952]). When coding the symbols of an information
source individually, Huffman coding yields the smallest possible
number of code symbols per source symbol. In terms of the noiseless
coding theorem, the resulting code is optimal for a fixed value of n, subject
to theconstraint that the source symbols be coded one at a time.
Page | 55
LOSSLESS PREDICTIVE CODING:
The error-free compression approach does not require decomposition of an
image into a collection of bit planes. The approach, commonly referred
to as lossless predictive coding, is based on eliminating the inter pixel
redundancies of closely spaced pixels by extracting and coding only
thenew information in each pixel. The new information of a pixel is
definedas the difference between the actual and predicted value of that pixel.
TRANSFORM CODING:
All the predictive coding techniques operate directly on the pixels of
an image and thus are
spatial domain methods. In this coding, we consider compression
techniques that are based on
modifying the transform of animage. In transform coding, a
reversible, linear transform
Page | 92
magnitudes and can be coarsely quantized (or discarded entirely) with
little image distortion. A variety of transformations, including the
discrete Fourier transform (DFT), can be used to transform the image
data.
WAVELET CODING:
The wavelet coding is based on the idea that the coefficients of
a transform that decorrelates the pixels of an image can be
coded more efficiently than the original pixels themselves. If
the transform's basis functions—in this case wavelets—pack most
of the important visual information into a small number of
coefficients, the remaining coefficientscan be quantized coarsely or
truncated to zero with little image distortion.
Page | 92
Wavelets play a crucial role in image processing, offering a powerful
framework for various tasks such as image compression, denoising, and
feature extraction. Here's some background on wavelets in image
processing:Wavelets are mathematical functions that can be used to
analyze and process signals and images. They are localized in both time
and frequency domains, which makes them well-suited for capturing and
representing features at different scales.
Subband coding • Subband coding: decompose the input signal into
different frequency bands • After the input is decomposed to its
constituents, we can use the coding technique best suited to each
constituent to improve the compression performance • Each component
may have different perceptual characteristics – Quantization errors that
are objectionable in one component may be acceptable in a different
component Multiresolution expansions are a fundamental concept in
image processing and computer vision that involve representing an image
at multiple scales or resolutions. These representations allow for the
efficient analysis of images at different levels of detail. Here's an overview
of multiresolution expansions in image processing:Pyramid
Representation:A common approach to multiresolution expansion is the
pyramid representation, which involves creating a series of images, each
at a different scale. The pyramid typically consists of the following levels:
Original Image:** The highest resolution level.Low-Pass Filtered Image:**
Obtained by smoothing (e.g., using Gaussian filters) and downsampling
the previous level.Repeat Low-Pass Filter and Downsample:** This
process is repeated to generate multiple scales.Laplacian Pyramid:**
The Laplacian pyramid is another multiresolution representation derived
from the Gaussian pyramid. It is created by taking the difference between
each level and the next higher level, effectively capturing the "details" at
each scale.It is particularly useful for tasks like image compression and
image editing.Wavelet Transform:The wavelet transform, as mentioned in
the previous response, is a powerful multiresolution analysis technique. It
involves decomposing an image into wavelet coefficients at different
scales and orientations.The decomposition can be done using discrete
wavelet transforms (DWT) or continuous wavelet transforms (CWT), and it
offers a richer representation compared to simple pyramid structures.
Applications of Multiresolution Expansions:Image Pyramids for Image
Analysis:** Multiresolution pyramids are used for various image analysis
tasks, such as image alignment, image blending, and scale-invariant
feature detection.Bit plane coding is a technique used in image and signal
processing to represent and process the individual bits of an image
separately. In this method, an image is divided into its binary (bitplane)
components, where each bitplane represents one bit of the pixel values.
Each bitplane can then be processed independently, allowing for various
operations and analyses. Here are the key points about bit plane coding:
Binary Representation:** In a digital image, each pixel is represented by a
binary value based on the bit depth. For example, in an 8-bit grayscale
Page | 92
image, each pixel is represented by 8 bits, where each bit contributes to
the pixel's intensity value Bit Planes: Bit plane coding involves extracting
each bit of the pixel values and organizing them into separate planes or
layers. An 8-bit grayscale image will have eight bit planes, with the first
plane containing the most significant bit (MSB) and the last plane
containing the least significant bit (LSB).Bit Plane Extraction:** To extract
a specific bit plane, a bitwise AND operation is performed between the
pixel values and a bit mask.Applications:**Image Enhancement:**Image
Compression:** Some compression algorithms use bit plane
representation to exploit redundancy in image data, which can lead to
compression efficiency.Steganography:** Bit plane coding can be used in
steganography to hide information within an image by replacing the LSBs
of the pixel values.Bit Plane Visualization:*Bit Plane ArithmeticBit Plane
Thresholding:Limitations:** Bit plane coding can be memory-intensive,
especially for high-bit-depth images, as it requires storing multiple bit
planes. Additionally, the manipulation of bit planes can introduce
quantization and rounding errors.
Lossy compression is a data compression technique that reduces the size
of digital files by selectively discarding some of the data, with the aim of
achieving a significant reduction in file size while tolerating a controlled
amount of loss in quality. It is widely used for compressing multimedia data
such as images, audio, and video. Here are some key points about lossy
compression:1Quality vs. File Size Trade-off:** The fundamental principle
of lossy compression is to strike a balance between reducing file size and
maintaining acceptable perceptual quality. By discarding some data that is
less essential to human perception, lossy compression can achieve higher
compression ratios compared to lossless compression methods.2.
**Irreversible Process:** Lossy compression is an irreversible process.
When data is compressed using a lossy algorithm, some information is
permanently lost. Therefore, it is not suitable for applications where data
integrity and exact reproduction are critical, such as text documents or
scientific data.3. **Common Lossy Compression Formats and
Algorithms:**JPEG (Joint Photographic Experts Group):** JPEG is a
widely used lossy compression format for images. It uses the Discrete
Cosine Transform (DCT) to transform the image into the frequency domain
and quantizes high-frequency components.MP3 (MPEG-1 Audio Layer
3):** MP3 is a lossy compression format for audio. It achieves
compression by removing audio frequencies that are less audible to the
human ear.MPEG (Moving Picture Experts Group):** Various MPEG
standards are used for lossy video compression. They employ techniques
like motion compensation and quantization to achieve high compression
ratios.Applications:**Lossy compression is commonly used for multimedia
content where human perception is the primary consideration. Examples
include streaming video, web images, digital photography, and audio
streaming services.It is also used in telecommunication and data
transmission to reduce the amount of data sent over networks while
Page | 92
maintaining acceptable quality.5. **Compression Ratios:** Lossy
compression can achieve higher compression ratios compared to lossless
compression. The degree of compression can often be adjusted to meet
specific requirements, with a trade-off between file size and quality.
6. **Perceptual Encoding:** Lossy compression algorithms are designed to
exploit the limitations of human perception. They remove information that
the human eye or ear is less sensitive to, focusing on preserving essential
details that contribute to the overall perception of quality.
7. **Quality Settings:** Many lossy compression formats and codecs allow
users to choose the level of compression quality. Higher quality settings
result in larger files with less loss, while lower quality settings produce
smaller files with more noticeable artifacts.
8. **Lossy Compression Artifacts:** The process of lossy compression can
introduce artifacts into the compressed data, such as blocky artifacts in
images or audio distortions in music. The nature and severity of these
artifacts depend on the compression method and the degree of
compression applied.In summary, lossy compression is a widely used
technique for reducing the size of multimedia files while accepting a
controlled level of quality loss. It is suitable for applications where data
integrity can be compromised to achieve significant reductions in file size
and bandwidth requirements.
Page | 92