0% found this document useful (0 votes)
3K views31 pages

BM3652 - MIP - Unit 1 Notes

MEDICAL IMAGE PROCESSING REGULATION 2021

Uploaded by

suhagaja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3K views31 pages

BM3652 - MIP - Unit 1 Notes

MEDICAL IMAGE PROCESSING REGULATION 2021

Uploaded by

suhagaja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

DEPARTMENT OF BIOMEDICAL ENGINEERING

BM3652 – Medical Image Processing

NOTES

UNIT I FUNDAMENTALS OF MEDICAL IMAGE PROCESSING AND TRANSFORMS 9+3


Overview of Image Processing system and human Visual system- Image representation – pixel and
voxels, Gray scale and color models- Medical image file formats- DICOM, ANALYZE 7.5, NIFTI and
INTERFILE- Discrete sampling model and Quantization- Relationship between the pixels, Arithmetic
and logical operations- Image quality and Signal to Noise ratio- Image Transforms- 2D DFT, DCT,
KLT. Interpret the basics of image models, Digitization of images and the transformations of medical
images using Matlab.

1
UNIT-1
IMAGE FUNDAMENTALS AND TRANSFORMS

1.1 Introduction
The digital image processing deals with developing a digital system that performs
operations on a digital image. An image is nothing more than a two dimensional signal. It is
defined by the mathematical function f(x,y) where x and y are the two co-ordinates
horizontally and vertically and the amplitude of f at any pair of coordinate (x, y) is called the
intensity or gray level of the image at that point. When x, y and the amplitude values of f are all
finite discrete quantities, we call the image a digital image. The field of image digital image
processing refers to the processing of digital image 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 values of these elements are referred to as picture elements, image
elements and pixels.
Digital image processing focuses on two major tasks
– Improvement of pictorial information for human interpretation
– Processing of image data for storage, transmission and representation for
autonomous machine perception.
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.
The input of that system is a digital image and the system process that image using efficient
algorithms, and gives an image as an output. The most common example is Adobe
Photoshop. It is one of the widely used applications for processing digital images.

1.2 Structure of Human Eye:


The eye is nearly a sphere with average approximately 20 mm diameter. The eye is
enclosed with three membranes
a) The cornea and sclera - it is a tough, transparent tissue that covers the anterior surface of the
eye. Rest of the optic globe is covered by the sclera
b) The choroid –It contains a network of blood vessels that serve as the major source of nutrition
to the eyes. It helps to reduce extraneous light entering in the eye.
It has two parts
Iris Diaphragms- it contracts or expands to control the amount of light that enters the eyes
Ciliary body
c) Retina – it is innermost membrane of the eye. When the eye is properly focused, light from
an object outside the eye is imaged on the retina. There are various light receptors over the
surface of the retina. The two major classes of the receptors are-
1) Cones - it is in the number about 6 to 7 million. These are located in the central portion of the
2
retina called the fovea. These are highly sensitive connected to its own nerve end. Cone vision is
called photopic or bright light vision
2) Rods – these are very much in number from 75 to 150 million and are distributed over the
entire retinal surface. The large area of distribution and the fact that several roads are connected

Fig 1.1 Structure of Eye


to a single nerve give a general overall picture of the field of view. They are not involved in the
color vision and are sensitive to low level of illumination. Rod vision is called is scotopic or dim
light vision. The absent of reciprocators is called blind spot.

1.3 Image Formation in the Eye:

 The major difference between the lens of the eye and an ordinary optical lens in that the
former is flexible.
 The shape of the lens of the eye is controlled by tension in the fiber of the ciliary body.
To focus on the distant object the controlling muscles allow the lens to become thicker
in order to focus on object near the eye it becomes relatively flattened.
 The distance between the center of the lens and the retina is called the focal length and
it varies from 17mm to 14mm as the refractive power of the lens increases from its
minimum to its maximum.
 When the eye focuses on an object farther away than about 3m.the lens exhibits its lowest
refractive power. When the eye focuses on a nearly object. The lens is most strongly
refractive.
 The retinal image is reflected primarily in the area of the fovea. Perception then takes

3
place by the relative excitation of light receptors, which transform radiant energy
into electrical impulses that are ultimately decoded by the brain.

Fig 1.2 Image Formation in eye


• Focal length of the eye: 17 to 14 mm
• Let h be the height in mm of that object in
the retinal image, then 15/100 = h
/ 17 , h = 2.55mm

• The retinal image is reflected primarily in the area of the fovea.

1.4 Brightness Adaption and Discrimination:

