When starting imgSeek, all I get is: "Warning: Unable to load the C++ extension "imgdb.so" module. Make sure ...
If the above message followed an error message complaining about undefined symbols, like this one:
> ImportError: /usr/lib/python2.2/site-packages/imgSeekLib/imgdb.so: undefined
> symbol: _ZNSt24__default_alloc_templateILb1ELi0EE8allocateEj
It means that there was a linking problem with imgdb.so <-> QT libraries. This was probably caused by mismatching gcc versions (the one you have installed and used to build this imgSeek module and the one your distribution used to build the QT you installed from their RPM or DEB).
Since imgSeek 0.6.4, where qt development files and static libs are no longer mandatory, you should (and I recommend) install ImageMagick development files and libs (ImageMagick-devel package) before installing imgSeek. The setup.py script will use ImageMagick instead of QT if the first is detected. I believe (and hope) ImageMagick should give users less compile and linking problems. But anyway, if you still have similar (undefined symbols) errors, you may try installing ImageMagick-devel from the source rpm or install it from official sources.
If you still have problems installing or running, please carefully read the instructions and requirements.
I get an error when exiting: Fatal Python error: PyEval_RestoreThread: NULL tstate
This is a known bug with some versions of QT and it's python bindings. Check this thread.
The metadata editor ignores or refuses to save comments with extended characters on my locale.
Python by default won't set it's internal string encoding to your local encoding, so you need to change
/usr/lib/python2.x/site.py. Search this file for
"enconding =" and change the line below it from "
if 0:" to "
if 1:". Restart imgSeek. If the problem persists, file a bug report with more details.
More details can be found here
I have an nvidia card and I get the following error: "ImportError: libnvidia-tls.so.1: cannot handle TLS data"
Just remove (or rename) the directory /usr/lib/tls, all will work.
I get an error when running on a Mandrake system: "ImportError: No module named libsip"
Take a look at this thread. Also, make sure you have "libsip9-devel" installed.
How do I run a similarity match on only the images in a some directory (and its subdirectories)?
Right now you can't. When you double click thumbnails, import query target images or draw a sketch, imgSeek will seek your entire collection.
If you mean "find duplicate images", then you can add the desired dirs to a work batch, and choose this batch on the first step of the wizard on the duplicate image tool.
How do I do a similarity search which returns only matches that are NOT in the same image set?
Once again, you can't :(
If you mean *restricting the domain* of images searched (therefore cutting down the query time required on huge databases):
Adding that feature would mean redesigning part of the c++ module optimized for speed, because on the current implementation it has no idea about directory structure.
If you mean only *filtering* results (but with the underlying image database engine still scanning all image fingerprints), it could be easily done with some high level python code, perhaps on a next release.
Why Qt and PyQt ?
Many (I used to) have the feeling that Qt and PyQt are huge and add a lot of complex dependencies to any software using it, but these are the features in QT 3.x that helped me *A LOT* when developing imgSeek:
- image processing classes and functions not found on any other GUI toolkit. That is, QT is used to load various image formats, scale them down to 128x128 (necessary when calculating the wavelet transform) and generating thumbnails. Rotating images when displaying. Exporting images to other formats.
- advanced widgets (table widget where a cell can be another widget), advanced tree widget, advanced gui layout and tab widgets.
- multithread support
- excellent GUI editor (qt designer) for rapid gui development
- on top of the great QT 3.x features, there is PyQt, which brings all these features to python programs.
Another imgSeek requirement is that image processing (including the extraction of raw pixel data from the many image formats available) is done in a fast way. On imgSeek < 0.3, there was no C++ extension module. All image processing and loading was done in pure python. That made imgSeek *extremelly* slow. Populating a database of 2000 images with no C++ extension module would take more than 20 minutes, while on 0.6.4 you can do that on less than 5 min.
How do I install PyQt ?
You should first check the instructions for your GNU/Linux distribution at instructions and requirements and use the proper package for your system.
If that fails, you will have to install it manually using the official distribution. So you should check here for more info.
If binary PyQT distributions fail, you may then need to compile PyQt from sources. To do so, these are the quick steps:
Build SIP (sip-x11-gpl-3.5) using: python build.py -lqt-mt
If all goes well, it should output something like:
/usr/lib/python2.2/site-packages is the SIP install dir
/usr/include/python2.2 contains Python.h
/usr/lib/qt3-gcc3.2 is the base Qt dir
/usr/lib/qt3-gcc3.2/include contains qglobal.h
Qt 3.0.5 free edition is being used
/usr/lib/qt3-gcc3.2bin/qmake will be used for Makefiles
Qt thread support is enabled
- Build PyQt (PyQt-x11-gpl-3.5) using: python build.py, make, make install.
imgSeek should now stop complaining about the missing PyQt module. If it's still not working, you should make sure PyQt is indeed correctly installed. To do so, try to run the sample apps included in the example directory of the official PyQt distribution.
You should ask for help on the PyKDE mailing list if you didn't manage to install PyQt after reading all available PyQT installation documentation available.
Why ImageMagick or QT development files are required ?
Because imgSeek needs to extract RGB pixel data from image files. I had to use a library to do that for me, or I would waste weeks reinventing the "image-loading-wheel". QT can do that, and so does ImageMagick. Some people had trouble getting QT development files and compiling when the module depended only on QT, that's why I added ImageMagick support. So if you don't have QT development files (specifically: /usr/qt3/include/qimage.h), you can build the module using ImageMagick.
I'm trying to compile PyQT, but it fails with "sipqtQDesktopWidget.cpp:4079: no method QDateTimeEdit::layoutEditors"
Probably you're building a PyQt version previous to 3.6 against Qt v3.1.2 or later. PyQt v3.5 only supports up to Qt version 3.1.1, and it shouldn't be a problem, but Trolltech's made a very rare incompatible API change between 3.1.1 and 3.1.2: they substracted layoutEditors method from QDateTimeEdit class. To solve this, you can either:
- get the latest PyQt, if there's a 3.6 or later available, (3.6 wasn't out yet at the moment of writing this), or a development snapshot otherwise.
- edit sip/qdatetimeedit.sip, and remove the layoutEditors declaration (about line 234, or so)
The latest sip and PyQt development snapshots, are at: (build sip before pyqt)
Learn more at this thread: http://email@example.com/msg04141.html
I couldn't get imgSeek working because of PyQt related errors, or it simply segfaults...
If no matter which combination of binary packages you try, you always end up with a weird "Unresolved symbol" message, you should try in this order:Build and install QT 3.x from sources (this will take a long time)Build and install PyQt from sources
If you still have problems, you should search for your error messages on the PyKDE mailing list and then post complete descriptions and install output about your problem so others can help.
If imgSeek segfaults on start with the trace below:
You could try putting
export KDE_MALLOC="n" in your ~/.profile.
Running imgSeek inside gdb
- make sure you have "gdb" installed (available on the Development tools section of your linux distribution)
- run the following command on a terminal:
$ gdb python
- You will then get the gdb prompt:
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...(no debugging symbols found)...
- enter the following two gdb commands:
(gdb) set args `which imgSeek`
- imgSeek will run inside gdb, and you should see a line like:
Starting program: /usr/bin/python `which imgSeek`
- once imgseek is started, reproduce the crash. You should then get back to the gdb terminal, and type this command:
- which should display a list of calls. Please include all the lines obtained after the "bt" command on your bug report.
QT libraries ? ImageMagick ? Development files ? What do I need to run imgSeek ?
You must have QT 3.x and PyQt >= 3.4 properly installed.
You will also need ImageMagick development files and static library (ImageMagick-devel package) - recommended
QT development files. (qt-devel package)
Please read the install instructions and requirements for more information.
How do I install imgSeek if I don't have root privileges ?
You will need to build the C++ extension module, copy it to the imgSeekLib dir and then run imgSeek from the place you extracted it.
To do so, extract the imgSeek tarball and do the following steps from the root distribution dir:
- python setup.py build
- cp build/lib.linux-i686-2.2/imgSeekLib/imgdb.so imgSeekLib/
Where are database files located, what is their size and how do they scale?
When you run imgSeek for the first time, it will create the directory ~/.imgseek/, where it will place a file for UI preferences (imgSeek.ini) and two database files: img-db.iqd, which will store metadata, dir and group structure; and img-db.iqd.img, where image data (40 integer coefficients for each image) is placed.
These database files will grow linearly in size. In average, a database with 4000 images should have an img-db.iqd with 1.5M and img-db.iqd.img with 3.9M
In practice, adding images to a collection has a constant complexity, ie, it always takes the same time, regardless of how big is your collection. (There is still a lot of optimizations left on this process).
And when it comes to querying for similar images, I can say that, theoretically, the complexity is linear with the size of your collection. So, if your collection with 10.000 images takes 5 seconds to query, and you increase your collection to 100.000 images, then it should take 50 seconds to query.
So, based on the current size of your collection you can make a rough estimation on how it should behave. (and there is still some small improvements possible, but it should still remain with linear complexity)
Why metadata embedded on image files don't get updated when I change them inside imgSeek ?
Unfortunately imgSeek can only extract metadata from image files and add them to the metadata it keeps internally for each image.
This will change one day, please wait.
I'm not able to extract IPTC metadata and use the Transform tool dialog.
You need the Python Imaging Library installed. Download here.
After installing PIL, you don't need to install imgSeek again. Just restart it and the related features should get activated.
I would like to see the feature XYZ in imgSeek !
No problem, just send a message to imgseek-users|at|lists.sourceforge.net with a good description of the feature, how the user interaction should be, where it should be placed and why it is unique and important to imgSeek.
How do I create an RPM package for imgSeek ?
You may use setup.py for it. extract imgSeek source distribution to a directory, and from it, type: (you may need to become root before issuing these commands)
# python setup.py bdist_rpm
(you need the rpm development tools installed on your system). If all goes well, you should now have a binary and source RPM ready for installation on the "dist/" directory.
Alternatively, you may use the provided imgSeek.spec file. Please consult the rpm tools (rpmbuild) documentation.
How can I help imgSeek development ?
Any help is appreciated. Feel free to send bugs/rants/comments/ideas to the suitable mailing list.
You can also check the TODO list and ask for directions on the development list about a specific task you would like to help.
What about running it on Windows(R) systems ?
Please see more about it here
For what platform is imgSeek being designed?
I have the intention to make imgSeek work on MS Windows systems as well, but I will always pay more attention to and do more tests with the GNU/Linux version.
Do we expect imgSeek to be used as a server-side image collection manager ?
I've had no intentions so far in making it a web service of some kind. Development and usability is focused on a desktop GUI program capable of managing photo collections. In the future of course I could start thinking about making server-side versions stripped of any GUI so you can manage image collections remotely, publish photos and allow content-based navigation, etc etc.
Install fails with a message similar to "cc1plus: unrecognized option `-fI/usr/include'"
You should replace the included setup.py with this fixed setup.py script and try the install again.