You are on page 1of 69

PROJECT ON

CONTENT BASED IMAGE RETRIEVAL USING GABOR WAVELET

To be submitted by:-

Yadav Satyam

CONTENT BASED IMAGE RETRIEVAL

Page 1

Thakur Degree College of Science & Commerce.


Shyamnarayan Thakur Marg, Thakur Village, Kandivali (E), Mumbai-400101.

Date: _______________

CERTIFICATE OF APPROVAL
This is to certify that:

Yadav Satyam
Students of Master of Science (Information Technology) of Thakur Degree College of Science & Commerce have successfully completed and submitted the project entitled Content Based Image Retrieval (CBIR) using Gabor Wavelet in the partial fulfillment as per the syllabus defined by the University of Mumbai. The project is the original study work and the important sources used have been dually acknowledged in the report.

________________

______________________

Project Guide

Head of Department

_____________________ External Examiner

CONTENT BASED IMAGE RETRIEVAL

Page 2

CONTENT BASED IMAGE RETRIEVAL

Page 3

Acknowledgement

I am pleased to have this opportunity to express my profound gratitude to the management of Thakur College of Science & Commerce for giving me the opportunity to accomplish this project I am thankful to the Honorable Principal Mrs. C. T. Chakraborty and the Head of the IT Department (H.O.D.) Mr. Santosh Kumar Singh for their great support. I am very much grateful to Mrs. VarshaTurkar, my Project Guide for the valuable guidance and suggestions which helped me accomplish the project. I am very much grateful to Mr. RavindraPatil, for his suggestions which helped me in the project.

CONTENT BASED IMAGE RETRIEVAL

Page 4

CONTENT BASED IMAGE RETRIEVAL

Page 5

SYNOPSIS
INTRODUCTION:
Content Based Image Retrieval (CBIR) is a system, which retrieves the images from images from an image collection where the retrieval is based on a query, which is specified by content and by index or address. The CBIR system retrieves relevant images from an image collection based on automatic derived features. The derived features include primitive features like texture, color, and shape. Content-Based Image Retrieval (CBIR) allows to automatically extracting target images according to objective visual contents of the images itself.

Problem Definition:
Image retrieval can be divided into Text-Based Image Retrieval (TBIR) and ContentBased Image Retrieval (CBIR). The text-based image retrieval technique first annotates the images by text, and then uses text-based database management systems to perform image retrieval. The TBIR system has following problems: When the size of image collection is large considerable amount of labor is required for manual image annotation. The other difficulty is the subjectivity of human perception that is, for the same image content different people may perceive it differently. The perception subjectivity and annotation impreciseness may cause unrecoverable mismatches in later retrieval processes.

CONTENT BASED IMAGE RETRIEVAL

Page 6

Project Explanation:
CBIR is the retrieval of images based on visual features such as color, texture and shape. 1. Feature Extraction: The first step in the process is extracting image features to a distinguishable extent. 2. Matching: The second step involves matching these features to yield a result that is visually similar.

Algorithm to be implemented: Extract the feature vector of the images. Store the feature vector in the database. Extract the feature vector of the Query image. Compare the feature vector of the query image with database features Apply similarity measures. Retrieves similar images.

Technology:
MATLAB

Reasons for using MATLAB:


MATLAB is a high performance language for technical computing. It allows easy matrix manipulation, plotting of function and data, implementation of algorithm, creation of user interfaces and interfacing with programs in other language. MATLAB also provides wide range of elementary functions. It supports various types of data files and it also has Object Oriented capabilities

CONTENT BASED IMAGE RETRIEVAL

Page 7

INDEX
Sr. No 1. Content Page No.

Introduction 1.1 1.2 Content Based Image Retrieval Digital Image and its Features 1.2.1 Feature Vectors

2.

Wavelet 2.1 2.2 2.3 Introduction Wavelet Transform Gabor Wavelet Working of the project Flow chart of the CBIR systems Methodology Hardware and Software Requirement Gantt Chart

3.

System Overview 3.1 3.2

4.

System Analysis and Design 4.1 4.2 4.3

4. 5. 6. 7. 8.

Introduction to Matlab Screenshots Testing Cost Estimation Annexure 8.1 8.2 Limitation of the System Future Enhancements

9. 10.

Conclusion Appendix Bibliography

CONTENT BASED IMAGE RETRIEVAL

Page 8

CONTENT BASED IMAGE RETRIEVAL Image retrieval is the process of browsing, searching and retrieving images from a large database of digital images. The collection of images in the web are growing larger and becoming more diverse .Retrieving images from such large collections is a challenging problem. One of the main problems they highlighted was the difficulty of locating a desired image in a large and varied collection. While it is perfectly possible to identify a desired image from a small collection simply by browsing, more effective techniques are needed with collections containing thousands of items. To search for images, a user may provide query terms such as keyword, image file/link, or click on some image, and the system will return images "similar" to the query. The similarity used for search criteria could be meta tags, color distribution in images, region/shape attributes, etc. Unfortunately, image retrieval systems have not kept pace with the collections they are searching. The shortcomings of these systems are due both to the image representations they use and to their methods of accessing those representations to find images. The problems of image retrieval are becoming widely recognized, and the search for solutions an increasingly active area for research and development. In recent years, with large scale storing of images the need to have an efficient method of image searching and retrieval has increased. It can simplify many tasks in many application areas such as biomedicine, forensics, artificial intelligence, military, education, web image searching. Most of the image retrieval systems present today are text-based, in which images are manually annotated by text-based keywords and when we query by a keyword, instead of looking into the contents of the image, this system matches the query to the keywords present in the database. This technique has its some disadvantages: a) Firstly, considering the huge collection of images present, its not feasible to manually annotate them. b) Secondly, the rich features present in an image cannot be described by keywords completely. These disadvantages of text-based image retrieval techniques call for another relatively new technique known as Content-Based Image Retrieval (CBIR). E.g.

