DIP ppt1
DIP ppt1
DIP ppt1
20MCAT233
Course Outcomes
At the end of the course students will be able to:
CO1 - Discuss the fundamental concepts of Digital Image Processing, formation and
representation of images.
CO2 - Summarise image enhancement methods in the spatial domain.
CO3 - Explain image transforms and image smoothing and sharpening using various
kinds of filters in frequency domain.
CO4 - Describe various methods in image restoration and compression.
CO5 - Discuss morphological basics and image segmentation methods.
Module-I
Overview of Digital Image Processing
Digital Image Processing - Basic concepts - Difference between image processing and
computer vision - Components of an image processing system - Image processing
Applications
Elements of Visual Perception - Structure of the human eye and image formation -
Brightness adaptation and discrimination
Image Sampling and Quantization - Digital image as a 2D array - Spatial and Intensity
resolution - 2D-sampling theorem - RGB and HSI color models
Image and Digital Image Processing
• An image may be defined as a two-dimensional function, f (x, y), where x and y are
spatial (plane) coordinates, and the amplitude of f at any pair of coordinates (x, y) is
called the intensity or gray level of the image at that point.
• When x, y, and the intensity values of f are all finite, discrete quantities, we call the
image a digital image.
• The field of digital image processing refers to processing digital images by means of
a digital computer.
• A digital image is composed of a finite number of elements, each of which has a
particular location and value. These elements are called picture elements, image
elements, pels, and pixels.
• Pixel is the term used most widely to denote the elements of a digital image.
Computer vision
• Computer vision is to use computers to emulate human vision, including learning
and being able to make inferences and take actions based on visual inputs.
• Image enhancement is the process of manipulating an image so the result is more suitable
than the original for a specific application. Enhancement is based on human subjective
preferences regarding what constitutes a “good” enhancement result.
• Image restoration is an area that also deals with improving the appearance of an image.
However, unlike enhancement, the restoration techniques tend to be based on mathematical
or probabilistic models of image degradation.
• In Color image processing, Color is used also as the basis for extracting features of interest in
an image.
• Wavelets are the foundation for representing images in various degrees of resolution.
Fundamental steps in digital image processing
• Compression deals with techniques for reducing the storage required to save an image.
• Morphological processing deals with tools for extracting image components that are useful
in the representation and description of shape.
• Segmentation partitions an image into its constituent parts or objects.
• Feature extraction almost always follows the output of a segmentation stage, which usually
is raw pixel data, constituting either the boundary of a region (i.e., the set of pixels
separating one image region from another) or all the points in the region itself. Feature
extraction consists of feature detection and feature description. Feature detection refers
to finding the features in an image, region, or boundary. Feature description assigns
quantitative attributes to the detected features.
• Image pattern classification is the process that assigns a label (e.g., “vehicle”) to an object
based on its feature descriptors.
• Knowledge about a problem domain is coded into an image processing system in the form
of a knowledge database.
Components of an image processing system
Components of an image processing system
Subsystems are required to acquire digital images
1. physical sensor that responds to the energy radiated by the object we wish to
image. A digitizer is a device for converting the output of the physical sensing device
into digital form. The sensors produce an electrical output proportional to light
intensity. The digitizer converts these outputs to digital data.
3. Software for image processing consists of specialized modules that perform specific
tasks.
6. Hardcopy devices for recording images include laser printers, film cameras, heat
sensitive devices, ink-jet units, and digital units, such as optical and CD-ROM disks.
8. Image data compression continues to play a major role in the transmission of large
amounts of image data.
Image processing applications
• categorize images according to their source.
• The energy source for images are electromagnetic energy spectrum, acoustic,
ultrasonic and electronic.
• how images are generated in various categories, and the areas in which they are
applied.
• Images based on radiation from the EM spectrum are the most familiar.
GAMMA-RAY IMAGING
• nuclear medicine and astronomical Observations.
• In nuclear medicine, the approach is to inject a patient with a radioactive isotope
that emits gamma rays as it decays. Images are produced from the emissions
collected by gamma-ray detectors.
X-RAY IMAGING
• in medical diagnostics – chest, angiography
• In industrial imaging, X-ray of electronic circuit
• astronomy
IMAGING IN THE ULTRAVIOLET BAND
• Industrial inspection
• Microscopy - fluorescence microscopy
• Lasers
• biological imaging
• astronomical observations
IMAGING IN THE VISIBLE AND INFRARED BANDS
• remote sensing - usually includes several bands in the visual and
infrared regions of the spectrum.
• Weather observation and prediction also are major applications of
multispectral imaging from satellites.
IMAGING IN THE MICROWAVE BAND
• radar
IMAGING IN THE RADIO BAND
• medicine and astronomy.
• radio waves are used in magnetic resonance imaging (MRI).
Imaging in other modalities
• acoustic imaging (sound – strength and returning sound), electron microscopy, and
synthetic (computer-generated) imaging
• Imaging using “sound” finds application in geological exploration (mineral and oil
exploration, industry, and medicine.
• marine image acquisition
Elements of Visual Perception
• how images are formed and perceived by humans
• Structure of the human eye and image formation
• Brightness adaptation and discrimination
Structure of the human eye
• The eye is nearly a sphere (with a diameter of about 20 mm) enclosed by three
membranes: the cornea and sclera outer cover; the choroid; and the retina.
• The cornea is a tough, transparent tissue that covers the anterior surface of the eye.
• Continuous with the cornea, the sclera is an opaque membrane that encloses the
remainder of the optic globe.
• The choroid lies directly below the sclera. This membrane contains a network of
blood vessels that serve as the major source of nutrition to the eye.
• The choroid coat is heavily pigmented, which helps reduce the amount of
extraneous light entering the eye and the backscatter within the optic globe.
• The central opening of the iris (the pupil) varies in diameter from approximately 2
to 8 mm. The front of the iris contains the visible pigment of the eye, whereas the
back contains a black pigment.
Structure of the human eye
• The lens consists of concentric layers of fibrous cells and is suspended by fibers that attach
to the ciliary body. It is composed of 60% to 70% water, about 6% fat, and more protein
than any other tissue in the eye. The lens is colored by a slightly yellow pigmentation that
increases with age.
• The innermost membrane of the eye is the retina, which lines the inside of the wall’s entire
posterior portion. When the eye is focused, light from an object is imaged on the retina.
• There are two types of receptors: cones and rods. There are between 6 and 7 million cones
in each eye. They are located primarily in the central portion of the retina, called the fovea,
and are highly sensitive to color.
• Rods capture an overall image of the field of view. 75 to 150 million rods are distributed
over the retina. They are not involved in color vision, and are sensitive to low levels of
illumination.
Structure of the human eye
IMAGE FORMATION IN THE EYE
• In the human eye, the distance between the center of the lens and the imaging
sensor (the retina) is fixed, and the focal length needed to achieve proper focus is
obtained by varying the shape of the lens.
• The fibers in the ciliary body accomplish this by flattening or thickening the lens for
distant or near objects, respectively.
• The distance between the center of the lens and the retina along the visual axis is
approximately 17 mm.
• The range of focal lengths is approximately 14 mm to 17 mm, the latter taking place
when the eye is relaxed and focused at distances greater than about 3 m.
• to obtain the dimensions of an image formed on the retina.
• the retinal image is focused primarily on the region of the fovea. Perception then
takes place by the relative excitation of light receptors, which transform radiant
energy into electrical impulses that ultimately are decoded by the brain.
IMAGE FORMATION IN THE EYE
BRIGHTNESS ADAPTATION AND DISCRIMINATION
• digital images are displayed as sets of discrete intensities, the eye’s ability to
discriminate between different intensity levels is an important consideration.
• Subjective brightness (intensity as perceived by the human visual system) is a
logarithmic function of the light intensity incident on the eye.
• the visual system cannot operate over such a range simultaneously. It accomplishes
this large variation by changing its overall sensitivity, a phenomenon known as
brightness adaptation.
• The total range of distinct intensity levels the eye can discriminate simultaneously is
rather small when compared with the total adaptation range.
• For a given set of conditions, the current sensitivity level of the visual system is
called the brightness adaptation level
• The ability of the eye to discriminate between changes in light intensity at any
specific adaptation level is called brightness discrimination.
Brightness adaptation
discriminate between changes in light intensity
• If is not bright enough, the subject says “no,” indicating no perceivable change.
• As gets stronger, the subject may give a positive response of “yes,” indicating a
• perceived change.
• When is strong enough, the subject will give a response of “yes” all the time.
human perception phenomena - simultaneous contrast
human perception phenomena- optical illusions
Types of Images
1. Binary Images
2. Gray-scale images
3. Colour images
Binary Images
• The right side of this equation is a digital image represented as an array of real numbers.
• Each element of this array is called an image element, picture element, pixel, or pel.
Represent a digital image in a traditional matrix form
Image displayed as visual intensity array and 2-D numerical array
Digital image as a 2D array
• Define the origin of an image at the top left corner.
• The positive x-axis extends downward and the positive y-axis extends to the right.
• The sampling process may be viewed as partitioning the xy-plane into a grid.
• f (x, y) is a digital image if (x, y) are integers and f is a function that assigns an intensity
value (a real number from the set of real numbers, R) to each distinct pair of coordinates
(x, y). This functional assignment is the quantization process.
SPATIAL AND INTENSITY RESOLUTION
• Spatial resolution is a measure of the smallest discernible(visible) detail in an image.
• Quantitatively, spatial resolution can be stated in several ways, with line pairs per unit
distance, and dots (pixels) per unit distance being common measures.
• Image resolution is the largest number of discernible line pairs per unit distance.
• Dots per unit distance is a measure of image resolution used in the printing and
publishing industry. In the U.S., this measure usually is expressed as dots per inch (dpi).
• Intensity resolution similarly refers to the smallest discernible change in intensity level
COLOR MODELS (COLOR SYSTEM, COLOR SPACE)
• A color model is a specification of (1) a coordinate system, and (2) a subspace within
that system, such that each color in the model is represented by a single point
contained in that subspace.
• Most color models in use today are oriented either toward hardware (such as for
color monitors and printers) or toward applications, where color manipulation is a
goal (the creation of color graphics for animation).
• The hardware-oriented models most commonly used in practice are
• the RGB (red, green, blue) model for color monitors and a broad class of color
video cameras;
• the CMY (cyan, magenta, yellow) and
• CMYK (cyan, magenta, yellow, black) models for color printing; and
• the HSI (hue, saturation, intensity) model, which corresponds closely with the
way humans describe and interpret color.
• The HSI model also has the advantage that it separates the color and gray-scale
information in an image.
THE RGB COLOR MODEL
• In the RGB model, each color appears in its primary spectral components of red, green, and
blue. This model is based on a Cartesian coordinate system.
• The color subspace is the cube in which RGB primary values are at three corners; the
secondary colors cyan, magenta, and yellow are at three other corners; black is at the
origin; and white is at the corner farthest from the origin.
• The grayscale (points of equal RGB values) extends from black to white along the line joining
these two points. The different colors in this model are points on or inside the cube, and are
defined by vectors extending from the origin.
• All values of R, G, and B in this representation are assumed to be in the range [0, 1].
• Images represented in the RGB color model consist of three component images, one for
each primary color. When fed into an RGB monitor, these three images combine on the
screen to produce a composite color image.
• The number of bits used to represent each pixel in RGB space is called the pixel depth.
THE RGB COLOR MODEL
• Consider an RGB image in which each of the red, green, and blue images is an 8-bit
image.
• Under these conditions, each RGB color pixel [that is, a triplet of values (R, G, B)]
has a depth of 24 bits (3 image planes times the number of bits per plane).
• The term full-color image is used often to denote a 24-bit RGB color image.
• The total number of possible colors in a 24-bit RGB image is (28 )3 = 16, 777, 216.
• An RGB color image is composed three grayscale intensity images (representing red,
green, and blue).
• RGB is ideal for image color generation (as in image capture by a color camera or
image display on a monitor screen), but its use for color description is limited.
RGB color cube
24-bit RGB color cube
• The range of values in the cube are scaled to the numbers representable by the
number bits in the images.
• the primary images are 8-bit images, the limits of the cube along each axis becomes
[0, 255].
• Then, for example, white would be at point [255, 255, 255] in the cube.
• https://www.youtube.com/watch?v=sq3gUlCT8fc
THE HSI COLOR MODEL
• When humans view a color object, we describe it by its hue, saturation, and
brightness(Intensity).
• Hue is a color attribute that describes a pure color (pure yellow, orange, or red), 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.
• Intensity (gray level) is a most useful descriptor of achromatic images. This quantity is
measurable and easily interpretable.
• HSI (hue, saturation, intensity) color model separates the intensity component from the
color-carrying information (hue and saturation) in a color image.
• As a result, the HSI model is a useful tool for developing image processing algorithms
based on color descriptions that are natural and intuitive to humans, who are the
developers and users of these algorithms.
RGB and HSI
THE HSI COLOR MODEL
Intensity
• The intensity (gray) scale is along the line joining these two vertices.
• The line (intensity axis) joining the black and white vertices is vertical.
• Thus, if we wanted to determine the intensity component of any color point, define a plane
that contains the color point and, at the same time, is perpendicular to the intensity axis.
The intersection of the plane with the intensity axis would give us a point with intensity
value in the range [0, 1].
Saturation
• The saturation (purity) of a color increases as a function of distance from the intensity axis.
• The saturation of points on the intensity axis is zero, as all points along this axis are gray.
Hue
• All points contained in the plane segment defined by the intensity axis and the boundaries of
the cube have the same hue (cyan in this case).
• All colors generated by three colors lie in the triangle defined by those colors.
THE HSI COLOR MODEL
• If two of those points are black and white, and the third is a color point, all points
on the triangle would have the same hue, because the black and white components
cannot change the hue.
• By rotating the shaded plane about the vertical intensity axis, we would obtain
different hues.
• The hue, saturation, and intensity values required to form the HSI space can be
obtained from the RGB color cube.
• HSI space is represented by a vertical intensity axis, and the locus of color points
that lie on planes perpendicular to that axis.
• an angle of 0° from the red axis designates 0 hue, and the hue increases
counterclockwise from there.
• The saturation (distance from the vertical axis) is the length of the vector from the
origin to the point.
• The origin is defined by the intersection of the color plane with the vertical intensity
axis.
• The important components of the HSI color space are
1. the vertical intensity axis,
2. the length of the vector to a color point, and
3. the angle this vector makes with the red axis.
ELEMENTWISE VERSUS MATRIX OPERATIONS
• An elementwise operation involving one or more images is carried out on a pixel-by pixel
basis.
• images can be viewed equivalently as matrices.
• operations between images are carried out using matrix theory.
• consider the following 2 * 2 images (matrices):
• The elementwise product of two images is
• These are elementwise operations which means that they are performed between
corresponding pixel pairs in f and g for x = 0, 1, 2,…,M − 1 and y = 0, 1, 2,…, N − 1.
• M and N are the row and column sizes of the images
• s, d, p, and v are images of size M × N
Toeplitz matrix
• Toeplitz matrix or diagonal-constant matrix, is a matrix in which each descending
diagonal from left to right is constant.
• the following matrix is a Toeplitz matrix:
• Elements with constant value along the main diagonal and sub-diagonals.
• Each row (column) is generated by a shift of the previous row (column).
• The last element disappears.
• A new element appears.
Circulant matrix
• A circulant matrix is a square matrix in which all row vectors are composed of the
same elements and each row vector is rotated one element to the right relative to
the preceding row vector.
• It is a particular kind of Toeplitz matrix.
• Each row (column) is generated by a circular shift (modulo N) of the previous row
(column).
• For a NxN matrix, its elements are determined by a N-length sequence cn | 0
n N 1
Image enhancement
• Image enhancement is the process of manipulating an image so the result is more
suitable than the original for a specific application.
• The term spatial domain refers to the image plane itself, and image processing
methods are based on direct manipulation of pixels in an image.
• Two principal categories of spatial processing are intensity transformations and
spatial filtering.
• Contrast stretching
• The result of applying the transformation to every pixel in f to generate the corresponding
pixels in g would be to produce an image of higher contrast than the original,
• by darkening the intensity levels below k and
• brightening the levels above k.
• In the limiting case T(r) produces a two level (binary) image. A mapping of this form is called a
thresholding function.
Intensity transformation function and thresholding function
BASIC INTENSITY TRANSFORMATION FUNCTIONS
• Denote the values of pixels, before and after processing, by r and s, respectively.
• These values are related by a transformation T, that maps a pixel value r into a pixel
value s.
• The identity function is the case in which the input and output intensities are
identical.
Basic intensity transformation functions
IMAGE NEGATIVES
• The negative of an image with intensity levels in the range [0,L − 1] is obtained by using
the negative transformation function, which has the form:
s=L−1−r
• Reversing the intensity levels of a digital image in this manner produces the equivalent
of a photographic negative.
• This type of processing is used, in enhancing white or gray detail embedded in dark
regions of an image, especially when the black areas are dominant in size.
LOG TRANSFORMATIONS
• The general form of the log transformation in is
s = c log(1 + r)
where c is a constant and it is assumed that r ≥ 0.
• This transformation maps a narrow range of low intensity values in the input into a
wider range of output levels.
• input levels in the range [0, L 4] map to output levels to the range [0, 3L 4]. Conversely,
higher values of input levels are mapped to a narrower range in the output.
• Can expand the values of dark pixels in an image, while compressing the higher-level
values.
• The opposite is true of the inverse log (exponential) transformation.
• The log function has the important characteristic that it compresses the dynamic range
of pixel values.
Result of applying the log transformation in with c = 1
POWER-LAW (GAMMA) TRANSFORMATIONS
• Power-law transformations have the form
• power-law curves with fractional values of gamma map a narrow range of dark input
values into a wider range of output values, with the opposite being true for higher
values of input levels.
• The response of many devices used for image capture, printing, and display obey a
power law.
• The process used to correct these power-law response phenomena is called gamma
correction or gamma encoding.
power-law curves
PIECEWISE LINEAR TRANSFORMATION FUNCTIONS
• the form of piecewise functions can be arbitrarily complex.
• their specification requires considerable user input
• Contrast Stretching
• Intensity-Level Slicing
• Bit-Plane Slicing
Contrast Stretching
• Low-contrast images can result from poor illumination, lack of dynamic range in the
imaging sensor, or even the wrong setting of a lens aperture during image
acquisition.
• Contrast stretching expands the range of intensity levels in an image so that it spans
the ideal full intensity range of the recording medium or display device.
• Contrast stretching, obtained by setting (r1 , s1)=( rmin ,0 ) and (r2, s2)=(rmax, L-1) ,
where rmin and rmax denote the minimum and maximum intensity levels in the
input image
Intensity-Level Slicing
• to highlight a specific range of intensities in an image.
• One approach is to display in one value (say, white) all the values in the range of
interest and in another (say, black) all other intensities. This Transformation
produces a binary image.
• The second approach brightens (or darkens) the desired range of intensities, but
leaves all other intensity levels in the image unchanged.
Bit-Plane Slicing
• Pixel values are integers composed of bits. For example, values in a 256-level
grayscale image are composed of 8 bits (one byte).
• an 8-bit image may be considered as being composed of eight one-bit planes, with
plane 1 containing the lowest-order bit of all pixels in the image, and plane 8 all the
highest-order bits.
• Decomposing an image into its bit planes is useful for analyzing the relative
• importance of each bit in the image
Bit-Plane Slicing
Bit-Plane Slicing
• The four higher-order bit planes, especially the first two, contain a significant amount of the
visually-significant data.
• The lower-order planes contribute to more subtle intensity details in the image.
• The original image has a gray border whose intensity is 194. Notice that the corresponding
borders of some of the bit planes are black (0), while others are white (1).
• To see why, consider a pixel in, say, the middle of the lower border of Fig. The corresponding
pixels in the bit planes, starting with the highest-order plane, have values 1 1 0 0 0 0 1 0,
which is the binary representation of decimal 194.
• The value of any pixel in the original image can be similarly reconstructed from its
corresponding binary-valued pixels in the bit planes by converting an 8-bit binary sequence to
decimal.
HISTOGRAM PROCESSING
HISTOGRAM - explanation
• The most populated histogram bins are concentrated on the lower (dark) end of the
intensity scale.
• The most populated bins of the light image are biased toward the higher end of the
scale.
• An image with low contrast has a narrow histogram located typically toward the
middle of the intensity scale.
• An image whose pixels tend to occupy the entire range of possible intensity levels
and, in addition, tend to be distributed uniformly, will have an appearance of high
contrast and will exhibit a large variety of gray tones. The image shows a great deal
of gray-level detail and has a high dynamic range.
HISTOGRAM EQUALIZATION
• The variable r denote the intensities of an image to be processed.
• Assume that r is in the range [0,l − 1], with r = 0 representing black and r = l − 1
representing white.
• For r satisfying these conditions, transformations (intensity mappings) of the form
• That produce an output intensity value, s, for a given intensity value r in the input
image.
Equalized values - .19, .24, .20, .24, .10
histogram equalization
• the probability of occurrence of intensity level rk in a digital image is approximated
by
• where MN is the total number of pixels in the image, and nk denotes the number of
pixels that have intensity rk .
• The discrete form of the transformation
• where, L is the number of possible intensity levels in the image (e.g., 256 for an 8-
bit image). Thus, a processed (output) image is obtained by mapping each pixel in
the input image with intensity rk into a corresponding pixel with level sk in the
output image, This is called a histogram equalization or histogram linearization
transformation.
• assume that
• Spatial filtering modifies an image by replacing the value of each pixel by a function of the values
of the pixel and its neighbors.
• If the operation performed on the image pixels is linear, then the filter is called a linear spatial
filter. Otherwise, the filter is a nonlinear spatial filter.
• A linear spatial filter performs a sum-of-products operation between an image f and a filter
kernel, w.
• The kernel is an array whose size defines the neighborhood of operation, and whose coefficients
determine the nature of the filter.
• At any point (x, y) in the image, the response, g(x, y), of the filter is the sum of
products of the kernel coefficients and the image pixels encompassed by the kernel
• As coordinates x and y are varied, the center of the kernel moves from pixel to pixel,
generating the filtered image, g, in the process.
• The center coefficient of the kernel, w(0, 0), aligns with the pixel at location (x, y).
• Linear spatial filtering of an image of size M × N with a kernel of size m × n is given
by the expression
• where x and y are varied so that the center (origin) of the kernel visits every pixel in
f once.
• The center coefficient of the kernel, w(0, 0), aligns with the pixel at location (x, y).
• For a kernel of size m × n, we assume that
m = 2a + 1 and
n = 2b + 1,
where a and b are nonnegative integers.
This means that our focus is on kernels of odd size in both coordinate
directions.
SPATIAL CORRELATION AND CONVOLUTION
• Spatial correlation consists of moving the center of a kernel over an image, and
computing the sum of products at each location.
• Correlation is a function of displacement of the filter kernel relative to the image.
• The mechanics of spatial convolution are the same, except that the correlation
kernel is rotated by 180°.
• Thus, when the values of a kernel are symmetric about its center, correlation and
convolution yield the same result.
1-D illustration
• 1-D function, f, and a kernel, w.
• Kernel of size m × n, we assume that m = 2a + 1 and n = 2b + 1, where a and b are
nonnegative integers
• The kernel is of size 1 × 5, a=0, b=2
• Linear spatial filtering of an image of size M × N
will be changed to
• Convolving a smoothing kernel with an image blurs the image, with the degree of
blurring being determined by
1. the size of the kernel and
2. the values of its coefficients.
• In a box kernel all rows and columns are identical, the rank of these kernels is 1,
means that they are separable.
• Box filters are suitable for quick experimentation and they often yield smoothing
results that are visually acceptable.
• They are useful also when it is desired to reduce the effect of smoothing on edges.
Box filtering
LOWPASS GAUSSIAN FILTER KERNELS
• The values of Gaussian kernel coefficients (and hence their effect) decreases as a
function of distance from the kernel center.
• Gaussian filter yield significantly smoother results around the edge transitions.
• Low pass filtering is a rugged, simple method for estimating shading patterns.
Shading correction
ORDER-STATISTIC (NONLINEAR) FILTERS
• Order-statistic filters are nonlinear spatial filters whose response is based on
ordering (ranking) the pixels contained in the region encompassed by the filter.
• Smoothing is achieved by replacing the value of the center pixel with the value
determined by the ranking result.
• The best-known filter in this category is the median filter, which, as its name
implies, replaces the value of the center pixel by the median of the intensity values
in the neighborhood of that pixel (the value of the center pixel is included in
computing the median).
• Median filters provide excellent noise reduction capabilities for certain types of
random noise, with considerably less blurring than linear smoothing filters of similar
size.
• Median filters are particularly effective in the presence of impulse noise (sometimes
called salt-and-pepper noise, when it manisfests itself as white and black dots
superimposed on an image).
ORDER-STATISTIC (NONLINEAR) FILTERS
• The median, of a set of values is such that half the values in the set are less than or
equal to and half are greater than or equal to .
• In order to perform median filtering at a point in an image, first sort the values of the
pixels in the neighborhood, determine their median, and assign that value to the pixel
in the filtered image corresponding to the center of the neighborhood.
• When several values in a neighborhood are the same, all equal values are grouped.
• the principal function of median filters is to force points to be more like their
neighbors.
• The median filter is the most useful order-statistic filter in image processing.
• The median represents the 50th percentile of a ranked set of numbers.
• Using the 100th percentile results in the max filter, which is useful for finding the
brightest points in an image or for eroding dark areas adjacent to light regions.
• The 0th percentile filter is the min filter.
Median filters
SHARPENING (HIGHPASS) SPATIAL FILTERS
• Sharpening highlights transitions in intensity.
• Uses of image sharpening range from electronic printing and medical imaging to
industrial Inspection and autonomous guidance in military systems.
• Sharpening is often referred to as high pass filtering.
• High frequencies (which are responsible for fine details) are passed, while low
frequencies are attenuated or rejected.
• Implement a 2-d, second-order derivatives and use for image sharpening.
• The approach consists of defining a discrete formulation of the second-order
derivative and then constructing a filter kernel based on that formulation.
sharpening
• Sharpening can be accomplished by spatial differentiation.
• high frequencies (which are responsible for fine details) are passed, while low
frequencies are attenuated or rejected.
Defining and implementing operators
for sharpening
by digital differentiation
Fundamental properties of first order and second order derivatives
in a digital context
• in the y-direction
define discrete approximations to the preceding equations, and from these formulate the
appropriate kernels.
The partial derivatives at all points in an image are obtained by convolving the image with
these kernels.
The intensities of pixels in a 3 × 3 region
• the value of the center point, z5, denotes the value of f (x, y) at an arbitrary location, (x, y)
• z1 denotes the value of f (x − 1, y − 1)
the simplest approximations to a first-order derivative
• When an image is convolved with a kernel whose coefficients sum to zero, the
elements of the resulting filtered image sum to zero also, so images convolved with
the kernels will have negative values in general.
• The computations of gx and gy are linear operations and are implemented using
convolution.
Vectors
Matrix
Toeplitz matrix
• A Toeplitz matrix T is a matrix that has constant elements along the main diagonal
and the subdiagonals.
Circulant Matrix
Orthogonal matrix
Unitary matrix