Archive for Documentation

Build instructions for the net.imgseek.imgdb module

The net.imgseek.imgdb source module implements the core image similarity engine behind isk-daemon (server-side version) and imgSeek (desktop version). It may need to be manually built for isk-daemon to support your current environment.

Essentially, it compiles into the _imgdb.pyd (Windows) or imgdb.so (Unix) dynamic libraries which should be found on the imgSeekLib directory of both isk-daemon and imgSeek.

Requirements

  • Subversion client (for getting the latest source code)
  • Python and its development package.
  • A C++ compiler and development libraries: on Unix systems g++ and for Windows systems MSVC++ Express or cygwin.
  • ImageMagick libraries and development headers for C++.
    • On a Linux system that means the following packages:
      • imagemagick
      • libmagick++9-dev
      • libmagick9-dev
      • libmagick++9c2a
      • libmagick9
    • On a Windows system the binary release for ImageMagick provides both the dynamic link libraries and development headers.

First, get the source code for the Subversion repository:

$ svn checkout https://imgseek.svn.sourceforge.net/svnroot/imgseek/trunk/net.imgseek.imgdb

Building under Linux or Cygwin

Inside the checked out module there is a src/net/imgseek/imgdb/core directory. From inside it, invoke the build script:

$ python build-python.py build

If all goes well you should find the newly compiled _imgdb.so library somewhere deep under the build directory. The resulting dynamic libraries (imgdb.so/pyd) should then replace the original version from the official isk-daemon distribution (located inside the imgSeekLib dir).

Sometimes the .so library is created without a leading underscore. If starting isk-daemon doesn’t work, try renaming the .so file and prefix it with an underscore so it looks like “_imgdb.so”. The error message in this case looks like this:

 File “/isk-daemon-0.6.2/imgSeekLib/ImageDB.py”, line 38, in ?
import imgdb
ImportError: dynamic module does not define init function (initimgdb)

Building under Windows

Inside the checked out module there is a imgdb-msvc directory. Inside this directory you can find a Microsoft Visual C++ Express (free download from MS) solution file.

Open and build it. You may need to setup linking options (additional library dirs) to tell MSVC where to find the ImageMagick and Pythons libraries and development headers.

Please use one of the mailing lists if you run into any trouble.

Comments

Compiling

The isk-daemon package doesn’t need to be compiled since it’s all made up of python code.

What needs to be compiled is the net.imgseek.imgdb module, and here are some instructions.

Requirements

  • Linux: isk-daemon compiles agains ImageMagick and Python, so these are the packages you should have installed on the test machine:
  • python 2.5
  • pytho-dev 2.5
  • libmagick
  • libmagick++
  • libmagic-dev
  • gcc
  • g++
  • Windows: The following must be installed:

Instructions

Linux: Compile running the command “python setup.py compile

Windows: Open the imgdb solution under the imgdb-msvc and compile it. You may need to adjust the include and libraries dir for the solution to point to the correct locations of Python, Java (if you want the Java bindings) and ImageMagick.

Comments

Technical details for the visual image similarity engine and algorithms

Visual image similarity considers the basic shape and color information of the query when looking through the database for potential matches.

isk-daemon uses wavelet algorithms, metric and query ideas based on the paper “Fast Multiresolution Image Querying” by Charles E. Jacobs, Adam Finkelstein and David H. Salesin.

The core image similarity algorithm uses a multi-resolution wavelet decomposition approach for solving the problem of determining the top-k similar images to a target among a pre-indexed database. Among some of it’s advantages, this approach allows queries to be specified at any resolution (possibly different from that of the target); moreover, the running time and storage of our method are independent of the resolutions of the database images.

The signature information for each image computed by isk-daemon can be extracted from a wavelet-compressed version of the image directly, allowing the signature database to be created conveniently from a set of compressed (low-resolution) images.

Why using wavelets: Wavelet decompositions allow for very good image approximation with just a few coefficients. As such, this property has been exploited for lossy image compression. Typically, in these schemes, just the wavelet coefficients with the largest magnitude are used. Wavelet decompositions can be used to extract and encode edge information. When doing query-by-sketches, edges from user drawn strokes are likely to be among the key features. The coefficients of a wavelet decomposition provide information that is independent of the original image resolution. Thus, a wavelet-based scheme allows the resolutions of the query and the target to be effectively decoupled. Wavelet decompositions are fast and easy to compute, requiring linear time in the size of the image and very little code. See more scalability details.

Comments

Changelog

Version 0.6 - Released 21/July/2007

  1. Support for keyword management:
    1. Keywords could be used to identify users so isk-daemon can keep track of which images belongs to which user. This way you can do keyword-related queries on isk-daemon in order to query for similar images inside a user’s collection.
    2. Keywords can be interpreted as being just set identifiers, so in a sense this allows your application to tell isk-daemon which sets an image belongs to.
    3. These ids may be generated by hashing text-based keywords from an existing keyword oriented image management system.
    4. Only keyword ids (integers) are stored on isk-daemon
  2. More example Java, PHP and Python client libraries.
  3. Improved web admin interface.
  4. Internal support for multiple image database spaces so image databases can be segmented into partitions (also called database spaces) and persisted to different data files or a single file for all database spaces.
  5. Trial and Full versions are now delivered on the same build. Full version users must enter a valid license key on the settings.py file. Existing full version users will receive a valid key.
  6. Many bug fixes.
  7. Indexed image can be associated with keywords and new search methods are available for using keywords to narrow down the visual similarity search space.
  8. Memory leaks fixed.

Version 0.6.1 - Released 7/Aug/2007

  1. Windows version is now linked against the latest ImageMagick release.

Version 0.6.2 - Released 30/Aug/2007

  1. All trial restrictions removed.
  2. Released as opensource (GPL).
  3. File packages now hosted on SourceForge.net
  4. SF.net bug tracker is now used

Comments

Browse Flickr images by similarity

Demonstration of how isk-daemon technology can be used for searching for similar Flickr interesting images.

On a near future this example application will also be capable of suggesting images Flickr users may be interested on based on common visual aspects of their favorite photos.

Comments (2)

« Previous entries