CONTENT BASED IMAGE RETRIEVAL

Page 9

Fig 1.1 Multiple ways of describing an Image

DIGITAL IMAGE & its FEATURE VECTORS

A digital image is a representation of a two-dimensional image using ones and zeros (binary). Depending on whether or not the image resolution is fixed, it may be of vector or raster type. Without qualifications, the term "digital image" usually refers to raster images also called bitmap images. Raster images have a finite set of digital values, called picture elements or pixels. The digital image contains a fixed number of rows and columns of pixels. Pixels are the smallest individual element in an image, holding quantized values that represent the brightness of a given color at any specific point. Raster images can be created by a variety of input devices and techniques, such as digital cameras, scanners, coordinate-measuring machines, seismographic profiling, airborne radar, and more. They can also be synthesized from arbitrary non-image data,

CONTENT BASED IMAGE RETRIEVAL

Page 10

such as mathematical functions or three-dimensional geometric models; the latter being a major sub-area of computer graphics. The field of digital image processing is the study of algorithms for their transformation. Digital image processing is the use of computer algorithms to perform image processing on digital images. As a subcategory or field of digital signal processing, digital image 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 build-up of noise and signal distortion during processing. Since images are defined over two dimensions (perhaps more) digital image processing may be modeled in the form of Multidimensional Systems. Feature Vectors:In pattern recognition and machine learning, a feature vector is an n-dimensional vector of numerical features that represent some object. Many algorithms in machine learning require a numerical representation of objects, since such representations facilitate processing and statistical analysis. When representing images, the feature values might correspond to the pixels of an image, when representing texts perhaps to term occurrence frequencies. Some important feature vectors of the image are as follows: 1. Mean: Mean gives the overall distribution of the pixels gray level. 2. Variance: The variance is a measure of dispersion. It tells us something about the scatter of scores (here pixels) around the mean. It is defined as the mean squared deviation from the mean, and symbolized by a small sigma squared. Its formula is: Variance = x2= (X M) 2 /N Where X=Pixel value M=Mean of the Image N=Total number of pixel 3. Standard Deviation: The standard deviation is the square root of the variance and is Symbolized by a small Greek sigma - . Its formula is the square root of any of the formulae for the variance, e.g. x=(x)2/N

CONTENT BASED IMAGE RETRIEVAL

Page 11

4. Entropy: Entropy is a statistical measure of randomness that can be used to characterize the texture of the input image. 5. Texture: Texture is that innate property of all surfaces that describes visual patterns, each having properties of homogeneity. It contains important information about the structural arrangement of the surface, such as; clouds, leaves, bricks, fabric, etc. It also describes the relationship of the surface to the surrounding environment. In short, it is a feature that describes the distinctive physical composition of a surface. Texture properties include: Coarseness, Contrast, Directionality, Line-likeness, Regularity, and Roughness in the image. Texture is one of the most important defining features of an image. It is characterized by the spatial distribution of gray levels in a neighborhood. In order to capture the spatial dependence of gray-level values, which contribute to the perception of texture, a two-dimensional dependence texture analysis matrix is taken into consideration. This two-dimensional matrix is obtained by decoding the image file; jpeg, bmp, etc.

(c) Rocks (a) Clouds (b) Bricks Fig 1.2 Examples of Textures

CONTENT BASED IMAGE RETRIEVAL

Page 12

6. Color : One of the most important features that make possible the recognition of images by humans is color. Color is a property that depends on the reflection of light to the eye and the processing of that information in the brain. We use color every day to tell the difference between objects, places, and the time of day. Usually colors are defined in three dimensional color spaces. These could either be RGB (Red, Green, and Blue), HSV (Hue, Saturation, and Value) or HSB (Hue, Saturation, and Brightness). The last two are dependent on the human perception of hue, saturation, and brightness.

7. Shape : Shape may be defined as the characteristic surface configuration of an object; an outline or contour. It permits an object to be distinguished from its surroundings by its outline. Shape representations can be generally divided into two categories: Boundary-based, and Region-based.

Fig.1.3 Boundary-based & Region-based

CONTENT BASED IMAGE RETRIEVAL

Page 13

WAVELET
In Mathematics wavelet transform refers to the representation of a signal in terms of finite length or fast decaying oscillating waveform known as mother wavelet. Wavelet 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. Wavelet 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, wavelet analysis can often compress or de-noise a signal without appreciable degradation. Wavelet transforms are broadly divided into three classes: the continuous wavelet transform, the discretized wavelet transform and multi-resolution based wavelet transform. DWT is good for signal having high frequency components for short durations and low frequency components for long duration e.g. images. When a wavelet transform of the image is performed, a coefficient in a low sub-band can be thought of having four descendants in the next higher sub-band. The four descendants each have four descendants in the next higher sub-band. Discrete wavelet transform (DWT), transforms a discrete time signal to a discrete wavelet representation. A 2D wavelet transforms works as follows:

Fig.2.1Working of 2D Wavelet Transform

CONTENT BASED IMAGE RETRIEVAL

Page 14

