Image Fusion Report
Image Fusion Report
PROJECT REPORT
ON
1) Abstract Page No 1 - 2
2) Chapter – 1 Page No
3 - 12
3) Chapter – 2 Page No
13 - 20
4) Chapter – 3 Page No
21 - 23
IMAGE FUSION
5) Chapter – 4 Page No
24 - 26
APPLICATIONS
6) Chapter – 5 Page No
27 - 30
7) Chapter – 6 Page No
31 – 35
BLOCK DIAGRAM OF SEGMENTATION
8) Chapter – 7 Page No
36 – 57
INTRODUCTION TO COSINE
Index
9) Chapter – 8 Page No
58 – 62
COSINE DECOMPOSITION
63 – 66
INTRODUCTION T0 MATLAB
67 – 71
72 - 73
Aim: The goal of image fusion is to create new images that are more suitable for the
Description:
The objective of the image fusion is to combine the source images of the same
scene to form one composite image that contains a more accurate description of the scene
than any individual source images. Image fusion methods can be broadly classified into
two - spatial domain fusion and transform domain fusion. The fusion methods such as
In this project, we propose a new multiresolution data fusion scheme based on the
COSINE transform. In order to get a more ideal fusion result, a linear local mapping
which based on the SEGMENTATION is used to create a new "origin" image of the
Satellite imaging, Medical imaging , Robot vision , Concealed weapon detection, Multi-
focus image fusion, Digital camera application, Concealed weapon detection,Battle field
monitoring.
Experimental results confirm that the proposed algorithm is the best image
sharpening method and can best maintain the spectral information of the original image.
Also, the proposed technique performs better than the other ones, more robust and
effective, from both subjective visual effects and objective statistical analysis results. The
performance of the image fusion is evaluated by normalized least square error, entropy,
CHAPTER - 1
Image:
instead of text or a program. Pixels are the basic building blocks of all digital images.
Pixels are small adjoining squares in a matrix across the length and width of your digital
image. They are so small that you don’t see the actual pixels when the image is on your
computer monitor.
Pixels are monochromatic. Each pixel is a single solid color that is blended from
some combination of the 3 primary colors of Red, Green, and Blue. So, every pixel has a
RED component, a GREEN component and BLUE component. The physical dimensions
of a digital image are measured in pixels and commonly called pixel or image resolution.
Pixels are scalable to different physical sizes on your computer monitor or on a photo
print. However, all of the pixels in any particular digital image are the same size. Pixels
expressed in pixels. The pixel dimensions may be determined by multiplying both the
width and the height by the dpi. A digital camera will also have pixel dimensions,
expressed as the number of pixels horizontally and vertically that define its resolution
(e.g., 2,048 by 3,072). Calculate the dpi achieved by dividing a document's dimension
Fig: An 8" x 10" document that is scanned at 300 dpi has the pixel dimensions of 2,400
Images in MATLAB:
The basic data structure in MATLAB is the array, an ordered set of real or
complex elements. This object is naturally suited to the representation of images, real-
each element of the matrix corresponds to a single pixel in the displayed image. (Pixel is
derived from picture element and usually denotes a single dot on a computer display.)
For example, an image composed of 200 rows and 300 columns of different
colored dots would be stored in MATLAB as a 200-by-300 matrix. Some images, such as
color images, require a three-dimensional array, where the first plane in the third
dimension represents the red pixel intensities, the second plane represents the green pixel
intensities, and the third plane represents the blue pixel intensities. This convention
makes working with images in MATLAB similar to working with any other type of
matrix data, and makes the full power of MATLAB available for image processing
applications.
IMAGE REPRESENTATION
An image is stored as a matrix using standard Matlab matrix conventions. There are four
1. Binary images
2. Intensity images
3. RGB images
4. Indexed images
Binary Images:
In a binary image, each pixel assumes one of only two discrete values: 1 or 0. A binary
image is stored as a logical array. By convention, this documentation uses the variable
The following figure shows a binary image with a close-up view of some of the pixel
values.
Fig: Pixel Values in a Binary Image
Grayscale Images:
matrix whose values represent intensities within some range. MATLAB stores a grayscale
image as an individual matrix, with each element of the matrix corresponding to one
image pixel. By convention, this documentation uses the variable name I to refer to
grayscale images.
The matrix can be of class uint8, uint16, int16, single, or double. While grayscale
images are rarely saved with a color map, MATLAB uses a color map to display them.
For a matrix of class single or double, using the default grayscale color map, the
intensity 0 represents black and the intensity 1 represents white. For a matrix of type
uint8, uint16, or int16, the intensity intmin (class (I)) represents black and the intensity
Color Images:
A color image is an image in which each pixel is specified by three values — one
each for the red, blue, and green components of the pixel's color. MATLAB store color
images as an m-by-n-by-3 data array that defines red, green, and blue color components
for each individual pixel. Color images do not use a color map. The color of each pixel is
determined by the combination of the red, green, and blue intensities stored in each color
and blue components are 8 bits each. This yields a potential of 16 million colors. The
precision with which a real-life image can be replicated has led to the commonly used
A color array can be of class uint8, uint16, single, or double. In a color array of
class single or double, each color component is a value between 0 and 1. A pixel whose
color components are (0, 0, 0) is displayed as black, and a pixel whose color components
are (1, 1, 1) is displayed as white. The three color components for each pixel are stored
along the third dimension of the data array. For example, the red, green, and blue color
RGB(10,5,3), respectively.
An indexed image consists of an array and a colormap matrix. The pixel values in
the array are direct indices into a colormap. By convention, this documentation uses the
variable name X to refer to the array and map to refer to the colormap.
values in the range [0, 1]. Each row of map specifies the red, green, and blue components
of a single color. An indexed image uses direct mapping of pixel values to colormap
values. The color of each image pixel is determined by using the corresponding value of
with the image when you use the imread function. After you read the image and the
colormap into the MATLAB workspace as separate variables, you must keep track of the
association between the image and colormap. However, you are not limited to using the
The relationship between the values in the image matrix and the colormap
depends on the class of the image matrix. If the image matrix is of class single or double,
it normally contains integer values 1 through p, where p is the length of the colormap.
The value 1 points to the first row in the colormap, the value 2 points to the second row,
and so on. If the image matrix is of class logical, uint8 or uint16, the value 0 points to
the first row in the colormap, the value 1 points to the second row, and so on.
The following figure illustrates the structure of an indexed image. In the figure, the image
matrix is of class double, so the value 5 points to the fifth row of the colormap.
1. JPEG is a compressed file format that supports 24 bit color (millions of colors). This
is the best format for photographs to be shown on the web or as email attachments. This
is because the color informational bits in the computer file are compressed (reduced) and
2. GIF is an uncompressed file format that supports only 256 distinct colors. Best used
with web clip art and logo type images. GIF is not suitable for photographs because of its
Uncompressed means that all of the color information from your scanner or digital
camera for each individual pixel is preserved when you save as TIFF. TIFF is the best
format for saving digital images that you will want to print. Tiff supports embedded file
information, including exact color space, output profile information and EXIF data. There
is a lossless compression for TIFF called LZW. LZW is much like 'zipping' the image file
because there is no quality loss. An LZW TIFF decompresses (opens) with all of the
bit color. BMP does not support embedded information like EXIF, calibrated color space
and output profiles. Avoid using BMP for photographs because it produces approximately
the same file sizes as TIFF without any of the advantages of TIFF.
5. Camera RAW is a lossless compressed file format that is proprietary for each digital
camera manufacturer and model. A camera RAW file contains the 'raw' data from the
camera's imaging sensor. Some image editing programs have their own version of RAW
too. However, camera RAW is the most common type of RAW file. The advantage of
camera RAW is that it contains the full range of color information from the sensor. This
means the RAW file contains 12 to 14 bits of color information for each pixel. If you
shoot JPEG, you only get 8 bits of color for each pixel. These extra color bits make
shooting camera RAW much like shooting negative film. You have a little more latitude
Pixel Coordinates
use pixel coordinates. In this coordinate system, the image is treated as a grid of discrete
elements, ordered from top to bottom and left to right, as illustrated by the following
figure.
Fig: The Pixel Coordinate System
For pixel coordinates, the first component r (the row) increases downward, while
the second component c (the column) increases to the right. Pixel coordinates are integer
values and range between 1 and the length of the row or column.
MATLAB uses for matrix subscripting. This correspondence makes the relationship
between an image's data matrix and the way the image is displayed easy to understand.
For example, the data for the pixel in the fifth row, second column is stored in the matrix
element (5, 2). You use normal MATLAB matrix subscripting to access values of
individual pixels.
I (2, 15)
identified by a single coordinate pair, such as (5, 2). From this perspective, a location
perspective, a location such as (5.3, 2.2) is meaningful, and is distinct from (5, 2). In this
spatial coordinate system, locations in an image are positions on a plane, and they are
The following figure illustrates the spatial coordinate system used for images. Notice that
y increases downward.
This spatial coordinate system corresponds closely to the pixel coordinate system
in many ways. For example, the spatial coordinates of the center point of any pixel are
left corner of an image is (1,1), while in spatial coordinates, this location by default is
(0.5,0.5). This difference is due to the pixel coordinate system's being discrete, while the
spatial coordinate system is continuous. Also, the upper left corner is always (1,1) in
pixel coordinates, but you can specify a non default origin for the spatial coordinate
system.
order of the horizontal and vertical components is reversed in the notation for these two
systems. As mentioned earlier, pixel coordinates are expressed as (r, c), while spatial
coordinates are expressed as (x, y). In the reference pages, when the syntax for a function
uses r and c, it refers to the pixel coordinate system. When the syntax uses x and y, it
processing has many advantages over analog image processing; it allows a much wider
range of algorithms to be applied to the input data, and can avoid problems such as the
Image digitization:
co-ordinates in the plane. Image digitization means that the function f(x,y) is sampled
into a matrix with M rows and N columns. The image quantization assigns to each
continuous sample an integer value. The continuous range of the image function f(x,y) is
split into K intervals. The finer the sampling (i.e., the larger M and N) and quantization
(the larger K) the better the approximation of the continuous image function f(x,y).
Image Pre-processing:
Pre-processing is a common name for operations with images at the lowest level of
abstraction -- both input and output are intensity images. These iconic images are of the
same kind as the original data captured by the sensor, with an intensity image usually
some image features important for further processing. Four categories of image pre-
processing methods according to the size of the pixel neighborhood that is used for the
o Geometric transformations.
pixel.
Image segmentation is one of the most important steps leading to the analysis of
processed image data. Its main goal is to divide an image into parts that have a strong
correlation with objects or areas of the real world contained in the image.Two kinds of
segmentation
necessary.
objects. Image is divided into separate regions that are homogeneous with
processing, and the final image segmentation may be found with the help of
3. Region-based segmentations
Image enhancement
information in images for human viewers, or to provide `better' input for other automated
image processing techniques. Image enhancement techniques can be divided into two
broad categories:
Unfortunately, there is no general theory for determining what `good’ image enhancement
is when it comes to human perception. If it looks good, it is good! However, when image
enhancement techniques are used as pre-processing tools for other image processing
techniques, then quantitative measures can determine which techniques are most
appropriate.
CHAPTER – 3
IMAGE FUSION
Introduction:
relevant information from two or more images into a single image. The resulting image
will be more informative than any of the input images. In remote sensing applications, the
increasing availability of space borne sensors gives a motivation for different image
fusion algorithms. Several situations in image processing require high spatial and high
spectral resolution in a single image. Most of the available equipment is not capable of
providing such data convincingly. The image fusion techniques allow the integration of
different information sources. The fused image can have complementary spatial and
spectral resolution characteristics. But, the standard image fusion techniques can distort
In satellite imaging, two types of images are available. The panchromatic image
acquired by satellites is transmitted with the maximum resolution available and the
multispectral data are transmitted with coarser resolution. This will be usually, two or
four times lower. At the receiver station, the panchromatic image is merged with the
Many methods exist to perform image fusion. The very basic one is the high pass filtering
technique. Later techniques are based on DCT, uniform rational filter bank, and Laplacian
pyramid.
Multisensor data fusion has become a discipline to which more and more general
image processing simultaneously require high spatial and high spectral information in a
single image. This is important in remote sensing. However, the instruments are not
Image fusion methods can be broadly classified into two - spatial domain fusion and
transform domain fusion. The fusion methods such as averaging, Brovey method,
principal component analysis (SEGMENTATION) and IHS based methods fall under
spatial domain approaches. Another important spatial domain fusion method is the high
pass filtering based technique. Here the high frequency details are injected into
they produce spatial distortion in the fused image. Spectral distortion becomes a negative
factor while we go for further processing, such as classification problem, of the fused
image. The spatial distortion can be very well handled by transform domain approaches
on image fusion.
The multiresolution analysis has become a very useful tool for analyzing remote
sensing images. The discrete COSINE transform has become a very useful tool for
fusion. Some other fusion methods are also there, such as Laplacian pyramid based,
Curvelet transform based etc. These methods show a better performance in spatial and
spectral quality of the fused image compared to other spatial methods of fusion.
CHAPTER - 4
APPLICATIONS
1. Image Classification
3. Medical imaging
4. Robot vision
Several methods are there for merging satellite images. In satellite imagery we can have
wavelength interval. Each individual image is usually of the same physical area
The SPOT PAN satellite provides high resolution (10m pixel) panchromatic data while
the LANDSAT TM satellite provides low resolution (30m pixel) multispectral images.
Image fusion attempts to merge these images and produce a single high resolution
multispectral image.
The standard merging methods of image fusion are based on Red-Green-Blue (RGB) to
1. Register the low resolution multispectral images to the same size as the
panchromatic image
2. Transform the R,G and B bands of the multispectral image into IHS components
3. Modify the panchromatic image with respect to the multispectral image. This is
4. Replace the intensity component by the panchromatic image and perform inverse
diagnostics and treatment. The term is used when patient images in different data formats
are fused. These forms can include magnetic resonance image (MRI), computed
tomography (CT), and positron emission tomography (PET). In radiology and radiation
oncology, these images serve different purposes. For example, CT images are used more
often to ascertain differences in tissue density while MRI images are typically used to
diagnosing and treating cancer. Companies such as Keosys, MIMvista, IKOE, and
BrainLAB have recently created image fusion software to use in conjunction with
radiation treatment planning systems. With the advent of these new technologies,
radiation oncologists can take full advantage of intensity modulated radiation therapy
(IMRT). Being able to overlay diagnostic images onto radiation planning images results
FUSION ALGORITHMS:
The details of COSINEs and SEGMENTATION algorithm and their use in image
fusion along with simple average fusion algorithm are described in this section.
components. It computes a compact and optimal description of the data set. The first
principal component accounts for as much of the variance in the data as possible and each
succeeding component accounts for as much of the remaining variance as possible. First
principal component is taken to be along the direction with the maximum variance. The
first. Within this subspace, this component points the direction of maximum variance.
The third principal component is taken in the maximum variance direction in the
subspace perpendicular to the first two and so on. The SEGMENTATION is also called as
Karhunen-Loève transform or the Hotelling transform. The SEGMENTATION does not
have a fixed set of basis vectors like FFT, DCT and COSINE etc. and its basis vectors
Let X be a d-dimensional random vector and assume it to have zero empirical mean.
Orthonormal projection matrix V would be such that Y=V TX with the following
…………… (1)
cov(Y) as
…………… (2)
[λ1V1, λ2V2, …. , λdVd] = [cov(X) V1, cov(X) V2, … , cov(X) Vd] ………. (3)
SEGMENTATION Algorithm:
Let the source images (images to be fused) be arranged in two-column vectors. The steps
1. Organise the data into column vectors. The resulting matrix Z is of dimension 2 x n.
2. Compute the empirical mean along each column. The empirical mean vector Me has a
dimension of 1 x 2.
3. Subtract the empirical mean vector Me from each column of the data matrix Z. The
and P2 as
And
algorithm is shown in figure below. The input images (images to be fused) I1 (x, y) and
I2 (x, y) are arranged in two column vectors and their empirical means are subtracted.
The resulting vector has a dimension of n x 2, where n is length of the each image vector.
Compute the eigenvector and eigenvalues for this resulting vector are computed and the
CHAPTER – 6
This technique is a basic and straightforward technique and fusion could be achieved by
Fourier analysis:
Signal analysts already have at their disposal an impressive arsenal of tools. Perhaps
the most well-known of these is Fourier analysis, which breaks down a signal into
constituent sinusoids of different frequencies. Another way to think of Fourier analysis is
as a mathematical technique for transforming our view of the signal from time-based to
frequency-based.
Figure 2
For many signals, Fourier analysis is extremely useful because the signal’s
frequency content is of great importance. So why do we need other techniques, like
COSINE analysis?
In an effort to correct this deficiency, Dennis Gabor (1946) adapted the Fourier
transform to analyze only a small section of the signal at a time—a technique called
windowing the signal.Gabor’s adaptation, called the Short-Time FourierTransform
(STFT), maps a signal into a two-dimensional function of time and
frequency.
Figure 3
The STFT represents a sort of compromise between the time- and frequency-based
views of a signal. It provides some information about both when and at what frequencies
a signal event occurs. However, you can only obtain this information with limited
precision, and that precision is determined by the size of the window. While the STFT
compromise between time and frequency information can be useful, the drawback is that
once you choose a particular size for the time window, that window is the same for all
frequencies. Many signals require a more flexible approach—one where we can vary the
window size to determine more accurately either time or frequency.
COSINE Analysis
COSINE analysis represents the next logical step: a windowing technique with
variable-sized regions. COSINE analysis allows the use of long time intervals where we
want more precise low-frequency information, and shorter regions where we want high-
frequency information.
Figure 4
Here’s what this looks like in contrast with the time-based, frequency-based,
and STFT views of a signal:
Figure 5
You may have noticed that COSINE analysis does not use a time-frequency region, but
rather a time-scale region. For more information about the concept of scale and the link
between scale and frequency, see “How to Connect Scale to Frequency?”
One major advantage afforded by COSINEs is the ability to perform local analysis,
that is, to analyze a localized area of a larger signal. Consider a sinusoidal signal with a
small discontinuity — one so tiny as to be barely visible. Such a signal easily could be
generated in the real world, perhaps by a power fluctuation or a noisy switch.
Figure 6
A plot of the Fourier coefficients (as provided by the fft command) of this signal
shows nothing particularly interesting: a flat spectrum with two peaks representing a
single frequency. However, a plot of COSINE coefficients clearly shows the exact
location in time of the discontinuity.
Figure 7
COSINE analysis is capable of revealing aspects of data that
other signal analysis techniques miss, aspects like trends, breakdown points,
discontinuities in higher derivatives, and self-similarity. Furthermore, because it affords a
different view of data than those presented by traditional techniques, COSINE analysis
can often compress or de-noise a signal without appreciable degradation. Indeed, in their
brief history within the signal processing field, COSINEs have already proven themselves
to be an indispensable addition to the analyst’s collection of tools and continue to enjoy a
burgeoning popularity today.
CHAPTER – 7
INTRODUCTION TO COSINE
Figure 8
Fourier analysis consists of breaking up a signal into sine waves of various
frequencies. Similarly, COSINE analysis is the breaking up of a signal into shifted and
scaled versions of the original (or mother) COSINE. Just looking at pictures of COSINEs
and sine waves, you can see intuitively that signals with sharp changes might be better
analyzed with an irregular COSINE than with a smooth sinusoid, just as some foods are
better handled with a fork than a spoon. It also makes sense that local features can be
described better with COSINEs that have local extent.
which is the sum over all time of the signal f(t) multiplied by a complex exponential.
(Recall that a complex exponential can be broken down into real and imaginary
sinusoidal components.) The results of the transform are the Fourier coefficients F(w),
which when multiplied by a sinusoid of frequency w yields the constituent sinusoidal
components of the original signal. Graphically, the process looks like:
Figure 9
Similarly, the continuous COSINE transform (CWT) is defined as the sum over all
time of the signal multiplied by scaled, shifted versions of the COSINE function
The result of the CWT is a series many COSINE coefficients C, which are a
function of scale and position.
Multiplying each coefficient by the appropriately scaled and shifted COSINE yields the
constituent COSINEs of the original signal:
Figure 10
Scaling
We’ve already alluded to the fact that COSINE analysis produces a time-scale
view of a signal and now we’re talking about scaling and shifting COSINEs.
What exactly do we mean by scale in this context?
Scaling a COSINE simply means stretching (or compressing) it.
If we’re talking about sinusoids, for example the effect of the scale factor is very easy to
see:
Figure 11
The scale factor works exactly the same with COSINEs. The smaller the scale factor, the
more “compressed” the COSINE.
Figure 12
It is clear from the diagrams that for a sinusoid sin (wt) the scale factor ‘a’ is related
(inversely) to the radian frequency ‘w’. Similarly, with COSINE analysis the scale is
related to the frequency of the signal.
Shifting
Shifting a COSINE simply means delaying (or hastening) its onset. Mathematically,
delaying a function (t) by k is represented by (t-k)
Figure 13
The continuous COSINE transform is the sum over all time of the
signal multiplied by scaled, shifted versions of the COSINE. This process produces
COSINE coefficients that are a function of scale and position.
It’s really a very simple process. In fact, here are the five steps of an easy recipe for
creating a CWT:
1. Take a COSINE and compare it to a section at the start of the original signal.
2. Calculate a number C that represents how closely correlated the COSINE is with this
section of the signal. The higher C is, the more the similarity. More precisely, if the signal
energy and the COSINE energy are equal to one, C may be interpreted as a
correlation coefficient.
Note that the results will depend on the shape of the COSINE you choose.
Figure 14
3. Shift the COSINE to the right and repeat steps 1 and 2 until you’ve covered the whole
signal.
Figure 15
When you’re done, you’ll have the coefficients produced at different scales by
different sections of the signal. The coefficients constitute the results of a regression of
the original signal performed on the COSINEs.
How to make sense of all these coefficients? You could make a plot on which the x-
axis represents position along the signal (time), the y-axis represents scale, and the color
at each x-y point represents the magnitude of the COSINE coefficient C. These are the
coefficient plots generated by the graphical tools.
Figure 17
Notice that the scales in the coefficients plot (shown as y-axis labels) run from 1 to
31. Recall that the higher scales correspond to the most “stretched” COSINEs. The more
stretched the COSINE, the longer the portion of the signal with which it is being
compared, and thus the coarser the signal features being measured by the COSINE
coefficients.
Figure 19
Thus, there is a correspondence between COSINE scales and frequency as revealed by
COSINE analysis:
• Low scale a=> Compressed COSINE => Rapidly changing details => High
frequency ‘w’.
• High scale a=>Stretched COSINE=>Slowly changing, coarse features=>Low
frequency ‘w’.
It’s important to understand the fact that COSINE analysis does not produce a time-
frequency view of a signal is not a weakness, but a strength of the technique.
Not only is time-scale a different way to view data, it is a very natural way to view data
deriving from a great number of natural phenomena.
Figure 20
Here is a case where thinking in terms of scale makes much more sense than
thinking in terms of frequency. Inspection of the CWT coefficients plot for this signal
reveals patterns among scales and shows the signal’s possibly fractal nature.
Figure 21
Even though this signal is artificial, many natural phenomena — from the intricate
branching of blood vessels and trees, to the jagged surfaces of mountains and fractured
metals — lend themselves to an analysis of scale.
An efficient way to implement this scheme using filters was developed in 1988 by
Mallat. The Mallat algorithm is in fact a classical scheme known in the signal processing
community as a two-channel sub band coder. This very practical filtering algorithm
yields a fast COSINE transform — a box into which a signal passes, and out of
which COSINE coefficients quickly emerge. Let’s examine this in more depth.
One-Stage Filtering: Approximations and Details:
For many signals, the low-frequency content is the most important part. It is what
gives the signal its identity. The high-frequency content on the other hand imparts flavor
or nuance. Consider the human voice. If you remove the high-frequency components, the
voice sounds different but you can still tell what’s being said. However, if you remove
enough of the low-frequency components, you hear gibberish. In COSINE analysis, we
often speak of approximations and details. The approximations are the high-scale, low-
frequency components of the signal. The details are the low-scale, high-frequency
components.
The filtering process at its most basic level looks like this:
Figure 23
The original signal S passes through two complementary filters and emerges as
two signals.
Unfortunately, if we actually perform this operation on a real digital signal, we
wind up with twice as much data as we started with. Suppose, for instance that the
original signal S consists of 1000 samples of data. Then the resulting signals will each
have 1000 samples, for a total of 2000.
These signals A and D are interesting, but we get 2000 values instead of the 1000
we had. There exists a more subtle way to perform the decomposition using COSINEs.
By looking carefully at the computation, we may keep only one point out of two in each
of the two 2000-length samples to get the complete information. This is the notion of own
sampling. We produce two sequences called cA and cD.
Figure 24
The process on the right which includes down sampling produces DCT
Coefficients. To gain a better appreciation of this process let’s perform a one-stage
discrete COSINE transform of a signal. Our signal will be a pure sinusoid with
high- frequency noise added to it.
Here is our schematic diagram with real signals inserted into it:
Figure 25
The MATLAB code needed to generate s, cD, and cA is:
s = sin(20*linspace(0,pi,1000)) + 0.5*rand(1,1000);
[cA,cD] = DCT(s,'db2');
where db2 is the name of the COSINE we want to use for the analysis.
Notice that the detail coefficients cD is small and consist mainly of a high-frequency
noise, while the approximation coefficients cA contains much less noise than does the
original signal.
[length(cA) length(cD)]
ans = 501 501
You may observe that the actual lengths of the detail and approximation coefficient
vectors are slightly more than half the length of the original signal. This has to do with
the filtering process, which is implemented by convolving the signal with a filter. The
convolution “smears” the signal, introducing several extra samples into the result.
Multiple-Level Decomposition:
Figure 27
Number of Levels:
We’ve learned how the discrete COSINE transform can be used to analyze or
decompose, signals and images. This process is called decomposition or analysis. The
other half of the story is how those components can be assembled back into the original
signal without loss of information. This process is called reconstruction, or synthesis. The
mathematical manipulation that effects synthesis is called the inverse discrete COSINE
transforms (IDCT). To synthesize a signal in the COSINE Toolbox, we reconstruct it
from the COSINE coefficients:
Figure 28
Where COSINE analysis involves filtering and down sampling, the COSINE
reconstruction process consists of up sampling and filtering. Up sampling is the process
of lengthening a signal component by inserting zeros between samples:
Figure 29
The COSINE Toolbox includes commands like iDCT and waverec that perform
single-level or multilevel reconstruction respectively on the components of one-
dimensional signals. These commands have their two-dimensional analogs, iDCT2 and
waverec2.
Reconstruction Filters:
The filtering part of the reconstruction process also bears some discussion, because
it is the choice of filters that is crucial in achieving perfect reconstruction of the original
signal. The down sampling of the signal components performed during the decomposition
phase introduces a distortion called aliasing. It turns out that by carefully choosing filters
for the decomposition and reconstruction phases that are closely related (but not
identical), we can “cancel out” the effects of aliasing.
The low- and high pass decomposition filters (L and H), together with their
associated reconstruction filters (L' and H'), form a system of what is called quadrature
mirror filters:
Figure 30
We have seen that it is possible to reconstruct our original signal from the
coefficients of the approximations and details.
Figure
31
It is also
possible to
reconstruct the
approximations
and details themselves from their coefficient vectors.
As an example, let’s consider how we would reconstruct the first-level
approximation A1 from the coefficient vector cA1. We pass the coefficient vector cA1
through the same process we used to reconstruct the original signal. However, instead of
combining it with the level-one detail cD1, we feed in a vector of zeros in place of the
detail coefficients
vector:
Figure 32
The process yields a reconstructed approximation A1, which has the same length
as the original signal S and which is a real approximation of it. Similarly, we can
reconstruct the first-level detail D1, using the analogous process:
Figure 33
The reconstructed details and approximations are true constituents of the original
signal. In fact, we find when we combine them that:
A1 + D1 = S
Note that the coefficient vectors cA1 and cD1—because they were produced by
Down sampling and are only half the length of the original signal — cannot directly be
combined to reproduce the signal.
It is necessary to reconstruct the approximations and details before combining
them. Extending this technique to the components of a multilevel analysis, we find that
similar relationships hold for all the reconstructed signal constituents.
That is, there are several ways to reassemble the original signal:
Figure 34
Figure 35
Lprime = dbaux(2)
If we reverse the order of this vector (see wrev), and then multiply every even
positions:
HU =–0.0915 0 –0.1585 0 0.5915 0 –0.3415 0
Finally, convolve the up sampled vector with the original low pass filter:
H2 = conv(HU,Lprime);
plot(H2)
Figure 36
If we iterate this process several more times, repeatedly up sampling and
convolving the resultant vector with the four-element filter vector Lprime, a pattern
begins to emerge:
Figure 37
The curve begins to look progressively more like the db2 COSINE. This means
that the COSINE’s shape is determined entirely by the coefficients of the reconstruction
filters. This relationship has profound implications. It means that you cannot choose just
any shape, call it a COSINE, and perform an analysis. At least, you can’t choose an
arbitrary COSINE waveform if you want to be able to reconstruct the original signal
accurately. You are compelled to choose a shape determined by quadrature mirror
decomposition filters.
We’ve seen the interrelation of COSINEs and quadrature mirror filters. The
COSINE function is determined by the high pass filter, which also produces the
details of the COSINE decomposition.
There is an additional function associated with some, but not all COSINEs. This
is the so-called scaling function . The scaling function is very similar to the COSINE
function. It is determined by the low pass quadrature mirror filters, and thus is associated
with the approximations of the COSINE decomposition. In the same way that iteratively
up- sampling and convolving the high pass filter produces a shape approximating the
COSINE function, iteratively up-sampling and convolving the low pass filter produces a
shape approximating the scaling function.
Figure 38
This process involves two aspects: breaking up a signal to obtain the COSINE
coefficients, and reassembling the signal from the coefficients. We’ve already discussed
decomposition and reconstruction at some length. Of course, there is no point breaking
up a signal merely to have the satisfaction of immediately reconstructing it. We may
modify the COSINE coefficients before performing the reconstruction step. We perform
COSINE analysis because the coefficients thus obtained have many known uses, de-
noising and compression being foremost among them. But COSINE analysis is still a new
and emerging field. No doubt, many uncharted uses of the COSINE coefficients lie in
wait. The COSINE Toolbox can be a means of exploring possible uses and hitherto
unknown applications of COSINE analysis. Explore the toolbox functions and see what
you discover.
CHAPTER - 8
COSINE DECOMPOSITION
Images are treated as two dimensional signals, they change horizontally and
vertically, thus 2D COSINE analysis must be used for images. 2D COSINE analysis uses
the same ’mother COSINEs’ but requires an extra step at every level of decomposition.
The 1D analysis filtered out the high frequency information from the low frequency
information at every level of decomposition; so only two sub signals were produced at
each level.
In 2D, the images are considered to be matrices with N rows and M columns. At
every level of decomposition the horizontal data is filtered, then the approximation and
details produced from this are filtered on columns.
To get the next level of decomposition the approximation sub-image is decomposed, this
idea can be seen in figure 3.
Fig 3: Saturn Image decomposed to Level 3. Only the 9 detail sub-images and the final
sub-image is required to reconstruct the image perfectly.
The information flow diagram of COSINE- based image fusion algorithm is shown in
above figure. In COSINE image fusion scheme, the source images I1 (x,y) and I2 (x,y),
are decomposed into approximation and detailed coefficients at required level using DCT.
The approximation and detailed coefficients of both images are combined using fusion
rule Φ.
The fused image (If (x, y)) could be obtained by taking the inverse discrete COSINE
If (x, y) = IDCT [Φ{ DCT (I1 (x,y)), DCT (I2 (x,y))}] ………. (5)
The fusion rule used in this project is simply averages the approximation coefficients and
picks the detailed coefficient in each sub band with the largest magnitude.
Entropy:
E = entropy (I)
texture of the input image. Entropy is defined as -sum (p.*log2 (p)) where p contains the
histogram counts returned from imhist. By default, entropy uses two bins for logical
arrays and 256 bins for uint8, uint16, or double arrays. I can be a multidimensional
image. If I have more than two dimensions, the entropy function treats it as a
multidimensional grayscale image and not as an RGB image. Image can be logical, uint8,
uint16, or double and must be real, nonempty, and nonsparse. E is double. Entropy
converts any class other than logical to uint8 for the histogram count calculation so that
the pixel values are discrete and directly correspond to a bin value.
CHAPTER - 9
INTRODUCTION TO MATLAB
What Is MATLAB?
problems and solutions are expressed in familiar mathematical notation. Typical uses
include
2. Algorithm development
3. Data acquisition
MATLAB is an interactive system whose basic data element is an array that does
not require dimensioning. This allows you to solve many technical computing problems,
especially those with matrix and vector formulations, in a fraction of the time it would
provide easy access to matrix software developed by the LINPACK and EISPACK
projects. Today, MATLAB engines incorporate the LAPACK and BLAS libraries,
MATLAB has evolved over a period of years with input from many users. In
toolboxes. Very important to most users of MATLAB, toolboxes allow you to learn and
functions (M-files) that extend the MATLAB environment to solve particular classes of
problems. Areas in which toolboxes are available include signal processing, control
systems, neural networks, fuzzy logic, COSINEs, simulation, and many others.
Development Environment:
This is the set of tools and facilities that help you use MATLAB functions and
files. Many of these tools are graphical user interfaces. It includes the MATLAB desktop
and Command Window, a command history, an editor and debugger, and browsers for
functions like sum, sine, cosine, and complex arithmetic, to more sophisticated functions
like matrix inverse, matrix eigen values, Bessel functions, and fast Fourier transforms.
"programming in the small" to rapidly create quick and dirty throw-away programs, and
"programming in the large" to create complete large and complex application programs.
Graphics:
MATLAB has extensive facilities for displaying vectors and matrices as graphs, as
well as annotating and printing these graphs. It includes high-level functions for two-
presentation graphics. It also includes low-level functions that allow you to fully
This is a library that allows you to write C and Fortran programs that interact with
MATLAB. It includes facilities for calling routines from MATLAB (dynamic linking),
calling MATLAB as a computational engine, and for reading and writing MAT-files.
CHAPTER - 10
MATLAB DESKTOP:-
Matlab Desktop is the main Matlab application window. The desktop contains five
sub windows, the command window, the workspace browser, the current directory
window, the command history window, and one or more figure windows, which are
The command window is where the user types MATLAB commands and
expressions at the prompt (>>) and where the output of those commands is displayed.
MATLAB defines the workspace as the set of variables that the user creates in a work
session. The workspace browser shows these variables and some information about them.
Double clicking on a variable in the workspace browser launches the Array Editor, which
can be used to obtain information and income instances edit certain properties of the
variable.
The current Directory tab above the workspace tab shows the contents of the current
directory, whose path is shown in the current directory window. For example, in the
INSTALLED IN DRIVE C. clicking on the arrow in the current directory window shows
a list of recently used paths. Clicking on the button to the right of the window allows the
MATLAB uses a search path to find M-files and other MATLAB related files,
which are organize in directories in the computer file system. Any file run in MATLAB
must reside in the current directory or in a directory that is on search path. By default, the
files supplied with MATLAB and math works toolboxes are included in the search path.
The easiest way to see which directories are on the search path. The easiest way to see
which directories are soon the search path, or to add or modify a search path, is to select
set path from the File menu the desktop, and then use the set path dialog box. It is good
practice to add any commonly used directories to the search path to avoid repeatedly
The Command History Window contains a record of the commands a user has
entered in the command window, including both current and previous MATLAB sessions.
Previously entered MATLAB commands can be selected and re-executed from the
This action launches a menu from which to select various options in addition to executing
the commands. This is useful to select various options in addition to executing the
work session.
Using the MATLAB Editor to create M-Files:
The MATLAB editor is both a text editor specialized for creating M-files and a
graphical MATLAB debugger. The editor can appear in a window by itself, or it can be a
sub window in the desktop. M-files are denoted by the extension .m, as in pixelup.m. The
MATLAB editor window has numerous pull-down menus for tasks such as saving,
viewing, and debugging files. Because it performs some simple checks and also uses
color to differentiate between various elements of code, this text editor is recommended
as the tool of choice for writing and editing M-functions. To open the editor , type edit at
the prompt opens the M-file filename.m in an editor window, ready for editing. As noted
earlier, the file must be in the current directory, or in a directory in the search path.
Getting Help:
The principal way to get help online is to use the MATLAB help browser, opened as
a separate window either by clicking on the question mark symbol (?) on the desktop
toolbar, or by typing help browser at the prompt in the command window. The help
Browser is a web browser integrated into the MATLAB desktop that displays a Hypertext
Markup Language(HTML) documents. The Help Browser consists of two panes, the help
navigator pane, used to find information, and the display pane, used to view the
information. Self-explanatory tabs other than navigator pane are used to perform a search.
Fig: Image 1
Fig: Image 2
CONCLUSIONS
with and without reference image have been evaluated. The simple averaging fusion
algorithm shows degraded performance. Image fusion using COSINEs with higher level
of decomposition shows better performance in some metrics while in other metrics, the
1. Gonzalo, Pajares & Jesus Manuel, de la Cruz. A COSINE-based image fusion tutorial.
2. Varsheny, P.K. Multi-sensor data fusion. Elec. Comm. Engg., 1997, 9(12), 245-53.
representation. IEEE Trans. Pattern Anal. Mach. Intel., 1989, 11(7), 674-93.
4. Wang, H.; Peng, J. & Wu, W. Fusion algorithm for multisensor image based on discrete
multiCOSINE transform. IEE Proc. Visual Image Signal Process., 2002, 149(5).
7. h t t p : / / e n . w i k i p e d i a . o r g / w i k i / Principal_components_analysis.
8. Naidu, V.P.S.; Girija, G. & Raol, J.R. Evaluation of data association and fusion
Navigation, Guidance and Control, Austin, USA, August 2003, pp. 11-14.
10. Multi-sensor image data fusion based on pixel-level weights of COSINE and the