sds cbir

32
SOFTWARE DESIGN SPECIFICATION for Content Based Image Retrieval Approved <Internal Guide> Prepared by <Student Name> <Register Number> <Date created> 1

Upload: farzana

Post on 10-Sep-2015

13 views

Category:

Documents


4 download

DESCRIPTION

CBIR java System design specification report

TRANSCRIPT

SOFTWARE DESIGN SPECIFICATION

for

Content Based Image Retrieval

Approved

Prepared by

Copyright 2014 by Department of Computer Applications, Karunya UniversityTable of Contents

Table of Contents

1. Introduction 31.1 Project Overview 31.2 Project Scope 31.3 Document Preview 42. Architectural Design 62.1 Section Overview 62.2 General Constraints 62.3 Database Design 72.4 Program Structure 92.5 Alternatives Considered 93. Detailed Design 103.1 Section Overview 103.2 Components104. User Interface Design 124.1 Section Overview 124.2 Interface Design Rules 124.3 GUI Components 124.4 Detailed Description 145. Conclusion 186. Appendices 196.1 Database Entity Relationship Diagram 196.2 Architectural Design Block Diagram[s] 206.3 User Interface Screen Snapshots 21

SOFTWARE DESIGN SPECIFICATION

1. INTRODUCTIONThis section describes the design for the Content Based Image Retrieval

1.1. Project OverviewContent-based image retrieval (CBIR), also known as query by image content (QBIC) and content-based visual information retrieval (CBVIR) is the application of computer vision to the image retrieval problem, that is, the problem of searching for digital images in large databases. "Content-based" means that the search will analyze the actual contents of the image. The term 'content' in this context might refer colors, shapes, textures, or any other information that can be derived from the image itself. Without the ability to examine image content, searches must rely on metadata such as captions or keywords, which may be laborious or expensive to produce. Potential uses for CBIR include Architectural and engineering design, Art collections, Crime prevention, Geographical information and remote sensing systems, Intellectual property, Medical diagnosis, Military, Photograph archives, Retail catalogs, Nudity-detection filters, Face Finding and Textiles Industry.The proposed system is to develop Content Based Image Retrieval software for web using J2EE. Most current content-based image retrieval systems are still incapable of providing users with their desired results. The major difficulty lies in the gap between low-level image features and high-level image semantics. The problems to be solved is to retrieve content matching images from a database of images and to provide an online implementation for the web.

1.2. Project ScopeThe scope of the application to be developed expands over research area of CBIR. It concentrates on exploration of the already accomplished research work on image content descriptors, focusing mainly on pixel color. Also, contribution to the enhancement of efficiency of such techniques is to be made for improved content based image retrieval. The application of the work to be done covers the following fields: Military: locating and recognizing remotely sensed objects, interpreting satellite data. Crime prevention and Security Check: Automatic face recognition systems, finger print or retina scanning for access privileges. Medical Diagnosis: Using CBIR in a medical database of medical images aid diagnosis by identifying similar past cases. Intellectual Property: Trademark image registration, where a new candidate mark is compared with existing marks to ensure no risk of confusing property ownership.The major features this project contains are the following: Cross platform support: Offers operating support for most of the known and commercial operating systems Centralized Retrieval: The information retrieval is centralized. Web Support: The product offers usability in a intranet and internet system Search: The CBIR software offers image based search and retrieval

1.3. Document PreviewThe scope of this SDS document encompasses the following: 1. It serves as a good reference to understand the way to develop low-level descriptors for CBIR.2. It acts as a design tool for the final specification.3. The functionalities derived from the design and mentioned in this document are further refined in the implementation phase.This document is intended for any individual user, developer, tester, project manager or documentation writer that needs to understand the basic system design and its specifications. Here are the potential uses for each one of the reader types:Developer: The developer who wants to read, change, modify or add new requirements into the existing program, must firstly consult this document and update the requirements with appropriate manner so as to not destroy the actual meaning of them and pass the information correctly to the next phases of the development process.User: The user of this program reviews the diagrams and the specifications presented in this document and determines if the software has all the suitable requirements and if the software developer has implemented all of them.Tester: The tester needs this document to validate that the initial requirements of this programs actually corresponds to the executable program correctly.For each one of the reader types to better understand this document, here is a suggestion of the chapters to read in this document: Developer: (1,2 ,3 ,4 ,5 and rest) User: (3,4) Tester: (2 ,3 ,4 ,5)

2. ARCHITECTURAL DESIGNThis section provides an overview and rationale for the program's data and architectural design decisions.

2.1. Section OverviewThe purpose of this section is to describe the design requirements for the research and development of visual feature descriptors for content based image retrieval. It is a culmination of requirements that arose at the various phases of development. The section describes global limitations or constraints that have a significant impact on the system design like hardware and software environments, interface requirements, external data representations, performance requirements and network requirements. This section also describes the structure databases, external files, architectural model chosen and the major components.