Digital image are displayed as a discrete set of intensities. The range of light
intensity levels to which the human visual system can adopt is enormous- on the order of
1010-from scotopic threshold to the glare limit. Experimental evidences indicate that
subjective brightness is a logarithmic function of the light intensity incident on the eye.

4
 The curve represents the range of intensities to which the visual system can adopt. But the visual
system cannot operate over such a dynamic range simultaneously. Rather, it is accomplished by
change in its overcall sensitivity called Brightness adaptation.
 For any given set of conditions, the current sensitivity level to which of the visual system is
called brightness adoption level , Ba in the curve. The small intersecting curve represents the
range of subjective brightness that the eye can perceive when adapted to this level. It is restricted
at level Bb, at and below which all stimuli are perceived as indistinguishable blacks. The upper
portion of the curve is not actually restricted. Whole simply raise the adaptation level higher than
Ba.
 The ability of the eye to discriminate between changes in light intensity at any specific
adaptation level is also of considerable interest. This is called as Brightness Discrimination.
 The fact brightness discrimination in known by Weber‘s law. Take a flat, uniformly illuminated
area large enough to occupy the entire field of view of the subject. It may be a diffuser such as
an opaque glass, that is illuminated from behind by a light source whose intensity, I can be
varied. To this field is added an increment of illumination ΔI in the form of a short duration flash
that appears as circle in the center of the uniformly illuminated field.
 If ΔI is not bright enough, the subject cannot see any perceivable changes.

Weber's Law states that the ratio of the increment threshold to the background intensity is a constant.

Weber Ratio: ∆Ic / I where I is the light source intensity and ∆Ic is increment in illumination. A small
value of Weber ratio means Good brightness discrimination. A large value of Weber ratio means Poor
brightness discrimination.
An image is a two-dimensional function f(x,y), where x and y are the spatial (plane) coordinates, and
the amplitude of f at any pair of coordinates (x,y) is called the intensity of the image at that level.
(b)Photopic vision is the vision of the eye under well-lit conditions (luminance level 10 to 108 cd/m²).
In humans and many other animals, photopic vision allows color perception, mediated by cone cells,
and a significantly higher visual acuity and temporal resolution than available with scotopic vision.
(c)Weber Ratio: ∆Ic / I where I is the light source intensity and ∆Ic is increment in illumination.
A small value of Weber ratio means Good brightness discrimination.
A large value of Weber ratio means Poor brightness discrimination.
(d)The principle objectives of image enhancement techniques is to process an image so that
the result is more suitable image than the original image for a specific application.
(e)Log transformation technique is applied to compress the dynamic range of gray levels in an
image.

5
s=c log (1+r) where c is constant and it is assumed that r≥0 .
(f)The enhancement techniques that are using arithmetic operators are
(i)Image subtraction
(ii)Image Averaging

Match band Effect


Mach bands or the Mach effect refers to an optical phenomenon from edge enhancement due to lateral
inhibition of the retina 2. This is an inbuilt edge enhancement mechanism of the retina, where the
edges of darker objects next to lighter objects will appear darker and vice versa, creating a false
shadow

1.5 Fundamental Steps in Digital Image Processing:

Fig 1.3 Fundamental Steps of Digital Image Processing

6
There are two categories of the steps involved in the image processing
(1) Methods whose outputs are input are images.
(2) Methods whose outputs are attributes extracted from those images.

There are some fundamental steps but as they are fundamental, all these steps may have sub- steps.
The fundamental steps are described below with a neat diagram.
Image Acquisition: This is the first step or process of the fundamental steps of digital image
processing. Image acquisition could be as simple as being given an image that is already in
digital form. Generally, the image acquisition stage involves preprocessing, such as scaling etc.
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.
Image Restoration: Image restoration is an area that also deals with improving the appearance of an
image. However, unlike enhancement, which is subjective, image restoration is objective, in the
sense that restoration techniques tend to be based on mathematical or probabilistic models of
image degradation.
Color Image Processing: Color image processing is an area that has been gaining its importance
because of the significant increase in the use of digital images over the Internet. This may include
color modeling and processing in a digital domain etc.
Wavelets and Multiresolution Processing: Wavelets are the foundation for representing images in
various degrees of resolution. Images subdivision successively into smaller regions for data
compression and for pyramidal representation.
Compression: Compression deals with techniques for reducing the storage required to save an image
or the bandwidth to transmit it. Particularly in the uses of internet it is very much necessary to
compress data. It has to major approaches a) Lossless Compression b) Lossy Compression.
Morphological Processing: Morphological processing deals with tools for extracting image
components that are useful in the representation and description of shape.
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.
Representation and Description: Representation and description almost always follow the output of
a segmentation stage, which usually is raw pixel data, constituting either the boundaryof a region
or all the points in the region itself. Choosing a representation is only part of the solution for
transforming raw data into a form suitable for subsequent computer processing. Description
deals with extracting attributes that result in some quantitative information of interest or are basic
for differentiating one class of objects from another.
Object recognition: Recognition is the process that assigns a label, such as, ―vehicle‖ to an object
based on its descriptors.