WAVELET TRANSFORM Textures can be modeled as quasi-periodic patterns with spatial/frequency representation. The wavelet transform transforms the image into a multi-scale representation with both spatial and frequency characteristics. This allows for effective multi-scale image analysis with lower computational cost. According to this transformation, a function, which can represent an image, a curve, signal etc., can be described in terms of a coarse level description in addition to others with details that range from broad to narrow scales. Unlike the usage of sine functions to represent signals in Fourier transforms, in wavelet transform, we use functions known as wavelets. Wavelets are finite in time, yet the average value of a wavelet is zero. In a sense, a wavelet is a waveform that is bounded in both frequency and duration. While the Fourier transform converts a signal into a continuous series of sine waves, each of which is of constant frequency and amplitude and of infinite duration, most real-world signals (such as music or images) have a finite duration and abrupt changes in frequency. This account for the efficiency of wavelet transforms. This is because wavelet transforms convert a signal into a series of wavelets, which can be stored more efficiently due to finite time, and can be constructed with rough edges, thereby better approximating real-world signals.

Wavelet Decomposition:
Wavelets are functions defined over a finite interval and having an average value of zero. In wavelet decomposition, an image is decomposed into four components namely Approximate coefficients, Horizontal coefficients, Diagonal coefficients and Vertical coefficients.

Image
Approximate Coefficients (AC) Horizontal Coefficients (HC) Vertical Coefficients (VC) Diagonal Coefficients (DC)

AC

HC

DC

VC

Fig.2.2 Wavelet Decomposition of an image

CONTENT BASED IMAGE RETRIEVAL

Page 15

This kind of two-dimensional DWT leads to a decomposition of approximation coefficients at level j in four components: the approximation at level j+1, and the details in three orientations (horizontal, vertical, and diagonal).

Discrete Wavelet Transform In numerical analysis and functional analysis, a discrete wavelet transform (DWT) is any wavelet transform for which the wavelets are discretely sampled. As with other wavelet transforms, a key advantage it has over Fourier transforms is temporal resolution: it captures both frequency and location information (location in time).

Discrete Wavelet Transform

Fig.2.3 Discrete wavelet transform

CONTENT BASED IMAGE RETRIEVAL

Page 16

2-D DWT for Image

Fig.2.4 2-D DWT for Image

Fig.2.5 (A)

Fig.2.5 (B)

Fig.2.5(C)

CONTENT BASED IMAGE RETRIEVAL

Page 17

GABOR WAVELET In image processing, a Gabor filter, named after Dennis Gabor, is a linear filter used for edge detection. Frequency and orientation representations of Gabor filter are similar to those of human visual system, and it has been found to be particularly appropriate for texture representation and discrimination. In the spatial domain, a 2D Gabor filter is a Gaussian kernel function modulated by a sinusoidal plane wave. The Gabor filters are self-similar all filters can be generated from one mother wavelet by dilation and rotation. Its impulse response is defined by a harmonic function multiplied by a Gaussian function. Because of the multiplication-convolution property (Convolution theorem), the Fourier transform of a Gabor filter's impulse response is the convolution of the Fourier transform of the harmonic function and the Fourier transform of the Gaussian function. Gabor filter (or Gabor wavelet) is widely adopted to extract texture features from the images for image retrieval and has been shown to be very efficient. Manjunath and MA [5] have shown that image retrieval using Gabor features outperforms that using pyramid-structured wavelet transform(PWT) features, tree-structured wavelet transform (TWT)features and multiresolution simultaneous autoregressive model(MR-SAR) features. Basically, Gabor filters are a group of wavelets, with each wavelet capturing energy at a specific frequency and a specific direction. Expanding a signal using this basis provides a localized frequency description, therefore capturing local features/energy of the signal. Texture features can then be extracted from this group of energy distributions. The scale (frequency) and orientation tunable property of Gabor filter makes it especially useful for texture analysis.

CONTENT BASED IMAGE RETRIEVAL

Page 18

Gabor Filter Formula

The filter has a real and an imaginary component representing orthogonal directions. The two components may be formed into a complex number or used individually.

Real:

Imaginary:

Where

And

In this equation, :represents the wavelength of the sinusoidal factor. represents the orientation of the normal to the parallel stripes of a Gabor function. is the phase offset, is the sigma of the Gaussian envelope. is the spatial aspect ratio, and specifies the ellipticity of the support of the Gabor function.

CONTENT BASED IMAGE RETRIEVAL

Page 19

Fig.2.6 Demonstration of a Gabor filter applied to Chinese character. Four orientations are shown on the right 0, 45, 90 and 135. The original character picture and the superposition of all four orientations are shown on the left.

CONTENT BASED IMAGE RETRIEVAL

Page 20

Matlab Implementation of Gabor Filter functiongb=gabor_fn(sigma,theta,lambda,psi,gamma) sigma_x = sigma; sigma_y = sigma/gamma; % Bounding box nstds = 3; xmax = max(abs(nstds*sigma_x*cos(theta)),abs(nstds*sigma_y*sin(theta))); xmax = ceil(max(1,xmax)); ymax = max(abs(nstds*sigma_x*sin(theta)),abs(nstds*sigma_y*cos(theta))); ymax = ceil(max(1,ymax)); xmin = -xmax; ymin = -ymax; [x,y] = meshgrid(xmin:xmax,ymin:ymax); % Rotation x_theta=x*cos(theta)+y*sin(theta); y_theta=-x*sin(theta)+y*cos(theta); gb= 1/(2*pi*sigma_x *sigma_y) * exp(.5*(x_theta.^2/sigma_x^2+y_theta.^2/sigma_y^2)).*cos(2*pi/lambda*x_theta+psi)

CONTENT BASED IMAGE RETRIEVAL

Page 21

CONTENT BASED IMAGE RETRIEVAL

Page 22

Working of the project