2.2. General ConstraintsThis program is created using Java/J2EE language. So a minimum PC having at least 512 MB of RAM and CPU over 2Ghz is required to run the program with good speed. Also the program uses at least 15 megabytes of hard disk space to store the program libraries. For the connection stream Http is used as it is the common protocol for internet applications.

CBIRClient1Client2requestsClient3Client4responseIn Client/Server architecture, a web client sends requests to a web server using a private or a public network. The network is usually the internet. The server processes these requests and returns data. The results of the request are handled as response to the client machines. Performance and extensibility must be taken care of while developing the system. Glassfish Server is a powerful Web server that provides a highly reliable, manageable, and scalable Web application infrastructure for J2EE. Glassfish helps organizations increase Web application availability while lowering system administration costs. Glassfish is required to run J2EE web applications.

2.3. Database DesignA database is a collection of stored data organized in such a way that all the data requirements are satisfied by the database. In order to design database and the tables used in the system, Oracle provides extra optional facilities, which aid and control each users access to use the database for adding modifying and retrieving data and facilitate data and facilitate data independence, integrity and security.The overall objective in the development of database technology has been to treat data as an organizational resources and as an integrated whole. A database management system allows data to be protected and organized separately from other resources. All business in the world runs on business data being gathered stored and analyzed. Business managers determine a set of rules that must be applied to the data being stored to ensure its integrity. Following is the list of tables used in the project:

TABLE NAME: Category

SNOFIELD NAMEFIELD TYPEDESCRIPTIONCONSTRAINT

1Catnamevarchar(20)category namePrimary Key

2CatDescvarchar(200)Category Description

TABLE NAME: Images

SNOFIELD NAMEFIELD TYPEDESCRIPTIONCONSTRAINT

1Catnamevarchar(20)category nameForeign Key

2ImagenameVarchar(50)Image namePrimary Key

TABLE NAME: VisualFeatures

SNOFIELD NAMEFIELD TYPEDESCRIPTIONCONSTRAINT

1VISIDIntTable IDPrimary Key

2Imagenamevarchar(20)Image nameForeign Key

3MeanValueIntMean Value

4DeviationIntDeviation value

The Entity-Relationship (ER) model is a conceptual data model that views the real world as entities and relationships. A basic component of the model is the Entity-Relationship diagram, which is used to visually represent data objects. The model has been extended and today it is commonly used for database design.

CATEGORYIMAGESVISUAL FEATURESBelongs toContains

2.4. Program StructureThe following shows the architecture of the program components.

Add New Category Main Page Add New Image View Images Search Images View Visual Features View Result The major components of the application are: Add a new category Add a New Image View Images Search Images View Result View Visual Features

2.5. Alternatives ConsideredThe following shows an alternative model considered before finalizing on the current model.

Main Page Search Images View Result This model was disregarded since it will not fulfil the objective of allowing the application to be helpful for further research by not showing the process details and working of the process.3. DETAILED DESIGN

3.1. Section OverviewThe purpose of this section is to describe the main components of the design of content based image retrieval in detail. Software design is both a process and a model. The design is a sequence of steps that enable the designer to describe all aspects of the software to be built. Modularity (in both program and data) and the concept of abstraction enable the designer too simply and reuse software components. The section describes the components Add a new category, Add a New Image, View Images, Search Images, View Result and View Visual Features in detail. The details are shown in the form of major pages and the major actions.

3.2. Add a new CategoryMajor Page(s) : addcategory.jspMajor Action(s) : Create Category and Save

3.2.1 Create CategoryTo create a new category for images, the user needs to enter a new category name and a category description.

3.2.2 SaveTo save the category details, the user needs to click on the submit button. A new folder with the category name will be created on the server. The category name is saved to the database.

3.3. Add a new ImageMajor Page(s) : addimage.jspMajor Action(s) : Select Category, Upload Image and Save

3.3.1 Select CategoryTo select a category for images, the user needs to click on the category name.

3.3.2 Upload ImageTo add a new image, the user needs to click on browse and select a jpg image.

3.3.3 SaveTo save the image, the user needs to click on the submit button. The image is uploaded in the category folder of the server. The image name is saved to the database.

3.4. View ImagesMajor Page(s) : viewimages.jspMajor Action(s) : list images

3.4.1 List ImagesTo view all the images from the server, the user needs to click on the view images link and the images will be shown in a list.

3.5. Search ImagesMajor Page(s) : search.jspMajor Action(s) : Upload Query Image and Search

3.5.1 Upload Query ImageTo create a new search, the user needs to upload the query image in jpg format.

3.5.2 SearchTo proceed with search, the user needs to click on the search button.

3.6. View ResultMajor Page(s) : result.jspMajor Action(s) : search result

3.6.1 Search ResultThe search result is ranked according to the match with query image and displayed as a list.