7
Knowledge Base: Knowledge may be as simple as detailing regions of an image where the
information of interest is known to be located, thus limiting the search that has to be conducted
in seeking that information. The knowledge base also can be quite complex, such as an
interrelated list of all major possible defects in a materials inspection problem or an image
database containing high-resolution satellite images of a region in connection with change-
detection applications.

1.6 Components of Image processing system:

Image Sensors: With reference to sensing, two elements are required to acquire digital image. The
first is a physical device that is sensitive to the energy radiated by the object we wish to image
and second is specialized image processing hardware.
Specialize image processing hardware: It consists of the digitizer just mentioned, plus
hardware that performs other primitive operations such as an arithmetic logic unit, which
performs arithmetic such addition and subtraction and logical operations in parallel on images
Computer: It is a general purpose computer and can range from a PC to a supercomputer
depending on the application. In dedicated applications, sometimes specially designed computer
are used to achieve a required level of performance.
Software: It consists of specialized modules that perform specific tasks a well-designed package also
includes capability for the user to write code, as a minimum, utilizes the specialized module.
More sophisticated software packages allow the integration of these modules.
Mass storage: This capability is a must in image processing applications. An image of size 1024
x1024pixels ,in which the intensity of each pixel is an 8- bit quantity requires one megabytes of
storage space if the image is not compressed .Image processing applications falls into three
principal categories of storage
i) Short term storage for use during processing
ii) On line storage for relatively fast retrieval
iii) Archival storage such as magnetic tapes and disks
Image displays: Image displays in use today are mainly color TV monitors. These monitors are driven
by the outputs of image and graphics displays cards that are an integral part of computer system

8
Fig1.4 Components of Image processing system
Hardcopy devices : The devices for recording image includes laser printers, film cameras, heat
sensitive devices inkjet units and digital units such as optical and CD ROM disk. Films provide
the highest possible resolution, but paper is the obvious medium of choice for written
applications.
Networking: It 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 bandwidth.
1.7 Image Formation Model:
An image is denoted by a two dimensional function 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.
When an image is generated by a physical process, its values are proportional to energy radiated by a
physical source. As a consequence, f(x,y) must be nonzero and finite; that is o<f(x,y) <co.
The function f(x,y) may be characterized by two components-
The amount of the source illumination incident on the scene being viewed.
The amount of the source illumination reflected back by the objects in the scene These are called
illumination and reflectance components and are denoted by i (x,y) and r (x,y) respectively. The
functions combine as a product to form f(x,y).
We call the intensity of a monochrome image at any coordinates (x,y) the gray level (l) of the image at
that point

9
l= f (x, y.)
L min ≤ l ≤ L max
L min is to be positive and L max must be finite L min = I min r min L max = I max r max
The interval [L min, L max] is called gray scale. Common practice is to shift this interval numerically
to the interval [0, L-l] where l=0 is considered black and l= L-1 is considered white on the gray
scale. All intermediate values are shades of gray of gray varying from black to white.

Definition for Pixels and Voxels


Pixel: The pixel -- a word invented from picture element -- is the basic unit of programmable color on
a computer display or in a computer image. Pixels are the smallest unit in a digital display.
Voxel: In computer-based modelling or graphic simulation) each of an array of elements of volume
that constitute a notional three-dimensional space, especially each of an array of discrete
elements into which a representation of a three-dimensional object is divided.
The word voxel originated by analogy to "pixel", with vo representing "volume" (instead of pixel's
"picture") and el representing "element"; a similar formation with el for "element" is the word
"texel". The term hyper voxel is a generalization of voxel for higher-dimensional spaces.

1.8 Image Sampling and Quantization:

 To create a digital image, we need to convert the continuous sensed data into digital from. This
involves two processes – sampling and quantization. An image may be continuous with respect
to the x and y coordinates and also in amplitude. To convert it into digital form we have to sample
the function in both coordinates and in amplitudes.

• Digitalizing the coordinate values is called sampling


• Digitalizing the amplitude values is called quantization
 There is a continuous the image along the line segment AB. To simple this function, we take