CBIR provides the retrieval of the digital images similar to the query image from the large storage of the database according to their content. When user gives the query image Gabor transform is applied over the image. Features (Mean, Entropy & Standard Deviation) of the transformed are calculated. Next the query image is split into R, G and B plane. Features (Mean, Entropy & Standard Deviation) of each plane are calculated again. Query image is then transformed with discrete wavelet Transform (DWT) 1-level. Again, the features of the each component of transformed image are calculated. Now the same procedure is applied on each image of the database. The Feature Vector of the database images (Fd) is obtained. The Feature Vector of the query image (Fq) is obtained. Similarity measurement using Euclidean distance is done between the feature vectors of database & query image. Images whose distance is more than the predefined threshold is retrieved from the image database. The following diagram shows the working of the system.

CONTENT BASED IMAGE RETRIEVAL

Page 23

Fig.3.1 Overview of CBIR System

The diagram above describes the overview of the Content Based Image Retrieval (CBIR) system. Each block of the figure describes a particular process in the system. As shown in the figure all the feature vectors of the images are stored in the databases called as the feature database, the corresponding feature vectors of query image is extracted and it is compared with all the feature vectors stored in the database using a suitable similarity measurement technique and relevant images are retrieved on the basis of predefined threshold.

CONTENT BASED IMAGE RETRIEVAL

Page 24

CONTENT BASED IMAGE RETRIEVAL

Page 25

Fig.3.2 Flow Diagram of CBIR System

CONTENT BASED IMAGE RETRIEVAL

Page 26

CONTENT BASED IMAGE RETRIEVAL

Page 27

Methodology
Iterative Enhancement Model:
Iterative and Incremental development is a cyclic software development process developed in response to the weaknesses of the waterfall model. It starts with an initial planning and ends with deployment with the cyclic interaction in between.

Fig 4.1 Iterative Model Incremental development is a scheduling and staging strategy, in which the various parts of the system are developed at different times or rates, and integrated as they are completed. It does not imply, require nor preclude iterative development or waterfall development - both of those are rework strategies. The alternative to incremental development is to develop the entire system with big bang integration. Iterative development is a rework scheduling strategy in which time is set aside to revise and improve parts of the system. It does not presuppose incremental development, but works very well with it. A typical difference is that the output from an increment is not necessarily subject to further refinement, and its testing or user feedback is not used as input for revising the plans or specifications of the successive increments. On the contrary, the output from iteration is examined for modification, and especially for revising the targets of the successive iterations.

CONTENT BASED IMAGE RETRIEVAL

Page 28

Hardware and Software Requirement

For every successful project proper use of its resources is the major factor. For the success of software projects proper intelligent use of the available hardware and software is important.

Hardware Requirement:
Processor-Pentium IV RAM -512 MB or more. Hard Disk of 40 GB Monitor

Software Requirement:
Matlab 9.0

CONTENT BASED IMAGE RETRIEVAL

Page 29

Gantt Chart

Project development Step August September October November December January

Requirement & specification Analysis & Research

Coding

System Testing

Writing Manual
Planed Duration Actual Duration

Fig.4.2 Gantt chart

The above Gantt chart shows the development life cycle of the proposed system. It shows the allotted time for each phase of the cycle and the actual time taken to go through a phase.

CONTENT BASED IMAGE RETRIEVAL

Page 30

CONTENT BASED IMAGE RETRIEVAL

Page 31

Matlab
MATLAB is a high-performance language for technical computing. It integrates computation, visualization, and programming in an easy-to-use environment where problems and solutions are expressed in familiar mathematical notation. 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. The MATLAB system consists of five main parts: Development Environment: -This is the set of tools and facilities that help you use MATLAB functions and files. The MATLAB Mathematical Function Library:- This is a vast collection of computational algorithms ranging from elementary functions to more sophisticated functions. The MATLAB Language:-This is a high-level matrix/array language with control flow statements, functions, data structures, input/output, and object-oriented programming features. Graphics: - MATLAB has extensive facilities for displaying vectors and matrices as graphs, as well as annotating and printing these graphs. It includes high-level and low-level functions. The MATLAB Application Program Interface (API):- This is a library that allows you to write C and FORTRAN programs that interact with MATLAB.

CONTENT BASED IMAGE RETRIEVAL

Page 32

To work with MATLAB implementations on several different computer systems, or need to transmit MATLAB applications to users on other systems. MATLAB applications consist of Mfiles containing functions and scripts, and MAT-files containing binary data. Both types of files can be transported directly between machines: M-files because they are platform independent and MAT-files because they contain a machine signature in the file header. MATLAB checks the signature when it loads a file and, if a signature indicates that a file is foreign, performs the necessary conversion.

CONTENT BASED IMAGE RETRIEVAL

Page 33

CONTENT BASED IMAGE RETRIEVAL

Page 34

Query Image

Fig.6.1 Query Image

Fetched Image

Fig.6.2 Fetched Image

CONTENT BASED IMAGE RETRIEVAL

Page 35

Query Image

Fig.6.3 Query Image

Fetched Image

Fig.6.4 Fetched Image


CONTENT BASED IMAGE RETRIEVAL Page 36

CONTENT BASED IMAGE RETRIEVAL

Page 37

Testing
Software Testing is a process of evaluating a system. by manual or automatic means verify that the system satisfies the specified requirement identify differences between expected and actual results

Testing analyzes a program with the intent of finding problems and errors that measures system functionality and quality. Testing includes inspection and structured peer reviews of requirement and design, as well as execution test of code. The code developed during coding activity is likely to have some requirement errors and design errors in addition to the errors introduced during the coding activity. Testing perform a very critical role for quality assurance and for ensuring the reliability of software. The system must be tested to evaluate the actual system functionality.