3.7. View Visual FeaturesMajor Page(s) : vfeatures.jspMajor Action(s) : list visual features

3.7.1 List Visual FeaturesTo view visual feature data of all images in the server, the user needs to click on the view visual features link.

4. USER INTERFACE DESIGN

4.1. Section OverviewThe purpose of this section is to describe the user interface design requirements for the research and development of visual feature descriptors for content based image retrieval. This section also describes the interface design rules, the various GUI components used in the web pages and their description.

4.2. Interface Design RulesInterface design focuses on three areas of concern:1. The design of interfaces between software modules;2. The design of interfaces between the software and other nonhuman producers andconsumers of information (i.e., other external entities);3. The design of the interface between a human (i.e., the user) and the computer. Easy to Learn Readability Easy navigate between interfaces

4.3. GUI ComponentsThere will be about 8 interfaces in the program. Since we are using HTML as our front end markup language, there are a lot of ready made components that are available for us to use already. HTML forms are used to pass data to a server. An HTML form can contain input elements like text fields, checkboxes, radio-buttons, submit buttons and more. A form can also contain select lists, textarea, fieldset, legend, and label elements. The following is a list of html controls that we will be using for this software.ComponentUsage

Text Input There are three types of text input used on forms:Single-line text input controls - This control is used for items that require only one line of user input, such as search boxes or names. Password input controls - This is also a single-line text input but it masks the character as soon as a user enters it. Multi-line text input controls - This is used when the user is required to give details that may be longer than a single sentence.

Checkboxes Checkboxes are used when more than one option is required to be selected. They are also created using HTML tag but type attribute is set tocheckbox.

Radio Box Radio buttons are used when out of many options, just one option is required to be selected. They are also created using HTML tag but type attribute is set toradio.

Select Box A select box, also called drop down box which provides option to list down various options in the form of drop down list, from where a user can select one or more options.

File Select If you want to allow a user to upload a file to your web site, you will need to use a file upload box, also known as a file select box. This is also created using the element but type attribute is set tofile.

Hidden ControlsHidden form controls are used to hide data inside the page which later on can be pushed to the server. This control hides inside the code and does not appear on the actual page. For example, following hidden form is being used to keep current page number. When a user will click next page then the value of hidden control will be sent to the web server and there it will decide which page has be displayed next based on the passed current page.

Clickable ButtonsThere are various ways in HTML to create clickable buttons. You can also create a clickable button using tag by setting its type attribute tobutton. This creates a button that is used to trigger a client-side script when the user clicks that button.

Submit and Reset ButtonThis creates a button that automatically submits a form. This creates a button that automatically resets form controls to their initial values.

4.4. Detailed DescriptionBelow are some of the web pages in the program. Main Page:

The above page is the main page of the application. The user can click on the appropriate links to take the desired action.New Category Page:

The above page is for creating a new image category. The user has to enter the new category name in the text box and click on create now to create the category.

Add new Image Page:

The above page is used to upload a new image to the server. The user has to click on browse, select an image and click on upload image now... button to proceed with uploading the image to the serverView Database Images Page:

The above page is used to view images from the server. The user has to select an image and click on view image button to view the selected image.

Search Image Page:

The above page is used to search images based on a query image. The user has to click on browse button to select an image and click on the search matching images now button.Search Result Page:

The above page is used to list the matching images along with the visual feature data in a ranked order.

View Visual Features Page:

The above page is used to list the visual feature data of all the images from the database.

5. CONCLUSIONTo validate the software, we need to test the software. During the testing we will be concerned about the inputs and their expected outputs. We emphasize on the testing where we will input the data and will compare the output with the expected results. At this stage, we are not concerned about the process; we are only looking for the correct outputs.We are concerned about inputs of data into the software and their expected outputs. So we will carry out black box testing where several different steps will be taken to test thesoftware so that when we use the software with specific data all the given out puts will match our expected results. We will compare the output with our expected output list and will find out credibility of the software.For the white box testing on this product we will run the scripts through a script debuggers and watch the values that are coming in and going out. We will have product run through and we will be looking for and at the break points We will also be watching the variable values and changes in them as scripts run through variable values.We have setup certain bounds or criteria for our software so that by following that criteria we will be able to maintain quality and user friendliness of the software.Response time of search functionBest Case Scenario -> ImmediateWorst Case Scenario -> 3 secondsResponse time of browse functionNext List of Records in 0.1 seconds

6. APPENDICES 6.1. Database Entity-Relationship Diagram

CATEGORYIMAGESVISUAL FEATURESBelongs toContains

6.2. Architectural Design Block Diagram

Add New Category Main Page Add New Image View Images Search Images View Visual Features View Result

6.3. User Interface Screen Snapshots

Main Page

New Category Page

Add new Image Page

View Database Images Page:

Search Image Page

Search Result Page

View Visual Features Page

1