Archive for Development

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