The two basic approaches to testing are: Black Box or Functional Testing. White Box or Structural Testing.

White Box Testing: White Box Testing is related with structure of the program. To test the logic of the program various test cases are design which takes care of following: o Every statement in the program is examined at least once. o Every path in the program is executed at least once. o Every logical decision is executed on their true or false side. o Execute all their loops all their boundaries and within operational boundaries. o Execute internal data structure and formulae to ensure their validity. o This type of testing is performed by Developers.

CONTENT BASED IMAGE RETRIEVAL

Page 38

White box testing for the system is performed as follows: Module wise Unit Testing is done. All the matlab functions are cross-examined and tested. And if any error occurs an appropriate message is thrown.

Black Box Testing:


o BBT is related with input and output and not related with internal structure of the program. o In BBT it is checked if some input is given than whether specific output is produce by the program or not. o The various sets of input test cases are prepared and applied on a program corresponding output are verified. o This type of testing is done Test Engineers.

Five-five images of each category are tested at threshold 20 and the result is summarized in the following tables with their average. In information retrieval contexts, precision and recall are defined in terms of a set of retrieved documents (e.g. the list of documents produced by a web search engine for a query) and a set of relevant documents (e.g. the list of all documents on the internet that are relevant for a certain topic).

Precision:
In the field of information retrieval, precision is the fraction of retrieved documents that are relevant to the search:

CONTENT BASED IMAGE RETRIEVAL

Page 39

Recall:
Recall in Information Retrieval is the fraction of the documents that are relevant to the query that are successfully retrieved.

Precision can be seen as a measure of exactness or fidelity, whereas recall is a measure of completeness.

Fig.5.1 Four Possible Outcomes of the CBIR Experiment

The following tables show the Precision and Recall for each category of the images.

CONTENT BASED IMAGE RETRIEVAL

Page 40

Test case 1: With RGB program

Category Image Name 1.jpg 3.jpg 25.jpg 44.jpg 39.jpg Average

Bus Precision 1.00 1.00 0.69 0.50 0.67 0.772

Recall 0.22 0.08 0.185 0.06 0.12 0.2664

Precision Percentage 100% 100% 69% 50% 67% 77.2%

Recall Percentage 22% 8% 8% 6% 12% 26.64%

Table 5.1.1 Precision & Recall of Bus category

Category Dinosaur Image Name Precision 51.jpg 54.jpg 56.jpg 94.jpg 95.jpg Average 1.00 1.00 1.00 1.00 1.00 1.00

Recall 0.58 0.44 0.50 0.18 0.12 0.364

Precision Percentage 100% 100% 100% 100% 100% 100%

Recall Percentage 58% 44% 50% 18% 12% 36.4%

Table 5.1.2 Precision & Recall of Dinosaur category

CONTENT BASED IMAGE RETRIEVAL

Page 41

Category Image Name 143.jpg 141.jpg 131.jpg 135.jpg 120.jpg Average

Beach Precision 0.5 1.00 0.67 0.75 0.36 0.656

Recall 0.06 0.08 0.08 0.06 0.10 0.076

Precision Percentage 50% 100% 67% 75% 36% 65.6

Recall Percentage 6% 8% 8% 6% 10% 7.6

Table 5.1.3 Precision & Recall of Beach category

Category Image Name 151.jpg 155.jpg 157.jpg 164.jpg 186.jpg Average

Rose Precision 1.00 1.00 0.60 1.00 1.00 0.92

Recall 0.10 0.08 0.06 0.06 0.08 0.076

Precision Percentage 100% 100% 60% 100% 100% 92%

Recall Percentage 10% 8% 6% 6% 8% 7.6%

Table 5.1.4 Precision & Recall of Rose category

CONTENT BASED IMAGE RETRIEVAL

Page 42

Category Image Name 203.jpg 207.jpg 209.jpg 212.jpg 240.jpg Average

Horse Precision 1.00 1.00 1.00 1.00 1.00 1.00

Recall 0.20 0..18 0.20 0.06 0.04 0.136

Precision Percentage 100% 100% 100% 100% 100% 100%

Recall Percentage 20% 18% 20% 6% 4% 13.6%

Table 5.1.5 Precision & Recall of Horse category

Category Image Name 251.jpg 253.jpg 258.jpg 263.jpg 270.jpg Average

Elephant Precision 0.45 1.00 0.75 0.5625 0.714 0.6953

Recall 0.10 0.06 0.06 0.18 0.10 0.10

Precision Percentage 45% 100% 75% 56.25% 71.4% 69.53%

Recall Percentage 10% 6% 6% 18% 10% 10%

Table 5.1.6 Precision & Recall of Elephant category

CONTENT BASED IMAGE RETRIEVAL

Page 43

Category Image Name 301.jpg 303.jpg 306.jpg 320.jpg 335.jpg Average

Mountain Precision Recall 1.00 0.60 0.50 0.714 1.00 0.7628 0.04 0.12 0.04 0.10 0.04 0.068

Precision Percentage 100% 60% 50% 71.4% 100% 76.28%

Recall Percentage 4% 12% 4% 10% 4% 6.8%

Table 5.1.7 Precision & Recall of Mountain category

Category Image Name 351.jpg 353.jpg 355.jpg 360.jpg 378.jpg Average

Precision 0.40 0.7333 0.4444 0.76 1.00 0.6675

Taj Mahal Recall Precision Percentage 0.04 40% 0.22 73.33% 0.28 44.44% 0.38 76% 0.10 100% 0.204 66.75%

Recall Percentage 4% 22% 28% 38% 10% 204%