equally spaced samples along line AB. The location of each samples is given by a vertical tick
back (mark) in the bottom part. The samples are shown as block squares superimposed on
function the set of these discrete locations gives the sampled function.

10
Fig 1.5 Sampling and Quantization
• In order to form a digital, the gray level values must also be converted (quantized) into discrete
quantities. So we divide the gray level scale into eight discrete levelsranging from block to white.
The vertical tick mark assign the specific value assigned to each of the eight level values.
 The continuous gray levels are quantized simply by assigning one of the eight discrete gray
levels to each sample. The assignment it made depending on the vertical proximity of a simple to
a vertical tick mark.
 Starting at the top of the image and covering out this procedure line by line produces a two
dimensional digital image.
 if a signal is sampled at more than twice its highest frequency component, then it can be
reconstructed exactly from its samples.
 But, if it is sampled at less than that frequency (called under sampling), then aliasing
will result.

11
 This causes frequencies to appear in the sampled signal that were not in the original signal.
 Note that subsampling of a digital image will cause under sampling if the subsampling rate is
less than twice the maximum frequency in the digital image.
 Aliasing can be prevented if a signal is filtered to eliminate high frequencies so that its highest
frequency component will be less than twice the sampling rate.
 Gating function: exists for all space (or time) and has value zero everywhere except for a finite
range of space/time. Often used for theoretical analysis of signals. But, a gating signal is
mathematically defined and contains unbounded frequencies.
 A signal which is periodic, x(t) = x(t+T) for all t and where T is the period, has a finite maximum
frequency component. So it is a band limited signal.
 Sampling at a higher sampling rate (usually twice or more) than necessary to prevent aliasing is
called oversampling.

1.9 Zooming and Shrinking of Digital Images:

Zooming may be said oversampling and shirking may be called as under sampling these techniques are
applied to a digital image. These are two steps of zooming
i )Creation of new pixel locations
ii) Assignment of gray level to those new locations.
 In order to perform gray –level assignment for any point in the overly, we look for the closest pixel
in the original image and assign its gray level to the new pixel in the grid. This method rowan as
nearest neighbor interpolation
 Pixel replication - Is a special case of nearest neighbor interpolation, it is applicable if we want
to increase the size of an image an integer number of times.
 For eg. - To increase the size of image as double. We can duplicate each column. This doubles
the size of the image horizontal direction. To increase assignment of each of each vertical
direction we can duplicate each row. The gray level assignment of each pixel is determined by the fact
that new locations are exact duplicates of old locations.
 Drawbacks
Although nearest neighbor interpolation is fast, it has the undesirable feature that it
produces a check board that is not desirable
 Bilinear interpolation-Using the four nearest neighbor of a point .let (x,y) denote the coordinate
of a point in the zoomed image and let v(x1,y1) denote the gray levels assigned to it .for bilinear
interpolation. The assigned gray levels is given by
V(x1,y1) - ax1+by1+cx1y1+d
Where the four coefficient are determined from the four equation in four unknowns that can be
writing using the four nearest neighbor of point (x1,y1).
 Shrinking is done in the similar manner .the equivalent process of the pixel replication is row–
column deletion .shrinking leads to the problem of aliasing.

12
1.10 Basic relationship between pixels:

1) Neighbor of a pixel

The result of segmentation is a set of regions. Regions have then to be represented and described. Two
main ways of representing a region: - external characteristics (its boundary): focus on shape - internal
characteristics (its internal pixels): focus on color, textures… The next step: description E.g.: a region
may be represented by its boundary, and its boundary described by some features such as length,
regularity… Features should be insensitive to translation, rotation, and scaling. Both boundary and
regional descriptors are often used together. In order to represent a boundary, it is useful to compact
the raw data (list of boundary pixels) Chain codes: list of segments with defined length and direction
- 4-directional chain codes
- 8-directional chain codes

There are three kinds of neighbors of a pixel:


i. N4(p) 4-neighbors: the set of horizontal and vertical neighbors
ii. ND(p) diagonal neighbors: the set of 4 diagonal neighbors
iii. N8(p) 8-neighbors: union of 4-neighbors and diagonal neighbors

A pixel ‗p‘ at coordinate (x,y) has four horizontal and vertical neighbor whose coordinate can be given
by (x+1, y) (X-1, y) (X, y + 1) (X, y-1)
This set of pixel called the 4-neighbours of p is denoted by n4 (p), Each pixel is a unit distance from
(x,y) and some of the neighbors of P lie outside the digital image of (x,y) is on the border if the image
.The four diagonal neighbor of P have coordinated neighbors of P denoted by ns (p)
(x+1, y+1), (x+1, y+1), (x-1, y+1), (x-1, y-1)

