A Major Project Report Final Year
A Major Project Report Final Year
On
Submitted in Partial Fulfilment of the requirement for the award of the degree of
BACHELOR OF TECHNOLGY
(Computer Science and Engineering)
Submitted by
Saurabh Sharma
(660970101004)
Shubham Nath
(150970101031)
Ratnesh Pathak
(660970101003)
Under the Guidance of
(Assistant Professor )
in
The matter presented in this report has not been submitted by me anywhere for the
award of any other degree of this or any other institute.
This is to certify that the above statement made by the candidate is correct to the best
of our knowledge.
Date:
1.1 Introduction 1
1.2 Literature Survey 2
1.3 Problem Statement 3
1.3.1 Problem Explanation 3
1.3.2 Problem Solution 4
1.4 Features of The Project 4
1.5 Organization of The Report 5
1.6 Summary 6
2 System Requirements and Specification 7
2.1 Purpose of This Document 7
2.2 General Description 7
2.2. Users and Characteristics 7
1
2.2. Product Perspective 7
2
2.2. Overview of Functional Requirements 8
3
2.2. Overview of data Requirements 8
4
2.2. General Constraints, Assumption Dependencies, 8
5 Guidelines
2.2. User View of Product Use 8
6
2.2. Hardware and Software Requirements 9
7
2.3 Summary 9
3 System Design Description 10
3.1 Preliminary Design 10
3.1. Layout of Content Based Image Retrieval System 10
1
3.1. About Technology 11
2
3.1. Design Considerations 12
3
3.2 Architectural Strategies 13
3.2. The Modules of The CBIR System 13
1
3.2. Interfaces 14
i
2 v
3.2. Dataflow Diagram 15
3
3.3 Detailed System Design 16
3.3. Use Case View 16
1
3.3. Level 1 DFD 19
2
3.3. Class Diagram 20
3
3.3. Sequence Diagram 22
4
3.4 Summary 23
4 Implementation 24
4.1 Add New Module 24
4.2 Average RGB 31
4.3 Local Color Histogram 32
4.4 Global Color Histogram 34
4.5 Summary 38
5 Testing 39
5.1 Testing Process 39
5.2 Testing Objectives 39
5.3 Levels of Testing 39
5.3. Unit Testing 39
1
5.3. Integration Testing 41
2
5.3. System Testing 41
3
5.4 Summary 43
6 Conclusion and Future work 44
6.1 Conclusion 44
6.2 Future Enhancement 44
References 45
Appendix A Snapshots 47
LIST OF TABLES
Page No.
Table 3.1 Technology Used to Implement CBIR 12
Table 5.1 Test Cases For FILE Opening And ADD New Module 40
Table 5.2 Test Cases For Modules Color Histogram And Texture 41
Table 5.3 Test Cases for Content Based Image Retrieval System 42
v
i
LIST OF FIGURES
Page No.
Fig 3.1 Flow of Work 16
Fig 3.2 Use Case Diagram of CBIR 18
Fig 3.3 Data Flow Model of CBIR 20
Fig 3.4 Class Diagram for CBIR 21
Fig 3.5 Sequence Diagram of ADD NEW Module 22
Fig 3.6 Sequence Diagram of Color Histogram 23
Fig A1 Execution of The Java File 47
Fig A2 Front Page of The Application 48
Fig A3 Login Page 49
Fig A4 Administrator Main Screen With Menu Options. 50
1.1 Introduction
In the last few years, the rapid growth of the Internet has enormously increased the
number of image collections available. The accumulation of these image collections
(including art works, satellite and medical imagery) is attracting more and more users in
various professional fields[2]—for example geography, medicine, architecture,
advertising, design, fashion and publishing.
Meanwhile, the study of image retrieval, which is concerned with effectively and
efficiently accessing desired images from large and varied image collections, has become
more interesting and more challenging[1].
Image retrieval is concerned with techniques for storing and retrieving images both
efficiently and effectively[2]. Early image retrieval methods locate the desired images by
matching keywords that are assigned to each image manually. However, as a result of the
large number of images in collections, manual processing has become impractical.
As well, because we are unlikely to foresee all the query keywords that will be
used in a retrieval process, it is impractical to assign keywords to every image, so the
effectiveness of classic image retrieval is very limited.
Robust Content-based image retrieval (referred to as RCBIR in this thesis), which
is based on automatically extracted primitive features such as color, shape, texture, and
even the spatial relationships among objects, has been employed since the 1990’s[4]. In
the last ten years, a great deal of research work on image retrieval has concentrated on
CBIR technology.
Some commercial products based on CBIR technology have come to the
marketplace, well-known examples including QBIC[1].Image databases and collections
can be enormous in size, containing hundreds, thousands or even millions of images. The
conventional method of image retrieval is searching for a keyword that would match the
descriptive keyword assigned to the image by a human categorizer. Currently under
development, even though several systems exist, is the retrieval of images based on their
content, called Content Based Image Retrieval, CBIR[5]. While computationally
expensive, the results are far more accurate than conventional image indexing. Hence,
there exists a tradeoff between accuracy.
The need for Content- Based image retrieval is to retrieve images that are more
appropriate [1], along with multiple features for better retrieval accuracy. Usually in search
process using any search engine, which is through text retrieval, which won’t be so
accurate. So, we go for Content- Based image retrieval. Content- Based Image Retrieval
also known as query by image content (QBIC) and content-based visual information
retrieval (CBVIR) [2].
“Content-based” means that the search makes use of the contents of image
themselves, rather than relying on human-inputted metadata such as captions or keywords
[3]. The similarity measurements and the representation of the visual features are two
important issues in Content-Based Image Retrieval (CBIR) [8].
Given a query image, with single / multiple object present in it; mission of this
work is to retrieve similar kind of images from the database based on the features extracted
from the query image [1]. In this we use features like
RGB Color
GCH (Global Color Histogram)
LCH (Local Color Histogram).
Further to Image retrieval we can able to compare the several pairs of Images and
find out whether it is exactly matching or not.
The solution initially proposed was to extract the primitive features of a query
image and compare them to those of database images. The image features under
consideration were color and texture. Thus, using matching and comparison algorithms,
the color, the shape and texture features of one image are compared and matched to the
corresponding features of another image.
This comparison is performed using color, and texture distance metrics. In the end,
these metrics are performed one after another, so as to retrieve database images that are
similar to the query.
The similarity between features was to be calculated using algorithms used by well
known CBIR systems such as QBIC. For each specific feature there was a specific
algorithm for extraction and matching.
1.4 Features of the Project
The main feature of this thesis work is to retrieve images that are similar to query
image from a large database. We use content- based search, for high accuracy multiple
features like color, texture and shape is incorporated. Color feature extraction is done
through “Global Color Histogram (GCH)” and “Local Color Histogram”, and Average
RGB Color Value.
CBIR’s advantages
CBIR’s disadvantages
Chapter 3 includes the design of the project where the system architecture, hardware
and software interfaces, a detailed description of different features along with the
UML diagrams are specified.
Chapter 4 includes the implementation details where the pseudo code of the important
classes is specified.
Chapter 5 includes the testing, which specifies how the different modules of the
project are tested for its correct working.
The document ends with the conclusion and future work along with the few
appendixes, which includes the snapshots of the results, and some of the important
definitions.
1.6 Summary
In this chapter we came to know briefly about what is the project all about. In
addition we also learnt the need of the project. The specific requirements of the project are
carried out in next chapter.
CHAPTER 2
Under this topic we get the description of the users who uses the system along with
their characteristics and it specifies the product. It also describes briefly the functional and
data requirements of the project.
User will give the query image .This image should be a real world image.
User also has to mention the features on which the related images should be retrieved
like global color histogram, local color histogram and average RGB etc.
Later the user will get the related images for the query image as the output.
Our product is developed to get the related images for the query image from the
database. It is helpful in web designing who wants to search the whole database images for
the specific type of images for designing purpose. The product meets the 90% of the
accuracy level.
Crime prevention
The military
Architectural and engineering design
Fashion and interior design
Journalism and advertising
Medical department
Purpose: To retrieve the related images from database based on similarity features.
Inputs: Query images from the real world entity.
Outputs: List of related images is displayed along with the total time required.
The product requires the database to store the images to be compared with query
image. Images in the database and the query images features have to be extracted which is
required in similarity measurements. The features extracted will be based on Average
RGB, Local color histogram and Global color histogram. So the images of different world
entities are stored in database.
2.2.5 General Constraints, Assumptions Dependencies, Guidelines
Our product is entirely based on image processing and requires JPEG format of the
image to process with. Users must have an enough memory to hold feature extracted so that
all the similarities result can be stored temporally. The system should also specify that the
object is an image file but not a text file.
Image processing
The hardware and software requirements of the system which are required for the
implementation of the project in a system.
Software Requirements:
Hardware Requirements:
2.3 Summary
In this chapter we came to know briefly about what is the purpose of the document,
general description, users and their characteristics, product perspective, functional and data
requirements, user view of the product use, hardware and software requirements of the
system.The system design description is carried out in the next chapter.
Chapter 3
In this chapter we specify the design description of Content Based Image Retrieval
System. The design description consists of preliminary design and detail design.
Preliminary design specifies the high level design and detail design specifies the low level
design.
Image databases and collections can be enormous in size, containing hundreds,
thousands or even millions of images. The conventional method of image retrieval is
searching for a keyword that would match the descriptive keyword assigned to the image
by a human categorizer. Currently under development, even though several systems exist,
is the retrieval of images based on their content, called Robust Content Based Image
Retrieval using multiple features extraction, RCBIR. While computationally expensive, the
results are far more accurate than conventional image indexing.
Hence, there exists a tradeoff between accuracy and computational cost. This
tradeoff decreases as more efficient algorithms are utilized and increased computational
power becomes inexpensive.
The administrator has to insert the images one at a time or folder wise into the
database before starting with the query image.
The user interface gives the query image whose related image from database has to be
extracted. The images should be from real world entity.
Features of the query image is extracted and stored temporally for comparison.
In the same way the features of images in the database is extracted.
User specifies the feature on which the related database image has to be extracted as
output. Features considered are color histogram like local and global color histogram,
average RGB.
After the comparison if the image of database is related to the query image then that
image will be added in the list of output images.
This section describes many of the issues, which need to be addressed or resolved
before attempting to devise a complete design solution.
Hardware Requirements: The hardware requirements for running the project are as
follows:
512 MB RAM
Webcam (optional)
Software Requirements: The software requirements for running the project are as
follows:
Operating system:
Windows XP
Languages used:
Java
Mysql yog database
Operating System:
The operating system used is any Windows operating system. The user can access
the application through software’s (Java) in Windows operating system. Windows is the
most popular and user-friendly operating system. It sufficiently caters to the needs of the
application on the client side. It’s good enough to support all sorts of activities required by
user. Because user may not be technical graduates it’s easier for them to use the
application in the windows operating system.
Here we will discuss about the architecture of Content Based Image Retrieval
which includes the following topics:
The Content Based Image Retrieval divided into following modules for design and
development.
Module 1: Add new module
Module 2: Color Histogram module
In this module Administrator add the images to the database. The images to database
are added individually or the folder of images can be added simultaneously.
The dialog box of image insertion successful will be displayed. Later the user can
select the query image from any of the folder which is a real world entity. If administrator
go ahead with future process before adding the query image a dialog box indicating that
query image is to be inserted.
Average RGB
The red, green and blue color intensity of query image is calculated and compared
with the RGB values of database images and related images are displayed as output.
3.2.2 Interfaces
The chapter describes the interfaces used. It discusses the graphical, hardware and
software interfaces used.
Hardware Interface
Software Interface
Image Database
Features Database
Detail design specifies who uses the Content Based Image Retrieval system outside
the system i.e. within the environment, how the process within the system communicates
along with how the objects with in the process collaborate using both static as well as
dynamic UML diagrams in this ever-changing world of Object Oriented application
development, it has been getting harder and harder to develop and manage high quality
applications in reasonable amount of time.
As a result of this challenge and the need for a universal object modeling language
every one could use, the Unified Modeling Language (UML) is the Information industries
version of blue print. It is a method for describing the systems architecture in detail. Using
this blue print, it becomes much easier to build or maintains system, and to ensure that the
system will hold up to the requirement changes. This part also specifies the other levels of
data flow diagram.
A use case diagram presents a collection of use cases and actors and is typically
used to specify or characterize the functionality and behavior of a whole application
system interacting with one or more external actors. The users and any system that may
interact with the system are the actors. Since actors represent system users, they help
delimit the system and give a clearer picture of what it is supposed to do. Use cases are
developed on the basis of the actors needs. This insures that the system will turn out to be
what the user expected.
Use case diagrams contain icons representing actors, association relationships,
generalize relationships, packages, and use cases. A use case diagram shows the set of
external actors and the system use cases that the actors participate in. A use case
specification enables to display and modify the properties and relationships of a use case.
The information in the specification is presented textually; some of this information can
also be displayed inside the icon representing a use case. Use-case diagram is used to
depict the requirements and the users of the CBIR.
The Use-case diagram as shown in below Figure 3.4 identifies the use cases and
actors in CBIR. The use cases are
Query by Image: Here the user gives the query image of JPEG format instead of
query by text etc.
Database Images: This use case contain a large list of images with which the query
image is compared to extract related images..
Feature Extraction of query image: Here the features of the query image are extracted
and stored in the temporal storage.
Feature Extraction of database images: Here the features of the database images are
extracted and stored in the temporal storage
Similarity Measurements: This use case carries the task of comparing the query image
features with the database images individually and the matched result is obtained.
Output Images: Here we display the images related to query image in serial form.
Content Based Image Retrieval
Database
User Query By Image Images
« include»
Feature Feature
extraction Extraction
Similarity
Web Designers Military Measurements
Output
Images
User: user is the one present in the environment and uses the process involved in
the system.
Military: These are a type of users who can use the system to detect intruders and
any attacks.
Web Designers: these are another type of users who can use the system for web
designing purpose.
Query by Image: It is the image selected by the user to make a search.
Feature extraction: It extracts the features of both query and database images.
Database Image: These are images stored in the database by the user.
Similarity Measurements: It compares the features of both query and database
images.
Output Images: The images which are similar to the query image are displayed to
the user.
3.3.2 Level 1 DFD
In this diagram we will have the detail explanation of the context diagram of the
system explained in preliminary design at the start of this chapter.
Level 1 DFD:
Query Image
It is a process and are the user provided images. The images should be of the
format JPEG. CBIR uses the RGB color space to store information.
Feature Extraction
It is an external entity which helps to store the features of both query and database
images.
Similarity Matching: It is an entity which compares the features of the query image and
database images.
Retrieved Images: It is a process which displays the related images according to the query
image to the user.
Figure 3.3 Data Flow Model of CBIR
Class diagrams are the backbone of almost every object-oriented method including
UML. They describe the static structure of a system. Classes represent an abstraction of
entities with common characteristics. Associations represent the relationships between
classes.
Figure 3.5 is the class diagram of CBIR. The basic structure of the class diagram
arises from the classes and relationship of the system is discovered at various points in the
design process. The classes that are identified in this phase are
1.Addnew: The images to database are added individually or the folder of images can
be added simultaneously. The dialog box of image insertion successful will to be displayed.
Later the user can select the query image from any of the folder which is a real world entity.
CBIR
CBIR( )
Average RGB
BMP Loader
1 Feature Extraction
AvgRGB()
BMPLoader( ) 1 *
FeatureExtraction( )
image
1
Filter 1
Loacl Color Histogram
Add New Feature Tester
image Filter( ) *
LocalColorHistogram( )
AddNew( ) FeatureTester( )
Color Moment
image Discover Image
*
ColorMoment( ) GlobalColorHistogram
DiscoverImage( )
GlobalColorHistogram()
*
Color Conversion
ColorConversion( )
onversConversion()
1. BMP loader: The image will be divided into pixels and distributed according
RGB.
2. Filter: It checks the extension of the selected query image and the images
added into the database.
4. Discover image: Checks whether the given image is in image format or text
format.
5. Feature extraction: Extracts features of given query image and images in the database.
6. Feature Tester: Tests the features of the extracted from the images.
7. AVG RGB: Calculates the Avg RGB values of the query image as well as the images
in the database.
8. Local/Global Color Histogram: The image will be divided into segments and histogram
is compared with database images.
3.3.4 Sequence Diagram
Class and object diagrams are static model views. Interaction diagrams are
dynamic. They describe how objects collaborate. A sequence diagram is an interaction
diagram that details how operations are carried out what messages are sent and when.
Sequence diagrams are organized according to time. The time progresses as you go down
the page. The objects involved in the operation are listed from left to right according to
when they take part in the message sequence.
The sequence diagram of Content Based Image Retrieval as shown below in Figure
3.6. The sequence of steps in the figure is as follows:
Initially the user adds the images to the database and the even the query image is
given by the user. The query image should be a real world entity and is of JPEG
format.
The search for the related images of the query image in the database is done using
methods like AVG RGB, LOCAL and GLOBAL COLOR HISTOGRAM.
The user selects anyone of the above methods to obtain related images from the
database.
Later the features of the query image is obtained based on the method selected by the
user and stored temporarily. In the same way the features of the database images are
extracted and stored.
The comparison between the features of the query image and the database images is
carried out.
Avg RGB,LCH
GCH,Texture
Query features extracted
Group images
featuresextracted
Comparing features of
Query and db images
Output
(Related images and total time taken)
3.4 Summary
In this chapter we came to know briefly about the preliminary design, layout of
CBIR, technology used, design considerations, architectural strategies, modules of CBIR,
interfaces, data flow diagram, detailed system design, use case view, level 1 DFD, class
diagram, sequence diagram.
CHAPTER 4
IMPLEMENTATION
4. Data updating.
This chapter presents the implementation details for all modules that are:
In this module administrator add the images to the database. The images to database
are added individually or the folder of images can be added simultaneously. The dialog box
of image insertion successful will be displayed. Later the user can select the query image
from any of the folder which is a real world entity. If user go ahead with future process
before adding the query image a dialog box indicating that query image is to be inserted.
The classes that are used to implement this module i.e. ADD NEW and OPEN images
from those classes specified in the design phase is as follows:
Add New
class AddNew
{
AddNew(JFrame frame, JLabel label);
Void cons(GridBagConstraints gbc, int gx, int gy, int gw, int gh, int wx, int wy);
The prototype of this class is specified in Add New the header file is as shown above.
AddNew(JFrame,JLabel)
Output: It creates the frame and adds the label to the created frame.
Description: This prototype creates the frame in which all the interactive process is
carried out of the user and even the label is also created. The frame size can be mentioned
by the user. It is an constructor which has the same name as the class.
Description: The action to be performed my the buttons will be carried out by a click on
the botton. It is an in built function.This is inherited by the AddNew class.
Description: The images required to be added to the database can be obtained.Even the
query image is obtained and displayed on the front end screen. This is also a in built
function.
void cons(GridBagConstraints gbc, int gx, int gy, int gw, int gh, int wx, int wy)
Input: The gridBagConstraint, x and y value, width and height, weight of x and y.
Description: The grid bag layout is added. It returns nothing to the main function hence
the return type is void. This is too a in built function in one of the java package.
Description: It checks whether the path mentioned to obtain the image is true or false. It
has a Boolean type of return value i.e true or false.
Class filter
Class filter
{
Filter(String[] ext)
}
Class fliterclass prototype of module 1
This function is used check for the image file which has .ext extension.
Description: this function is used to accept the file name which ends with .ext extension. It
has a Boolean type of return value i.e. true or false.
String getDescription();
BMPLoader(String a)
BMPLoader()
Description: Constructs objects from the database query process. Returns the number of
database records read. Build an int from a byte array - convert little to big endian.
Description: Constructs objects from the database query process.Build an int from a byte
array - convert little to big endian and set high order bytes to 0xfff.
Description: It constructs an objects for the database query process.Build an double from
a byte array - convert little to big endian.
Description:It reads Map24 internal routine to read the bytes in a 24 bit bitmap and
returns an image object, and it will be sure to check for (Image)null.
static Image readMap32(FileInputStream fs,BitmapHeader bh)
Input:It reads an input stream file fs and byte data that contains the file information.
Input:It takes an string directory value sdir and a string file value as sfile.
Description: The image load makes it easy to load images in either of two formats: GIF
and JPEG.
Description: If the load images is neither of two formats: GIF and JPEG than it throws an
IOException.
Class Viewer2
Class Viewer2
{
void paint(Graphics g)
void paint(Graphics g)
Description: This function is used get path of the image with the extension .jpg or.fig
Class UserDAO
Connection getConnection()
void closeConnection()
The function takes name, description and the path of the image and stores into the data
base
{
Connection getConnection()
void closeConnection()
int retrive()
int retrive()
This function is used to retrieve a set of images from the databases which is similar to
Exceptions in Java
The Throw able class provides a String variable that can be set by the subclasses to
provide a detail message that provides more information of the exception occurred. All
classes of throwables define a one-parameter constructor that takes a string as the detail
message.
The class Throw able provides get Message () function to retrieve an exception. It has
a printStackTrace () method to print the stack trace to the standard error stream. Lastly It also
has a toString () method to print a short description of the exception. For more information on
what is printed when the following messages are invoked, please refer the java docs.
Syntax
String getMessage()
void printStackTrace()
String toString()
Class Exception
The class Exception represents exceptions that a program faces due to abnormal or
special conditions during execution. Exceptions can be of 2 types: Checked (Compile time
Exceptions)/ Unchecked (Run time Exceptions).
Class RuntimeException
Runtime exceptions represent programming errors that manifest at runtime. For
example ArrayIndexOutOfBounds, NullPointerException and so on are all subclasses of the
java.lang.RuntimeException class, which is a subclass of the Exception class. These are
basically business logic programming errors.
Class Error
Errors are irrecoverable condtions that can never be caught. Example: Memory leak,
LinkageError etc. Errors are direct subclass of Throwable class.
The red, green and blue color intensity of query image is calculated and compared
with the RGB values of database images and related images are displayed as output.
AverageRGB
public AverageRGB();
}
AverageRGB prototype of Module 2
AverageRGB()
Description: The name, length, category version and the description of the feature of the
image will be added.
Description: The RGB pixels of the image are considered and the total value of the red,
blue and green is extracted. These obtained values are returned as the vector to the calling
function.
Input: The vector value features of the query image and the vector of the database images.
Output: The value obtained after the calculation.
Description: The vectors of the query image and the each and every image of the database
image are compared. If the relevant value is obtained then the database images is added to be
output list of images.
The image will segmented into and color histogram of each block will be obtained.
We calculate the distance, using their histograms, between a region in one image and a
region at same location in the other image in database.
public LocalColorHistogram()
Local ColorHistogram()
Description: The name, length, category , version and the description of the feature of the
image will be added.
Description: The image is segment into blocks and then obtains a color histogram for each
block. When comparing two images, we calculate the distance. The distance between the
two images will be determined by the sum of all these distances. These obtained values are
returned as the vector to the calling function.
Input: The discovered image i.e. the image of the JPEG format and distance is taken.
Description: The image is segment into blocks and then obtains a color histogram for each
block. When comparing two images, we calculate the distance. The distance between the
two images will be determined by the sum of all these distances. These obtained values are
returned as the vector to the calling function.
Input: It takes width, height and distance of a given image and double variable.
Description: using width, height and distance it calculates the distance between the query
image and the database images and displays the best matched images as output.
Same as the local color histogram but considers all the regions of the image.The
classes that are used to implement this module i.e. Color Histogram from those classes
specified in the design phase is as follows:
GLOBALCOLORHISTOGRAM:
GlobalColorHistogram()
Input: The discovered image i.e. the image of the JPEG format.
Description: The color histogram depicts color distribution using a set of bins. Using
the GCH, an image will be encoded with its color histogram, and the distanc between two
images will be determined by the distance between their color histograms.This obtained
values are returned as the vector to the calling function.
public GlobalColorHistogram()
}
Global Color Histogram prototype of Module 2
FEATURE TESTER
void compute()
This function process for the images in the database as per the features of the query
image and will display the total time consumed to read the images from the data base.
Void compute()
This function is used to compute feature vectors of the query image and the
database images.
FEATURE EXTRACTION
String getFeatureName()
It gives the name of the feature extraction method used for that particular
search.
Input: The discovered image i.e. the image of the JPEG format.
Description: The feature extraction is done using methods as avg rgb,local and global
color histogram etc and distance values are calculated. This obtained values are returned as
the vector to the calling function.
Input: The vector value features of the query image and the vector of the database images.
Output: The dimensions of the both images are given.
Description: The vectors of the query image and the each and every image of the database
image are compared. If the relevant value is obtained then the database images is added to
be output list of images.
Input: The string value features of the query image and the string value of the database
images.
Output: The value obtained after the calculation.
Description: The string value of the query image and the each and every image of the
database image are compared. If the relevant value is obtained then the database images
is added to be output list of images.
Description: All the values that are stored in vector are converted into a string value.
Description: After the process got over all the string values are converted back into vector
values.
There are two types of users in Robust Content Based Image Retrieval.
1. Admin Login
2. User Login
Admin User
Admin is the super user and he has all the rights over the database.
Admin has the rights to create new user or members to access the RCBIR system.
Admin can add new images or change the details of the images in the database.
Admin has the full rights to update/modify the details in the database.
User profile
User can access the images in the database by passing an input image as parameter.
User can have a look at the images in the database but doesnot have any rights to
modify or create new image in the database.
4.5 Summary
In this chapter we came to know briefly about the implementation of Add New
Module, Average RGB, Local Color Histogram, Global Color Histogram.
Chapter 5
TESTING
This chapter gives the outline of all the testing methods that are carried out a get a bug
free system. Quality can be achieved by testing the product using different techniques at
different phases of the project development.
2. A good test case is one that has high probability of finding an as yet undiscovered
error.
Different levels of testing are used in the testing process; each level of testing aims to
test different aspects of the system. The basic levels are unit testing, integration testing,
system testing and acceptance testing
5.3.1 Unit Testing
Unit testing focuses verification effort on the smallest unit of software design the
module. The software built, is a collection of individual modules. Each module performs a
unique function. In this kind of testing, exact flow of control for each module was verified.
With detailed design Considerations used as a guide, important control paths are tested to
uncover errors within the boundary of the module.
The Unit Test can be conducted in parallel for multiple modules. Table 5.1 shows the
test conducted on the basic module of the system ie insertion of the new image. Table 5.2
shows the test conducted on the color histogram and texture modules.
Table 5.1 Test Cases for FILE opening and ADD NEW Module
The second level of testing is called integration testing. In this, many class-tested
modules are combined into subsystems, which are then tested. The goal here is to see if all
the modules can be integrated properly. We have integrated all the classes and have checked
for compatibility. Errors obtained are identified and debugged.
Here the entire software system is tested. The reference document for this process is
the requirements document, and the goal is to see if the software meets its requirements.
Debugging is not always easy. Some bugs can take a long time to and. Debugging
concurrent code can be particularly difficult and time consuming. It helps to understand the
language and its libraries. A common source of errors in Java is to use libraries without
properly understanding what methods do and how they work. For example, one might forget
to call a method to initialize an object.
It is a good idea to add toString methods to your own classes. Then when debugging
you can simply print out an object of that class and see some of its data. You will see this in
the example below. It is also a good idea to add a main method to your class, which does
some testing of that class. Then the class can be executed directly and you can test your
classes separately.
Each module and component was thoroughly tested to remove bugs through a System
testing strategy. Test cases were generated for all possible input sequences and the output was
verified for its correctness. Test cases for system testing are mentioned below.
Table 5.3 Test Cases for Content Based Image Retrieval System
Validation Checks
1. Login Page:
Username is empty.
Password is empty.
2. Admin Login:
UserID is empty.
Password is empty.
Validation is done when admin uploads new image folder to the database.
3. User Login:
Validation is done when user opens a files from the local drive as an input
image.
In this chapter we came to know briefly about the testing process, testing objectives,
levels of testing which includes unit testing, integration testing and system testing.
CHAPTER 6
6.1 Conclusion
The need for Content- Based image retrieval is to retrieve images that are more
appropriate, along with multiple features for better retrieval accuracy.“Content-based”
means that the search makes use of the contents of image themselves, rather than relying
on human-inputted metadata such as captions or keywords. The similarity measurements
and the representation of the visual features are two important tasks in Content-Based
Image Retrieval (CBIR).Given a query image, with single object present in it; mission of
this work is to retrieve similar kind of images from the database based on the features
extracted from the query image. We use content- based search, for high accuracy multiple
features like color, texture and shape is incorporated. In this project, we implemented a
CBIR system based on multiple features representations which include: Color Feature
through GCH & LCH. Color feature extraction is done through “Global Color Histogram
(GCH)” and “Local Color Histogram”.
References
[1] John Eakins and Margaret Graham, “Content-based Image Retrieval”, JISC
Technology ApplicationsProgramme. University of Northumbria at Newcastle.
January 1999
[2] Rui Y. & Huang T. S., Chang S. F. “Image retrieval: current techniques,
directions, and open issues”. Joumal of Visual Communication and Image
Representation, 10,39-62,.
[6] Henning Muller, Wolfgang Muller, David McG. Squire and Thierry Pun,
Performance Evaluation in Content-Based Image Retrieval: Overview and
Proposals. Computing Science Center, University of Geneva, Switzerland, 2000.
[7] http://www.unn.ac.uWiidr/report.htrnl.
[8] http://wang.ist.psu/~jwang/test.html.
[9] Shengjiu Wang, “A Robust CBIR Approach Using Local Color Histograms,”
Department of Computer Science, University of Alberta, Edmonton, Alberta,
Canada, Tech. Rep. TR 01-13, October 2001, Found at:
[10] Raghu Krishnapuram, Swarup Medasani, Sung-Hwan Jung, , Young-Sik Choi,
and Rajesh Balasubramaniam “Content-Based Image Retrieval Based on a
Fuzzy Approach” OCTOBER 2004.
[12] Wang Xiaoling, Xie Kanglin, “Application of the Fuzzy Logic in Content-based
Image Retrieval1” April 2005.
[13] Rouhollah Rahmani, Sally A. Goldman, Hui Zhang, John Krettek, and Jason E.
Fritts “Localized Content Based Image Retrieval” MIR’05,
Snapshots
Figure A1 shows snapshot of the execution of the Java file specifying to open the
project. Once the command prompt is displayed we execute using javac command, which
will internally call the java complier to compile and execute the file
BackgroundImagePanel.java file to open the first output page of the project.
Figure A1 Execution of The Java File
Figure A2 shows snapshot of the front page of the system from where the
application should run. Here display of front page along with Enter button is shown. On
this page when Enter button is clicked it proceeds to the next output page of the project i.e
Snapshot 3
Figure A2 Front Page of The Application
Figure A3 shows snapshot of the login page of the system from where the
application should run. Here display of login page along with user ID Textfield, user
password Textfield and Login button is shown. On this page when authentic user ID and
user password is given and then Login button is clicked it proceeds to the next output page
of the project i.e Snapshot 4.
Figure A3 Login Page .
Figure A4 shows snapshot of Administrator main screen with menu options. The
menu options such as User, File, Color Histogram and New can be selected to perform a
particular function.