Table 5.1.8 Precision & Recall of Taj category

CONTENT BASED IMAGE RETRIEVAL

Page 44

Test case 2: With DWT & RGB program

Category Image Name 1.jpg 3.jpg 25.jpg 44.jpg 39.jpg Average

Precision 1.00 1.00 0.75 1.00 0.66 0.882

Bus Recall 0.22 0.06 0.18 0.06 0.12 0.128

Precision Percentage 100% 100% 75% 100% 66% 88.2%

Recall Percentage 22% 6% 18% 6% 12% 12.8%

Table 5.2.1 Precision & Recall of Bus category

Category Image Name 51.jpg 54.jpg 56.jpg 94.jpg 95.jpg Average

Precision 1.00 1.00 1.00 1.00 1.00 1.00

Dinosaur Recall 0.56 0.44 0.44 0.18 0.12 0.348

Precision Percentage 100% 100% 100% 100% 100% 100%

Recall Percentage 56% 44% 44% 18% 12% 34.8%

Table 5.2.2 Precision & Recall of Dinosaur category

CONTENT BASED IMAGE RETRIEVAL

Page 45

Category Image Name 143.jpg 141.jpg 131.jpg 135.jpg 120.jpg Average

Precision 1.00 1.00 0.75 1.00 0.307 0.8114

Beach Recall 0.06 0.08 0.06 0.06 0.08 0.068

Precision Percentage 100% 100% 75% 100% 30.7% 81.14%

Recall Percentage 6% 8% 6% 6% 8% 6.8%

Table 5.2.3 Precision & Recall of Beach category

Category Image Name 151.jpg 155.jpg 157.jpg 164.jpg 186.jpg Average

Precision 1.00 1.00 0.75 1.00 0.80 0.91

Rose Recall 0.02 0.08 0.06 0.06 0.08 0.078

Precision Percentage 100% 100% 75% 100% 80% 91%

Recall Percentage 2% 8% 6% 6% 8% 7.8%

Table 5.2.4 Precision & Recall of Rose category

CONTENT BASED IMAGE RETRIEVAL

Page 46

Category Image Name Precision 203.jpg 207.jpg 209.jpg 212.jpg 240.jpg Average 1.00 1.00 1.00 1.00 1.00 1.00

Horse Recall 0.16 0.16 0.20 0.06 0.04 0.124

Precision Percentage 100% 100% 100% 100% 100% 100%

Recall Percentage 16% 16% 20% 6% 4% 12.4%

Table 5.2.5 Precision & Recall of Horse category

Category Image Name 251.jpg 253.jpg 258.jpg 263.jpg 270.jpg Average

Elephant Precision Recall 0.44 1.00 1.00 0.5625 1.00 0.8005 0.08 0.06 0.06 0.18 0.01 0.078

Precision Percentage 44% 100% 100% 56.25% 100% 80.05

Recall Percentage 8% 6% 6% 18% 1% 7.8

Table 5.2.6 Precision & Recall of Elephant category

CONTENT BASED IMAGE RETRIEVAL

Page 47

Category Image Name 301.jpg 303.jpg 306.jpg 320.jpg 335.jpg Average

Mountain Precision Recall 1.00 1.00 1.00 1.00 1.00 1.00 0.04 0.12 0.04 0.08 0.04 0.064

Precision Percentage 100% 100% 100% 100% 100% 100%

Recall Percentage 4% 12% 4% 8% 4% 6.4%

Table 5.2.7 Precision & Recall of Mountain category

Category Image Name 353.jpg 351.jpg 355.jpg 360.jpg 378.jpg Average

Taj Mahal Precision 0.733 0.50 0.666 0.76 1.00 0.7318

Recall 0.289 0.05 0.368 0.50 0.131 0.2676

Precision Percentage 73.3% 50% 66.6% 76% 100% 73.18%

Recall Percentage 28.9% 5% 36.8% 50% 13.1% 26.76%

Table 5.2.8 Precision & Recall of Taj Mahal category

CONTENT BASED IMAGE RETRIEVAL

Page 48

Test case 3: With Gabor+DWT+RGB program

Category Image Name 1.jpg 3.jpg 25.jpg 44.jpg 39.jpg Average

Precision 1.00 1.00 0.75 1.00 0.67 0.884

Bus Recall 0.22 0.08 0.18 0.06 0.06 0.12

Precision Percentage 100% 100% 75% 100% 67% 88.4%

Recall Percentage 22% 8% 18% 6% 6% 12%

Table 5.3.1 Precision & Recall of Bus category

Category Image Name 51.jpg 54.jpg 56.jpg 94.jpg 95.jpg Average

Precision 1.00 1.00 1.00 1.00 1.00 1.00

Dinosaur Recall Precision Percentage 0.56 0.44 0.44 0.18 0.12 0.348 100% 100% 100% 100% 100% 100%

Recall Percentage 56% 44% 44% 18% 12% 38.4%

Table 5.3.2 Precision & Recall of Dinosaur category

CONTENT BASED IMAGE RETRIEVAL

Page 49

Category Image Name 143.jpg 141.jpg 131.jpg 135.jpg 120.jpg Average

Precision 1.00 1.00 0.75 1.00 0.367 0.81152

Beach Recall Precision Percentage 0.06 100% 0.08 100% 0.06 75% 0.06 100% 0.08 30.76% 0.068 81.152%

Recall Percentage 6% 8% 6% 6% 8% 6.8%

Table 5.3.3 Precision & Recall of Beach category

Category Image Name 151.jpg 155.jpg 157.jpg 164.jpg 186.jpg Average

Precision 1.00 1.00 0.75 1.00 1.00 0.95