2) Adjacency
Two pixels that are neighbors and have the same grey-level (or some other specified similarity
criterion) are adjacent .Pixels can be 4-adjacent, diagonally adjacent, 8- adjacent, or m-adjacent.
m-adjacency (mixed adjacency):
Two pixels p and q of the same value (or specified similarity) are m-adjacent if either
i. q and p are 4-adjacent, or
ii. p and q are diagonally adjacent and do not have any common 4-adjacent neighbors. They cannot
be both (i) and (ii).

13
• Path:
– The length of the path
– Closed path
• Connectivity in a subset S of an image
– Two pixels are connected if there is a path between them that lies completely within S.

• Connected component of S:
– The set of all pixels in S that are connected to a given pixel in S.
• Region of an image
• Boundary, border or contour of a region
• Edge: a path of one or more pixels that separate two regions of significantly different gray levels.

3) Distance measures
a. Distance function: a function of two points, p and q, in space that satisfies three criteria
(a) D( p, q) = 0
(b) D( p, q) = D(q, p),
(c) D( p, z) = D( p, q) + D(q, z)

b. The Euclidean distance De(p, q)


De (p, q) =

c. The city-block (Manhattan) distance D4(p, q)

D4 (p, q) =| x - s | + | y - t |

d. The chessboard distance D8(p, q)


D8 (p, q) = max (| x - s |,| y - t |)

Medical Image file Formats


DICOM - A DICOM image file is an outcome of the Digital Imaging and Communications in
Medicine standard. Specifically, image files that are compliant with part 10 of the DICOM standard are
generally referred to as ―DICOM format files‖ or simply ―DICOM files‖ and are represented as ―.dcm.‖

The encoding of the presentation address depends on the network transport protocol.

For objects exchanged using the PS3.8 DICOM Upper Layer Protocol for TCP/IP, the presentation
address shall be encoded as a URI consisting of the scheme "dicom" followed by a colon, then either
the fully qualified host name or IP address, followed by a colon and then the port number. E.g., "dicom:
127.0.0.1:104", "dicom:myhost.mydomain.com:104".

14
For objects exchanged using the PS3.18 Web Services, the presentation address shall be encoded as the
absolute URL of the endpoint of the base of the resource or service, sufficient to identify the system.
The presentation address is not expected to be the complete address of the resource. The scheme shall
be "http", regardless of whether secure transport was actually used or not.

The File Meta Information includes identifying information on the encapsulated Data Set. This header
consists of a 128 byte File Preamble, followed by a 4 byte DICOM prefix, followed by the File Meta
Elements. This header shall be present in every DICOM file.

The File Preamble is available for use as defined by Application Profiles or specific implementations.
This Part of the DICOM Standard does not require any structure for this fixed size Preamble. It is not
required to be structured as a DICOM Data Element with a Tag and a Length. It is intended to facilitate
access to the images and other data in the DICOM file by providing compatibility with a number of
commonly used computer image file formats.

Analyze 7.5 :
It is a file format, developed by the Mayo Clinic, for storing MRI data. An Analyze 7.5 data set consists
of two files: Header file (filename .hdr ) — Provides information about dimensions, identification, and
processing history.
NIFTI: NIfTI (Neuroimaging Informatics Technology Initiative) is a data format for the storage of
Functional Magnetic Resonance Imaging (fMRI) and other medical images. The NIfTI format is adapted
from Analyze™ 7.5, developed by Biomedical Imaging Resource (BIR) at Mayo Clinic.

INTERFILE: Interfile is a file format developed for data in Nuclear Medicine (Todd-Pokropek A,
Cradduck TD, Deconinck F, A file format for the exchange of nuclear medicine image data: a
specification of Interfile version 3.3, Nucl Med Commun.

15
In formats that adopt a fixed-size header, the pixel data start at a fixed position after skipping the
header length. In the case of variable length header, the starting location of the pixel data is marked
by a tag or a pointer. In any case, to calculate the pixel data size, we have to do:

where the pixel depth is expressed in bytes. The image file size will be given by:

Header Size + Pixel Data Size

Arithmetic and Logical operations in Images

Logical operations apply only to binary images, whereas arithmetic operations apply to multi-valued
pixels. Logical operations are basic tools in binary image processing, where they are used for tasks
such as masking, feature detection, and shape analysis.
Arithmetic and Logical Operations

These operations are applied on pixel-by-pixel basis. So, to add two images together, we add the
value at pixel (0 , 0) in image 1 to the value at pixel (0 , 0) in image 2 and store the result in a new
image at pixel (0 , 0). Then we move to the next pixel and repeat the process, continuing until all
pixels have been visited.
Clearly, this can work properly only if the two images have identical dimensions.
Addition can also be used to combine the information of two images, such as an image
morphing, in motion pictures.

16
Algorithm 1: image addition
read input-image1 into in-array1;
read input-image2 into in- array2;
for i = 1 to no-of-rows do
for j=1 to no-of-columns do
begin
out-array (i,j) = in-array1(i,j) + in-array2(i,j);
if ( out-array (i,j) > 255 ) then
out-array (i,j) = 255;end
write out-array to out-image;

a b c
Figure a) noisy image b) average of five observation c) average of ten observation
Subtraction

