Giter Club home page Giter Club logo

cbir's Introduction

Content Based Image Retreival System

Brief:

It is basically a simple image search engine, which retreives the similar images from the database on the basis of comparison between their features.Two different methods have been implemented for this purpose--

1.Color Histogram method which compares images on the basis of color similarity between them.Color histogram of 8X12X3 bins is used.As a result each image is represented as 288 floating point numbers,further each image has been divided into five segments for localization.So per image we are storing 5 X 288 numbers.These features are then stored in a CSV file for future matching

2.ORB feature detection algorithm which matches on the basis of distance between the keypoints. The ORB algo returns the keypoints and their descriptors for the image provided.These descriptors are stored in the Mysql database as BLOB's.For matching the descriptors for query image and database images are passed to the function one by one.The function returns the distance matrix.Here i have taken the sum of these distances and stored them in a dictionary(per image).Then the top results are displayed.

Technologies used:

  • Python 2.7
  • OpenCv 3.0 for Image processing
  • Numpy for mathematical calculations
  • Tkinter for GUI
  • Mysql Database
  • Other python libraries like Mysqldb,Pickle etc

Usage:

  • Install all the requirements as stated above.Project is in my_contrib folder.
  • change the paths and database table name,fields in the files index.py,search.py,save_data.py and search_img.py
  • Run the main.py script
  • Select the method from dropdown provided
  • Enter the path of CSV file for indexing in case of color histogram and folder path as required, it can be made dynamic as required,i have,however fixed the paths.
  • finally enter one of the image in the dataset as query image(full name)
  • click on search to find the similar images

Results:

For images which have been either cropped,rotated or blurred , but are similar on the basis of their content ,ORB gives good result.But for images which are similar in color content,Color Histogram is good.It depends upon the scenerio.

Bugs:

1. There is some problem with tkinter and opencv imshow, as after displaying the results the tkinter window has to be forced close every time

2. The accuracy of ORB needs to be improved

For further queries and improvement drop a mail on [email protected]

cbir's People

Contributors

farhan-cashify avatar farhan0581 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.