Rose Recall 0.10 0.08 0.06 0.06 0.08 0.076

Precision Percentage 100% 100% 75% 100% 100% 95%

Recall Percentage 10% 8% 6% 6% 8% 7.6%

Table 5.3.4 Precision & Recall of Rose category

CONTENT BASED IMAGE RETRIEVAL

Page 50

Category Image Name 203.jpg 207.jpg 209.jpg 212.jpg 240.jpg Average

Precision 1.00 1.00 1.00 1.00 1.00 1.00

Horse Recall 0.16 0.16 0.20 0.06 0.04 0.124

Precision Percentage 100% 100% 100% 100% 100% 100%

Recall Percentage 16% 16% 20% 6% 4% 12.4%

Table 5.3.5 Precision & Recall of Horse category

Category Image Name 251.jpg 253.jpg 258.jpg 263.jpg 270.jpg Average

Precision 0.4444 1.00 1.00 0.5333 1.00 0.7955

Elephant Recall 0.08 0.06 0.06 0.16 0.10 0.092

Precision Percentage 44.44% 100% 100% 53.33% 100% 79.55%

Recall Percentage 8% 6% 6% 16% 10% 9.2%

Table 5.3.6 Precision & Recall of Elephant category

CONTENT BASED IMAGE RETRIEVAL

Page 51

Category Image Name 301.jpg 303.jpg 306.jpg 320.jpg 335.jpg Average

Precision 1.00 1.00 1.00 1.00 1.00 1.00

Mountain Recall Precision Percentage 0.04 100% 0.12 100% 0.04 100% 0.08 100% 0.04 100% 0.068 100%

Recall Percentage 4% 12% 4% 8% 4% 6.4%

Table 5.3.7 Precision & Recall of Mountain category

Category Image Name 353.jpg 351.jpg 355.jpg 360.jpg 378.jpg Average

Taj Mahal Precision Recall 0.733 0.50 0.666 0.76 1.00 0.7318 0.289 0.05 0.368 0.50 0.131 0.2676

Precision Percentage 73.3% 50% 66.6% 76% 100% 73.18%

Recall Percentage 28.9% 5% 36.8% 50% 13.1% 26.76%

Table 5.3.8 Precision & Recall of Taj Mahal category

CONTENT BASED IMAGE RETRIEVAL

Page 52

The following chart shows the average Precision vs. Recall for each category based on the above table.

Chart 5.2.1 Using RGB program

Chart 5.2.2 Using DWT + RGB

CONTENT BASED IMAGE RETRIEVAL

Page 53

Chart 5.2.3 Using GABOR+DWT+RGB

After detail analysis of above charts a conclusion can be drawn that the precision value is more for Gabor Wavelet that the system responded well for Gabor wavelet as compared to the other two methods.

CONTENT BASED IMAGE RETRIEVAL

Page 54

CONTENT BASED IMAGE RETRIEVAL

Page 55

Cost Estimation
Introduction:
Also known as the Economic Feasibility. For a given set of requirements it is desirable to know how much it will cost to develop the software to satisfy the given requirements, and how much time does it take to develop. These estimates are needed before development is initialized. The primary reason for cost and schedule estimation is to enable the client or developer to perform a cost benefit analysis and for project monitoring and control. Cost in a project is due to the requirements of Hardware, Software, and Human Resources. o Hardware resources, like computer time, memory required. o Software resources include tools and compilers during development. o The bulk of the cost of software development is due to the human resources needed. Factors that affect the cost are: o Size of the project o Complexity of the project o Reliability of the project o Programmers ability o Experience of the developers in this area.

Cost Estimation Using Model:


The cost of the project can be estimated using Constructive Cost Model (COCOMO) developed by Bochm. The basic steps in this model are:A] Obtain an initial estimate of the development effort from the estimate of thousand of delivered lines of source code (KDLOC). Initial estimate also known as the nominal estimate is
CONTENT BASED IMAGE RETRIEVAL Page 56

determined by an equation where KDLOC is used to measure size. To determine the initial effort Ei in Person-Month the equation is: Ei = a * (KDLOC) b, value of a and b depends on the project type COCOMO projects are categorized into three types: i. ii. Organic: Suitable for organization that has considerable experience and requirements Semidetached: Examples of this type are developing new database management system. iii. Embedded: Organization has little experience and stringent requirements.

The value a and b according to Organic System is a = 3.2 and b = 1.05

The project will fall in the organic category.

The size of the different modules and the overall system are estimated to be:

Total Line of Code (LOC) =353

Ei = a * (KDLOC) b = 3.2 * 3.53 * 1.05 = 11.86PM B]Determine a set of 15 multiplying factors from different attributes of the project.

There are 15 different attributes called cost driver attribute that determine the multiplying factors. These factors depends on product, computer, personnel and technology attributes (called project attributes) Eg: of the attribute are required software reliability (RELY), product complexity (CPLX), analyst capability (ACAP) application experience development schedule (SCHD).

CONTENT BASED IMAGE RETRIEVAL

Page 57

Ratings

Cost Drivers
Product attributes Required software reliability Size of application database Complexity of the product Hardware attributes Run-time performance constraints Memory constraints Volatility of the virtual machine environment Required turnabout time Personnel attributes Analyst capability Applications experience Software engineer capability Virtual machine experience Programming language experience Project attributes Use of software tools Application of software engineering methods Required development schedule