Subtracting two 8-bit grayscale images can produce values between - 225 and +225. This necessitates
the use of 16-bit signed integers in the output image unless sign is unimportant, in which case we can
simply take the modulus of the result and store it using 8-bit integers:
g(x,y) = |f1 (x,y) f2 (x,y)|
The main application for image subtraction is in change detection (or motion detection). Subtraction
can also be used in medical imaging to remove static background information.
Algorithm2: image subtraction
read input-image1 into in-array1; read input-image2 into in- array2;for i = 1 to no-of-rows do
for j=1 to no-of-columns dobegin
out-array (i,j) = in-array1(i,j) - in-array2(i,j);
if ( out-array (i,j) < 0 ) then out-array (i,j) = 0; endwrite out-array to out-image;

Figure a, b ) two frames of video sequence c) their difference

17
Multiplication and division

Multiplication and division can be used to adjust brightness of an image. Multiplication of pixel
values by a number greater than one will brighten the image, and division by a factor greater than
one will darken the image. Brightness adjustment is often used as a preprocessing step in image
enhancement.

(a) (b) (c)


Figure a) original image b) image multiplied by 2 c) image divided by 2

Logical operations

Logical operations apply only to binary images, whereas arithmetic operations apply to multi-valued
pixels. Logical operations are basic tools in binary image processing, where they are used for tasks
such as masking, feature detection, and shape analysis. Logical operations on entire image are
performed pixel by pixel.

Logical AND & OR operations are useful for the masking and compositing of images. So, masking
is a simple method to extract a region of interest from an image.

18
In addition to masking, logical operation can be used in feature detection. Logical operation can be
used to compare between two images, as shown below:

AND
This operation can be used to find the similarity white regions of twodifferent images (it required two
images).
g (x,y) = a (x,y) ^ b (x,y)

Exclusive OR
This operator can be used to find the differences between white regions of twodifferent images (it
requires two images).

NOT
NOT operation can be performed on gray- and the result of this operation is the
negative of theoriginal image.
g (x,y) = 255- f (x,y)

Figure a) input image a(x,y); b) input image b(x,y) ; c) a(x,y) ^ b(x,y) ;


d) a(x,y) ^ ~ b(x,y)

Image Quality and Signal to Noise Ratio

The few imaging artifacts which stem from the particular properties of imaging systems. These
artifacts can, of course, reduce diagnostic information content of images and are to be avoided.
However, another source of reduced image quality is noise. The term noise describes all types of
stochastic signals which are not related to image content. In x-ray imaging, noise is usually
introduced by a lack of dose; in photography, images tend to get noisy if the ambient lighting is
insufficient. The reason in both cases is simple – since image noise is a stochastic signal, its
amplitude is independent of the usable signal. If the imaging signal itself is of small amplitude, the

19
noise becomes more visible. A measure to quantify the noisiness of images is the signal-to-noise-
ratio (SNR). One possible definition is given as:

¯ρ ... average pixel gray value


σ (ρUniform Area ) ... standard deviation in a signal-free area of the image
From the above equation, it is obvious why an underexposed image becomes grainy. The energy
impacted (in terms of visible light or dose) is proportional to the gray value ρ, whereas the noise
remains the same. The reason lies in the fact that the image noise, which can have numerous origins,
is not necessarily connected to the original signal. While SNR is an important measure of detector
efficiency and image quality, it does not give an idea of the ability of an imaging system to resolve
fine detail, and it does not necessarily give a figure of the information content of an image.
This is characterized by two more important measures, the point spread function (PSF) and the
modulation transfer function (MTF), gives an idea how the SNR can be computed from an image in
dependence of the dose applied. However, since the average signal is not always a useful measure,
on can also define the contrast-to-noise-ratio (CNR). Here, the average gray value is replaced by the
absolute value of the difference between the maximal and minimal signal:

ρmax, ρmin = maximal and minimal gray value


