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.
- On a Linux system that means the following packages:
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.