Very Very Extra Low Low Nominal High High High 0.75 0.70 0.88 0.94 0.85 1.00 1.00 1.00 1.00 1.00 0.87 0.87 1.46 1.29 1.42 1.21 1.14 1.24 1.24 1.23 1.19 1.13 1.17 1.10 1.07 1.10 1.10 1.08 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.15 1.08 1.15 1.11 1.06 1.15 1.07 0.86 0.91 0.86 0.90 0.95 0.91 0.91 1.04 0.82 0.83 1.10 1.40 1.16 1.30 1.30 1.21 1.30 1.15 0.71 0.82 0.70 1.65 1.66 1.56

CONTENT BASED IMAGE RETRIEVAL

Page 58

The multiplying factors for all 15 cost drivers are multiplied to get the effort adjustment factors (EAF): EAF = 1.15 * 1.00 * 1.00 * 1.30 * 1.21 * 1.15 * 1.07 * 1.00 * 1.00 * 1.00 * 1.00 * 1.00 * 1.00 * 1.00 * 1.08 = 2.4040 C] Adjust the effort estimate by multiplying the initial estimate with all the multiplying factors. The Final effort estimate E, is obtained by multiplying the initial estimate by the EAF. E = EAF * Ei Using the EAF the adjusted effort estimate is E = 2.4040 * 11.86= 28.51Person- Month = 29PM (approx.) We take the assumption each person charges 1000 rupees per day. Total Estimation: 1000 * 29 = Rs. 29,000.

CONTENT BASED IMAGE RETRIEVAL

Page 59

CONTENT BASED IMAGE RETRIEVAL

Page 60

Limitation of the System


Image analysis is very memory-intensive, so the program will run faster and more effectively on machines with more RAM available. Doesnt work on shapes. Threshold values need to be adjusted for images belonging to different category. Doesnt do object recognition.

Future Enhancements
Can be enhanced to include shape parameter. The project can be enhanced to recognize objects in the images. The project can be implemented for a huge database.

CONTENT BASED IMAGE RETRIEVAL

Page 61

CONTENT BASED IMAGE RETRIEVAL

Page 62

Conclusion
The database selected for CBIR experiments although it includes different categories of images but each category has almost similar images with similar background. In this project database includes 388 images having eight categories. Each of these eight categories includes variety of different images with different colors, shapes, textures and different backgrounds of its own type. A conclusion can be drawn that Gabor wavelet has provided a better result as compared to other two algorithms. Also even though the database is having variety of images still the system is performing better in terms of precision for all the approaches.

CONTENT BASED IMAGE RETRIEVAL

Page 63

CONTENT BASED IMAGE RETRIEVAL

Page 64

Appendix: List of figure:


Fig 1.1 Multiple ways of displaying Image Fig 1.2 Examples of Textures Fig.1.3 Boundary-based & Region-based Fig.2.1Working of 2D Wavelet Transform Fig.2.2 Wavelet Decomposition of an image Fig.2.3 Discrete wavelet transform Fig.2.4 2-D DWT for Image Fig.2.5 (A) Original Image Fig.2.5 (B) 1Level Discrete Wavelet Transform Fig.2.5(C) 2 Level Discrete Wavelet Transform Fig.2.6 Demonstration of a Gabor filter applied to Chinese character. Four orientations are shown on the right 0, 45, 90 and 135. The original character picture and the superposition of all four orientations are shown on the left. Fig.3.1 Overview of CBIR System Fig.3.2 Flow Diagram of the System Fig 4.1 Iterative Model Fig.4.2 Gantt chart Fig.5.1 Four Possible Outcomes of the CBIR Experiment Fig.6.1 Query Image Fig.6.2 Fetched Image Fig.6.3 Query Image
CONTENT BASED IMAGE RETRIEVAL Page 65

Fig.6.4 Fetched Image

List of Charts:
Chart 5.2.1 Using RGB program Chart 5.2.2 Using DWT + RGB Chart 5.2.3 Using GABOR+DWT+RGB

List of Tables:
Table 5.1.1 Precision & Recall of Bus category Table 5.1.2 Precision & Recall of Dinosaur category Table 5.1.3 Precision & Recall of Beach category Table 5.1.4 Precision & Recall of Rose category Table 5.1.5 Precision & Recall of Horse category Table 5.1.6 Precision & Recall of Elephant category Table 5.1.7 Precision & Recall of Mountain category Table 5.1.8 Precision & Recall of Taj category Table 5.2.1 Precision & Recall of Bus category Table 5.2.2 Precision & Recall of Dinosaur category Table 5.2.3 Precision & Recall of Beach category Table 5.2.4 Precision & Recall of Rose category Table 5.2.5 Precision & Recall of Horse category Table 5.2.6 Precision & Recall of Elephant category Table 5.2.7 Precision & Recall of Mountain category Table 5.2.8 Precision & Recall of Taj Mahal category Table 5.3.1 Precision & Recall of Bus category
CONTENT BASED IMAGE RETRIEVAL Page 66

Table 5.3.2 Precision & Recall of Dinosaur category Table 5.3.3 Precision & Recall of Beach category Table 5.3.4 Precision & Recall of Rose category Table 5.3.5 Precision & Recall of Horse category Table 5.3.6 Precision & Recall of Elephant category Table 5.3.7 Precision & Recall of Mountain category Table 5.3.8 Precision & Recall of Taj Mahal category

CONTENT BASED IMAGE RETRIEVAL

Page 67

CONTENT BASED IMAGE RETRIEVAL

Page 68

Bibliography
Gonsavles R.C. and Woods R.E.: Digital Image Processing, Addison Wesely, 1993. http://www.wikipedia.com/ CBIR Using Kekres Transform over Row column Mean and Variance Vectors by Dr. H. B. Kekre Kavita Sonavane

CONTENT BASED IMAGE RETRIEVAL

Page 69

You might also like