σ (ρUniform Area ) =standard deviation in a signal-free area of the image

Color image processing


In 1666, Isaac Newton discovered that when a beam of sunlight passes through a glass prism, the
emerging beam is split into a spectrum of colors. The human visual system can distinguish hundreds
of thousands of different color 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 color, and this extra
information can then be used to simplify image analysis, e.g. object identification and extraction
based on color. Three independent quantities are used to describe any particular color. The hue is
determined by the dominant wavelength. Visible colors occur between about 400nm (violet) and
700nm (red) on the electromagnetic spectrum,
Color Fundamentals
 6 to 7 million cones in the human eye can be divided into three principal sensing
categories, corresponding roughly to red, green, and blue.
 65%: red 33%: green 2%: blue (blue cones are the most sensitive)
 The characteristics generally used to distinguish one color from another are
brightness, hue, and saturation.
 Brightness: the achromatic notion of intensity.
 Hue: dominant wavelength in a mixture of light waves, represents dominant color as
perceived by an observers.

20
 Saturation: relative purity or the amount of white light mixed with its hue.

Color models:

Different color models are:


• RGB: Color Monitor, Color Camera, Color Scanner
• CMY: Color Printer, Color Copier
• YIQ: Color TV, Y(luminance), I(In phase), Q(quadrature) – HSI, HSV

The purpose of a color model is to facilitate the specification of colors in some standard. In essence, a
color model is a specification of a coordinate system and a subspace within that system where each color
is represented by a single point. Most color models are oriented either toward specific hardware or
toward applications. Red, green, and blue, three primary colors. Cone cells in human eye are
responsible for color vision.

The RGB Model


In the RGB model each color appears in its primary spectral components of red, green and blue.
The model is based on a Cartesian coordinate system RGB values are at 3 corners. Cyan magenta and

21
yellow are at three other corners. Black is at the origin. White is the corner furthest from the origin.
Different colors are points on or inside the cube represented by RGB vectors. Images represented in the
RGB color model consist of three component images – one for each primary color. When fed into a
monitor these images are combined to create a composite color image. The number of bits used to
represent each pixel is referred to as the
color depth. A 24-bit image is often referred to as a full-color image as it allows16, 777,216 colors
.The RGB model is used for color monitors and most video cameras.

The CMY Model:

The CMY (cyan- magenta- yellow) model is a subtractive model appropriate to absorption of
colors, for example due to pigments in paints. Whereas the RGB model asks what is added to black to
get a particular color, 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 colors. When a surface coated with
cyan pigment is illuminated by white light, no red light is reflected, and similarly for magenta and green,
and yellow and blue. The CMY model is used by printing devices and filters. Equal amounts of the
pigment primaries, cyan, magenta, and yellow should produce black. In practice, combining these colors
for printing produces a muddy- looking black.

To produce true black, the predominant color in printing, the fourth color, black, is added, giving rise to

22
the CMYK color model. The primary colors (R, G, B) can be added to produce the secondary colors.
 Red plus blue can generate magenta
 Green plus blue can generate cyan
 Red plus green can generate yellow

The HIS Model:


Human eye distinguish one color from the other based on hue, saturation, and brightness. Hue, is a color
that is evoked by a single wavelength of light in the visible spectrum, or by a relatively narrow band of
wavelengths; hue represents dominant color as perceived by the observer.
Saturation (purity) refers to the relative amount of white light mixed with a hue; it is inversely
proportional to the amount of white light added; to de saturate a color of given intensity in a
subtractive system (such as watercolor), one can add white, black, gray.
Brightness embodies the achromatic notion of intensity.
Hue and saturation together are called chromaticity. For any particular color, the amounts of red, green,
and blue needed to form it are called tristimulus values, and they are denoted as X, Y, and Z.A color is
specified by its trichromatic coefficients, defined as

CIE chromaticity diagram: It is a function of x (red) and y (green), z can be derived by z =1-x-y

23
CIE chromaticity diagram

Any color located on the boundary of the chromaticity chart is fully saturated; any point not on the
boundary but within the diagram represents some mixture of spectrum colors The point of equal energy
represents the standard white light; its saturation is zero
As a point leaves the boundary and approaches the point of equal energy, more white light is added to the
color and it becomes less saturated
A straight line segment joining any two points in the diagram defines all the different color variations that
can be obtained by combining these two colors additively
The HIS model uses three measures to describe colors, hue, saturation, and intensity

 Their relationship can be represented in a cylindrical coordinate system


 angle around the central vertical axis corresponds to "hue",
 the distance from the axis corresponds to "saturation",
 The distance along the axis corresponds to "value"

