Professional Documents
Culture Documents
CHAPTER 1
INTRODUCTION
The digital multimedia is popular because of their highly perceptual effects and
the advanced development its corresponding technology. However, it often requires a
large amount of data to store these multimedia contents due to the complex information
they may encounter. Besides, the requirement of resolution is much higher than before,
such that the data size of the image is surprisingly large.
In other words, a still image is a sensory signal that contains significant amount of
redundant information which exists in their canonical forms. Image data compression is
the technique of reducing the redundancies in image data required to maintain a given
quantity of information. The underlying basis of the reduction process is the removal of
redundant data. From a mathematical viewpoint, this is a process of transforming a 2-D
pixel array into a statistically uncorrelated data set .The transformation is applied prior to
storage or transmission of the image.
Currently image compression is recognized as an enabling technology. In
addition to the areas just mentioned, image compression is the natural technology for
handling the increased spatial resolution of todays imaging sensors and evolving
broadcast television standards. Furthermore image compression plays a major role in
many important and diverse applications, including tele-video-conferencing, remote
sensing (the use of satellite imagery for weather and other earth resource applications),
document and medical imaging facsimile transmission (FAX), and the control of remotely
piloted vehicles in military, space and hazardous waste management applications.
This project work explores the implementation of 2Dimentional DWT algorithm
on FPGA for image compression using fuzzy logic. Several architectures have been
proposed such as convolution based, lifting based and B-spline based. These architectures
are compared in terms of hardware complexity, critical path, and registers. As for the 2D
DWT the large amount of the memory access and the area required that becomes the most
critical issue so it also affects the total area and power. Finally, a flexible and efficient
proposed architecture has been selected for designing two-level 2D-DWT. The proposed
architecture has advantages over other architectures such as very less number of
multipliers, less area and less memory utilization.
DEPT ECE SJBIT BANGALORE
Page 1
Page 2
R-G-B
coordinate
Transform to
Y-Cb-Cr
coordinate
Object
Downsample
Chrominance
Encoder
RateDstortion
Comparison
HDD
Upsample
Chrominance
Decoder
Monitor
C
R-G-B
coordinate
Transform to
R-G-B
coordinate
Figure 1.2: The block diagram of the general image storage system.
The camera captures the reflected light from the surface of the object, and the received
light will be converted into three primary color components R, G and B. These three
primary color components are processed by coding algorithms afterward.
Image compression addresses the problem of reducing the amount of data required to
represent a digital image. It is a process intended to yield a compact representation of an
image, thereby reducing the image storage/transmission requirements. Compression is
achieved by the removal of one or more of the following three basic data redundancies:
1.
Coding Redundancy
2.
Inter-pixel Redundancy
3.
Perceptual Redundancy
Coding redundancy occurs when the codes assigned to a set of events such as the pixel
values of an image have not been selected to take full advantage of the probabilities of the
events.
Inter-pixel redundancy usually results from correlations between the pixels. Due to the
high correlation between the pixels, any given pixel can be predicted from its neighboring
pixels.
Perceptual redundancy is due to data that is ignored by the human visual system. In other
words, all the neighboring pixels in the smooth region of a natural image have a high
DEPT ECE SJBIT BANGALORE
Page 3
f(x, y)
Mapper
quantizer
Symbol
coder
Compressed image
Symbol
decoder
Inverse
Mapper
f(x, y)
Page 4
It provides a potential cost savings associated with sending less data over switched
telephone network where cost of call is really usually based upon its duration.
It not only reduces storage requirements but also overall execution time.
The image compression techniques are broadly classified into two categories depending
whether or not an exact replica of the original image could be reconstructed using the
compressed image. These are:
Lossy technique
Lossless technique
Page 5
Compression ratio
Transform Coding
Ector Quantization
Fractal Coding
Sub-band Coding
Huffman encoding
LZW coding
Area coding
Page 6
( ))
functions (triangular, trapezoidal, Gaussian,) can be seen in figure below and described
with the following formulas:
Triangular Membership Function: Triangular membership function is defined as a
following equation:
0
if x a;
Triangular(x; a, b, c) =
if c x;
if x a;
Page 7
Trapezoidal(x; a, b, c, d) = 1 if b x a;
if d x;
Page 8
If x is A THEN y is B
is A
is
called
If the speed is low and the distance is small, then the force on brake should be
small.
If pixel is dark AND its neighborhood is also dark AND homogeneous THEN it
belongs to the background.
d. Fuzzy Reasoning
Fuzzy reasoning, approximate reasoning, is an inference procedure whose outcome is
conclusion for a set of fuzzy if-then rules. The steps of fuzzy reasoning can be given as
follows:
Page 9
Input variables are compared with the membership function on the premise part to
obtain the membership values of each linguistic label (fuzzification).
The membership values on the premise part are combined through specific fuzzy
set operations such as: min, max, or multiplication to get firing strength
(weight) of each rule.
The qualified consequent (either fuzzy or crisp) is generated depends on the firing
strength.
If x is A1 and y is B1 Then z is C1
If x is A2 and y is B2 Then z is C2
Page 10
Fuzzification: Transforms the crisp inputs into degrees of match with linguistic
values. Reverse process of defuzzification.
Knowledge Base: Consists of a rule base and a database. A rule base contains a
number of fuzzy if-then rules. A database defines the membership function of the
fuzzy sets used in the fuzzy rules.
Page 11
Expert knowledge
Input image
Membership
modification
Image
fuzzification
Image defuzzification
output
image
Fuzzy logic
Fuzzy techniques can manage the ambiguity efficiently and vagueness (an image
can be represented as a fuzzy set).
Fuzzy logic is flexible. With any given system, it's easy to manage it or layer more
functionality on top of it without starting again from scratch.
Page 12
Fuzzy logic can be blended with conventional control techniques. Fuzzy systems
don't necessarily replace conventional control methods. In many cases fuzzy
systems augment them and simplify their implementation.
Fuzzy logic can model nonlinear functions of arbitrary complexity and it can be
built on top of the experience of experts.
1.4 OBJECTIVE
The main objective of the thesis work is implement an algorithm based on fuzzy rule for
image compression. In literature survey the existed methods are able to compression
images. But depending on application they designed the compression method is different
for different type of images.
The objective of the thesis work contains the following steps as described below:
1.5 METHODOLOGY
The step-by-step methodology to be followed for image compression using fuzzy theory:
Study and analyze various Fuzzy techniques and image compression techniques.
Results achieved after the execution of program are compared with the earlier
outputs.
Page 13
Page 14
CHAPTER 2
LITERATURE SURVEY
There is a lot work has been done in field of image compression . In this section, work
done in area of image compression and fuzzy logic is focus has been made on image
quality .
Yogitha S.K et al., 2013 has proposed the effects of quantization matrices on Discrete
cosine transform and Fuzzy logic using different resolution of an image and tells about
how different quantization matrices effects DCT and fuzzy intensification algorithm for
different resolution. The PSNR value of images in DCT varies for different quantization
matrices but when combine Fuzzy logic and DCT PSNR does not varies and get
enhanced, high quality and compressed image. Such an algorithm has been proven (by
experiments) to significantly increase the computational efficiency in image processing
algorithms applied to a JPEG image.
Mahesh Goparaju et al., 2013 implements transform using filter banks. For the design,
based on the constraints the area, power and timing performance were obtained. Based on
the application and the constraints imposed, the appropriate architecture can be chosen.
For the Daubechies 2, the poly-phase architecture, with modified DA technique was
implemented. The latency of the proposed architecture is 44 clock cycles and throughput
is 4 clock cycles, and hence is twice faster than the reference design. It is seen that, in
applications, which require low area, power consumption, and high throughput, e.g., realtime applications, the poly-phase with DA architecture is more suitable. The biorthogonal wavelets, with different number of coefficients in the low pass and high pass
filters, increase the number of operations and the complexity of the design, but they have
better SNR than the orthogonal filters.
V. Alarcon-Aquino et al., 2013 analyzed image was divided into little sub-images and
each one was decomposed in a vector following a Hilbert fractal curve. The wavelet
transform was applied to each vector and some of the high frequency components were
suppressed based on some threshold criteria. Different levels of wavelet decomposition
and wavelet mother functions were assessed. The Huffman coding algorithm was then
applied in order to reduce image weight. Simulation results have revealed that high
DEPT ECE SJBIT BANGALORE
Page 15
Page 16
Page 17
Page 18
Page 19
Page 20
2.1 MOTIVATION
The main motivation behind the approach is to produce immediate access to
object/feature of interest in a high quality decoded image which could be useful on smart
devices, for analysis purpose, as well as for multimedia content based description
standards. The recent improvement in FPGA technologies has led to important advances
in programmable logic devices, which allow the implementation of a complete systemon-a programmable chip (SOPC). In addition to the classical VHDL-based design flow,
FPGA manufactures have recently developed different design tools, such as System
Generator from Xilinx (XSG), to ease the implementation of digital signal processing
(DSP) algorithms on FPGAs. Hardware implementation of fuzzy image processing is
currently demanded by multimedia applications.
Page 21
CHAPTER 3
Page 22
3.1
IMAGE
An image (from Latin imago) is an artifact, for example a two-dimensional picture that
has a similar appearance to some subject usually a physical object or a person. Images may
be two-dimensional, such as a photograph, screen display, and as well as a three-dimensional,
such as a statue. They may be captured by optical devicessuch as cameras, mirrors, lenses,
telescopes, microscopes, etc. and natural objects and phenomena, such as the human eye or
water surfaces.
Page 23
First, clear the MATLAB workspace of any variables and close open figure windows.
Close all to read an image, use the imread command. The example reads one of the
sample images included with Image Processing Toolbox, lena.jpg, and stores it in an
array named I. I = imread (' penguins.jpg '); Now display the image. The toolbox
includes two image display functions: imshow and imtool. Imshow is the toolbox's
fundamental image display function. Imtool starts the Image Tool which presents an
integrated environment for displaying images and performing some common image
processing tasks. The Image Tool provides all the image display capabilities of imshow
but also provides access to several other tools for navigating and exploring images, such
as scroll bars, the Pixel Region tool, Image Information tool, and the Contrast Adjustment
tool.
To see how the imread function stores the image data in the workspace, check the
Workspace browser in the MATLAB desktop. The Workspace browser displays
information about all the variables you create during a MATLAB session. The imread
function returned the image data in the variable I, which is a 100-by-100 element array of
uint8 data. MATLAB can store images as uint8, uint16, or double arrays.
DEPT ECE SJBIT BANGALORE
Page 24
3.2
The Xilinx CORE Generator System provides you with a catalog of ready-made functions
ranging in complexity from simple arithmetic operators such as adders, accumulators and
multipliers, to system level building blocks including filters, transforms and memories.
The CORE Generator System can customize a generic functional building block such as a
FIR filter or a multiplier to meet the needs of your application and simultaneously deliver
high levels of performance and area efficiency.
Block Memory Generator core is an advanced memory constructor that generates area
and performance-optimized memories using embedded block RAM resources in Xilinx
FPGAs. Available through the CORE Generator software, users can quickly create
optimized memories to leverage the performance and features of block RAMs in Xilinx
FPGAs.
The Block Memory Generator core uses embedded Block Memory primitives in Xilinx
FPGAs to extend the functionality and capability of a single primitive to memories of
arbitrary widths and depths. Sophisticated algorithms within the Block Memory
Generator core produce optimized solutions to provide convenient access to memories for
a wide range of configurations. The Block Memory Generator has two fully independent
ports that access a shared memory space. Both A and B ports have a write and a read
interface.
In Virtex-6, Virtex-5 and Virtex-4 FPGA architectures, all four interfaces can be uniquely
configured, each with a different data width. When not using all four interfaces, the user
can select a simplified memory configuration (for example, a Single-Port Memory or
Simple Dual-Port Memory), allowing the core to more efficiently use available resources.
Page 25
Memory Types
The Block Memory Generator core uses embedded block RAM to generate five types of
memories:
I.
II.
Single-port RAM
Simple Dual-port RAM
III.
IV.
Single-port ROM
V.
Dual-port ROM
For dual-port memories, each port operates independently. Operating mode, clock
frequency, optional output registers, and optional pins are selectable per port. For Simple
Dual-port RAM, the operating modes are not selectable; they are fixed as READ_FIRST.
The Block Memory Generator can generate memory structures from 1 to 1152 bits wide,
and at least two locations deep. The maximum depth of the memory is limited only by the
number of block RAM primitives in the target device.
The Block Memory Generator supports the following block RAM primitive operating
modes: WRITE FIRST, READ FIRST, and NO CHANGE. Each port may be assigned an
operating mode.
Memory Initialization
The memory contents can be optionally initialized using a memory coefficient (COE) file
or by using the default data option. A COE file can define the initial contents of each
individual memory location, while the default data option defines the initial content of all
locations.
Simulation Models
The Block Memory Generator core provides behavioral and structural simulation models
in VHDL and Verilog for both simple and precise modeling of memory behaviors, for
example, debugging, probing the contents of the memory, and collision detection.
DEPT ECE SJBIT BANGALORE
Page 26
Functional Description
The Block Memory Generator is used to build custom memory modules from block RAM
primitives in Xilinx FPGAs. The core implements an optimal memory by arranging block
RAM primitives based on user selections, automating the process of primitive
instantiation and concatenation. Using the CORE Generator Graphical User Interface
(GUI), users can configure the core and rapidly generate a highly optimized custom
memory solution.
3.3
Fuzzification operation raises the membership grade of those elements within the 0.5
points and reduces the membership grade of those elements outside the crossover (0.5)
point. Hence, intensification amplifies the signal within the bandwidth while reducing the
`noise'.
If TALL=-.125/5+0.5/6+0.875/6.5+1/7+1/7.5+1/8 then
INT(TALL) = 0.031/5+0.5/6+0.969/6.5+1/7+1/7.5+1/8.
Page 27
) (
)+
): B (
)=0.5
b=0.5-a.Ithd
Im=0, IM=255, Ithd=128 this value is considered by seeing below figure 3.6.
Page 28
3.4
( ( ))
* (
Page 29
Page 30
Multirate DSP systems are commonly used in many practical signal processing
applications that require different sampling rates. Downsampling and Upsampling are
common techniques used for sampling rate conversion in analysis and synthesis filters.
The input is filtered and downsampled by a factor of two at every stage of the DWT
algorithm. Downsampling, also known as decimation, can be easily implemented as
shown in Figure 3.11 where H(z) is the filter transfer function, x(n) is the input signal,
y(n) is the filtered output and y(n) is the signal decimated output signal. The input clock
frequency is F Hz and the output clock frequency is F/2 Hz. Figure 3.12 illustrates a
sample waveform for the output sequence after filtering y (n) and the output sequence
after decimation y(n).
Page 31
3.5
INVERSE DWT
Just as a forward transform is used to separate the image data into various classes of
importance a reverse transform is used to reassemble the various classes of data into a
reconstructed image. A pair of high pass and low pass filters is used here also. Then filter
pair is called the synthesis filter pair. The filtering procedure is just the opposite. We start
from the topmost level, apply the filters column wise first and then row wise and proceed
to the next level, till we reach the first level. In this section the theoretical background and
algorithm development is discussed. The first recorded mention of what is now called a
DEPT ECE SJBIT BANGALORE
Page 32
Page 33
The input signal x(n) is filtered by the analysis process using the low pass and the high
pass filters. The symbols 2 and 2 are up sampling and down sampling by a factor of
two for decimating the filter results. The inverse of the analysis process is synthesis
process. In digital signal processing there was decimation and filtering in the synthesis
process.
One to represent the high frequency corresponding to the detailed part of the
image (wavelet function).
At every level of decomposition the horizontal data is filtered, and then the
approximation and details produced from this are filtered on columns. At every
level, four sub-images are obtained; the approximation, the vertical detail, the
horizontal detail and the diagonal detail.
Page 34
Wavelet function for 2-D DWT can be obtained by multiplying wavelet functions
((x, y)) and scaling function ((x, y)). After first level decomposition we get
four details of image those are,
Approximate details (x, y) = (x) (y)
Horizontal details (x, y) = (x) (y)
Vertical details (x, y) = (x) (y)
Diagonal details (x, y) = (x) (y)
The approximation details can then be put through a filter bank, and this is repeated until
the required level of decomposition has been reached. The filtering step is followed by a
sub-sampling operation that decreases the resolution from one transformation level to the
other. After applying the 2-D filler bank at a given level n, the detail coefficients are
output, while the whole filter bank is applied again upon the approximation image until
the desired maximum resolution is achieved. Figure 3.16(b) shows wavelet filter
decomposition. The sub-bands are labeled by using the following notations.
LHn represents the horizontal details at nth level of decomposition and obtained
from horizontal low-pass filtering and vertical high-pass filtering.
HHn represents the diagonal details at nth level of decomposition and obtained
from high-pass filtering in both directions.
Page 35
3.6
VIRTEX 2 PRO
IDWT output is De-fuzzified and load into IP RAM, Finally dumping the Verilog code
into FPGA board (virtex 2pro) and to display output in monitor.
The XUP Virtex-II Pro Development System provides an advanced hardware
platform that consists of a high performance Virtex-II Pro Platform FPGA surrounded by
a comprehensive collection of peripheral components that can be used to create a
complex system and to demonstrate the capability of the Virtex-II Pro Platform FPGA.
Page 36
Page 37
Page 38
Start
Start
De-fuzzification
Convolution based
DWT
Applying
IDWT
Page 39
CHAPTER 4
Page 40
Virtex-II
Spartan-3
Spartan-3
Virtex-5
Virtex-5
Virtex-5
Virtex-5
1000
3000
1000
2000
LX30
LX50
LX85
LX110
Gates
1 million
3 million
1 million
2 million
-----
-----
-----
-----
Flip-Flops
10,240
28,672
15,360
40,960
19,200
28,800
51,840
69,120
LUTs
10,240
28,672
15,360
40,960
19,200
28,800
51,840
69,120
Multipliers
40
96
24
40
32
48
48
64
Block RAM
(kb)
720
1,728
432
720
1,152
1,728
3,456
4,608
Table 4.1 shows resource specifications used to compare FPGA chips within
various Xilinx families. The number of gates has traditionally been a way to compare the
size of FPGA chips to ASIC technology, but it does not truly describe the number of
individual components inside an FPGA.
Synthesis
Xilinx ISE Foundation Software takes the input of the circuit in the schematic
editor, simulate the timing behavior of the circuit, compile it for a Virtex-2 FPGA, and
test the design on a prototyping board. The ISE software includes Xilinx Synthesis
Technology (XST), which synthesizes VHDL, Verilog, or mixed language designs to
create Xilinx-specific Netlist files known as NGC files
.
Page 41
Page 42
Design summary
Design entry is the first step in the ISE design flow. During design entry, you create your
source files based on your design objectives. You can create your top-level design file
using a Hardware Description Language (HDL), such as VHDL, Verilog, or ABEL, or
using a schematic. You specify your top-level module type when you create your project
as described in Creating a Project.
You can use multiple formats for the lower-level source files in your design. Different
source types are available, depending on your project properties (top-level module type,
device type, synthesis tool, and language). You can create these source files in Project
Navigator, as described in Creating a Source File. Some source types launch additional
tools to help you create the file, as described in Source File Types.
Table 4.3.1: Design summary of proposed method
Page 43
Timing constraints
The ISE software allows you to enter timing constraints that describe the timing
performance requirements of the design. Providing a concise set of constraints achieves
the following:
Allows the software to create a design that meets your requirements.
Allows you to compare the constraints to the performance of the resulting design,
using the timing reports output by the ISE software.
By analyzing the timing reports, you can identify the paths in the design that may require
coding modifications, placement directives, or additional constraints to achieve timing
closure. Increases the performance of ISE software by reducing the memory and runtime
requirement.
Table 4.3.2: Timing Constraint of proposed design
Page 44
Clock report
This report contains information on the resource utilization of each clock region and lists
any clock conflicts between global clock buffers in a clock region.
Table 4.3.3: Clock Report of implemented design
Page 45
Page 46
Page 47
Page 48
Page 49
REFERENCES
[1]. Yogitha S.K and Savitri Raju, DCT and Fuzzy based Analysis of Quantization
Effects for JPEG Image,
Page 50
Page 51
Page 52