Conversion from RGB to HIS

24
Conversion from HSI to RGB

Pseudo color Image Processing:

Pseudo color image processing consists of assigning colors to grey values based on a specific
criterion
 The principle use of Pseudo color image processing is for human visualization
 Humans can discern between thousands of color shades and intensities, compared to
only about two dozen or so shades of grey

Intensity Slicing
Intensity slicing and color coding is one of the simplest kinds of pseudo color image processing
 First we consider an image as a 3D function mapping spatial coordinates to intensities
(that we can consider heights)
 Now consider placing planes at certain levels parallel to the coordinate plane
 If a value is one side of such a plane it is rendered in one color, and a different color
if on the other side. Intensity slicing and color coding is one of the simplest kinds of pseudo color
image processing

25
Intensity slicing and color coding is one of the simplest kinds of Pseudo color image processing In
general intensity slicing can be summarized as:
Let [0, L-1] represent the grey scale
 Let l0 represent black [f(x, y) = 0] and let lL-1 represent white [f(x, y) = L-1]
 Suppose P planes perpendicular to the intensity axis are defined at levels l1, l2, …, lp
 Assuming that 0 < P < L-1, then the P planes partition the grey scale into P + 1
intervals
V1, V2,…,VP+1
Grey level color assignments can then be made according to the relation:

Where ck is the color associated with the kth intensity level Vk defined by the partitioning planes at l = k
– 1and l = k

Full Color Image Processing

Full color image processing approaches fall into two major categories.
 Process each component image individually and form composite processed color
image from the individually processed components
 Work with color pixels directly; color pixels really are vectors:

Note: the results of individual color component processing are not always equivalent to direct
processing in color vector space. Processing is equivalent if:
(1) The process is applicable to both scalars and vectors;
(2) The operation on each component of a vector is independent of the other components.

26
Result for per-color-component and vector-based processing is equivalent.
Image Transforms - 2D DFT (Discrete Fourier Transform)

Discrete Fourier Transform and the Frequency Domain


Any function that periodically reports itself can be expressed as a sum of sines and cosines of different
frequencies each multiplied by a different coefficient, this sum is called Fourier series. Even the
functions which are non-periodic but whose area under the curve if finite can also be represented in such
form; this is now called Fourier transform.
A function represented in either of these forms and can be completely reconstructed via an inverse
process with no loss of information.

1-D Fourier Transformation and its Inverse

If there is a single variable, continuous function f(x), then Fourier transformation F (u) may
be given as

And the reverse process to recover f(x) from F(u) is

The above equations comprise of Fourier transformation pair.


Fourier transformation of a discrete function of one variable f(x), x=0, 1, 2, m-1 is given by

to obtain f(x) from F(u)

f (x) =

Now each of the m terms of F (u) is called a frequency component of transformation

Discrete Fourier Transform and its Properties

In the two-variable case the discrete Fourier transform pair is

27
When images are sampled in a squared array, i.e. M=N, we can write

28
29
Separability

The inverse of a multi-dimensional DCT is just a separable product of the inverse(s) of the corresponding
one-dimensional DCT , e.g. the one-dimensional inverses applied along one dimension at a time
Symmetry – Another look at the row and column operations reveals that these operations are functionally
identical. Such a transformation is called a symmetric transformation. – A separable and symmetric
transform can be expressed in the form – where A is a NxN symmetric transformation matrix

30
Computational efficiency – Inverse transform – DCT basis functions are orthogonal. Thus, the inverse
transformation matrix of A is equal to its transpose i.e. A-1= A T. This property renders some reduction
in the pre-computation complexity.

KLT ( Karhunen – Loeve Transform)


The KL Transform is also known as the Hoteling transform or the Eigen Vector transform. The KL
Transform is based on the statistical properties of the image and has several important properties that
make it useful for image processing particularly for image compression.
It can be also known as
1.Eigen vector transform 2.The method of Principal Components
It is based on the statistical properties of vector representation. As we know the important statistical
properties like Mean and Variance
Mean is Where E – Expected Value
Variance

Then Covariance
The basic function of KLT is orthogonal eigen vectors of the covariance matrix. KLT optimally
decorrelates the input data.
Drawbacks of KLT
1. Basic function has to be calculated for each signal model and has no mathematical structure.
2.KLT requires Multiply/ADD operations. But DFT require multiplications.
Applications
1. It is used for clustering analysis to determine new co-ordinate system for sample data. This is known
as PCA( Principal Component Analysis).
2. It contains largest number of zero valued components. Therefore it can be used for compression.

31

You might also like