The imgSeek image viewer

Shape Finder


The imgSeek image viewer offers a unique alternative to the non-intuitive norm of searching by filename: you can find an photo based on motif.

By Carsten Schnober

The human mind can remember visual images much easier than it can remember facts and figures. This was the motivation for the imgSeek program (http://imgseek.python-hosting.com), which groups image files according to motif. As an example, imagine you are looking for all the images in your collection that show a palm tree. You can simply feed an image of a palm tree to imgSeek, and the program will find all similar images. Alternatively, you can just sketch the motif you are looking for using the integrated painting tool, and imgSeek will present you with everything that resembles your sketch.

Of course, imgSeek can still group images by file and directory names, creation data, or metadata entries. imgSeek can also export image collections to HTML files to help you set up a website, or it can populate a CD that you can then easily view in a browser.

Installation

The Suse and Debian distributions both include imgSeek, and you can run Yast or apt-get install imgseek install the program. The package is also in Ubuntu's universe repository, although you might prefer a manual install, as the version is somewhere between buggy and unusable.

imgSeek is a Python program, so you do not need to compile it before installing from source code. Obtain the source code from the imgSeek website http://imgseek.python-hosting.com. You need root privileges to install the files in the imgSeek-0.8.5.tar.bz2 file. First unpack by entering tar -xjf imgSeek-0.8.5.tar.bz2 and then give the ./install command.

imgSeek requires the Python scripting language and developer packages, which will be titled python-dev or python-devel, depending on your distribution, as well as PyQt, again with developer packages (titled something like pyqt or python-qt with a dev or devel extension). Finally, you need the Qt developer package, libqt-dev or qt-devel, depending on your distribution.

It is a good idea to install ImageMagick and the corresponding developer packages to allow imgSeek to handle the numerous image formats supported by this graphics library. If you additionally install the Python-Imaging package, imgSeek will also handle and edit the metadata for various image formats.

Go!

After completing the install, simply give the imgSeek command at the command line to launch the program. Watch out for the upper case S! When you first launch the program, it will not display any images. If you have an image collection on your disk at this point, you will want to parse the collection now. To do so, click on the Add tab in the main window (Figure 1).

Figure 1: imgSeek sorts large collections of images based on criteria such as the date, filename, and motif.

imgSeek subdivides the image database into volumes. The standard volume includes any files you have added below the Local filesystem. If you add images from a CD, for example, you might like to add a new volume using the CD media name to keep these collections in separate databases. This allows you to work with the images on your local filesystem without imgSeek trying to access the images on a CD that doesn't happen to be mounted at the time.

After deciding on a volume, enter the Path: to the directory. Then click the Add! button to tell imgSeek to look for image files in this path. If you check recursively, imgSeek will also add files in subdirectories to this collection.

The Browse tab in the main window has a file manager that allows you to navigate the entries in your image collection. There are four additional tabs in this view that apply different organizational criteria. The Files tab uses a tree view with the volumes at the top. You can expand the directory tree below this level, and individual image files are then shown as entries. Clicking on a directory displays thumbnails of the files in that directory at the top right of the imgSeek window, and clicking on a thumbnail displays the original image at bottom right.

Groups also gives you a tree view but allows you to define customizable groups. The default setting has a group for the date an image was added to the collection, and there is an Orphan group for images that are not assigned to a group, possibly because you deleted the group they belonged to.

Right clicking somewhere in the group window pops up a context menu with the New group item, which unsurprisingly creates a new group to which you can assign an arbitrary name. You can then use drag & drop to move or copy individual images or whole directories back and forth between groups.

The System tab gives you the plain old filesystem without applying any sorting criteria. You can browse the filesystem via the tree view just like with any other file manager and explore its branches.

Similarity in the Browse area sorts images by filename or date. The By: selection box allows you to define the criterion: Date or Filename. Clicking on the Group then sorts the images in the database and shows an example of each group on the left of the imgSeek window. Clicking on the sample image then takes you to the thumbnails for the other images in the group.

The Threshold field defines a threshold value. The higher the number, the more tolerant imgSeek will be to differences when grouping images: that is, the group population will grow. The toolbox symbol next to the Group! button converts the groups into logical groups that then appear in the Groups tab, where you can manage them.

Search and Locate

The Search tab is where you will find imgSeek's most exciting feature. The by Image content tab has two sections, Import and Draw. The former gives you the ability to load an arbitrary image file After doing so, you can click the Start Search button to locate any images in the database that have a similar motif, according to imgSeek. The program actually displays a percentage to tell you how similar it thinks the image is (Figure 2).

Figure 2: The image content search feature is mostly useful, but it sometimes matches images without noticeable similarities.

The search algorithm evaluates figures and forms to make a decision. This means that the program might discover similarities between images that the human eye cannot see. For example, the program might identify backgrounds with similar colors that are unimportant for the image as a whole.

But besides the numerous false positives, imgSeek will typically find the images you are looking for, offloading part of the manual work from the user, as it is far quicker to weed out the false results than to manually search the whole database.

The imgSeek drawing program is located in the content search Draw tab. The only options you have are a choice of brush stroke thickness and color. Draw a quick sketch, and then click on Start search to tell imgSeek to compare your sketch with the database and find images with similar motifs (Figure 3).

Figure 3: imgSeek locates images that resemble a sketch drawn by the user.

Batch Images

Right clicking on a thumbnail in any view mode will pop up a context menu. The menu has an Add to batch entry that puts the selected image into a memory cache. This allows you to apply the tools in the Tools menu simultaneously to multiple files.

The Tools | Work batch editor menu item opens a dialog where you can edit the memory cache (Figure 4). Right click to drop down the menu, and then select Remove this item to delete the selected entry. Select Clear current batch to remove the whole stack of images.

Figure 4: Placing images in a memory cache allows you to export images, manipulate images, or run a slide show.

The Batch name drop-down menu gives you access to various caches. The default cache is titled Temporary work batch, and you can click the Create a new batch button to create a new cache. For example, you might like to create a cache for images that you will be exporting to a HTML photo album at a later stage.

After selecting the cache, the Action: drop-down has a number of options. Extract image metadata from file reads the metadata stored with the image file, such as the creation date, resolution, or file size. However, the function only transfers this data to the internal database; a future version of the program will be able to export metadata for use with other programs.

Slideshow runs a slide show of the images in the cache. To do so, the program toggles to full-screen mode and displays the slides in an infinite loop. Pressing [Esc] quits the slide show.

Create HTML album uses the cache to create an image collection that can be viewed in a web browser (Figure 5). There are two designs, Acqua and Slides, which differ only with respect to their color schemes. Figure 6 gives you an example of the Acqua style.

Figure 5: You can export images to HTML-formated photo albums for viewing in a web browser.

Figure 6: imgSeek has two HTML layouts at present, but web designers can easily modify the schemes.

Versatile

The Edit metadata entry in the drop-down menu tells imgSeek to display the meta information stored with the image file and also provides an editing feature. The Tools | Transform images menu item only works if you have installed the Python-Imaging library; in this case, it supports simple image manipulation, including features such as rotation, conversion to other file formats, or scaling.

If you prefer to use the command line for some tasks, imgSeek may be able to help you. The imgSeekCmd command supports imgSeek database management without a GUI and is useful for scripting.

imgSeekCmd add adds new images or directories to the database; the imgSeekCmd browse -F command outputs a list of registered entries. The -G and -V parameters show the groups or volumes, respectively.

The image list contains the internal ID of each image; you can use the imgSeekCmd info -m -i ID command to query the meta-data for the image. Command line support even extends to content-based searching: the imgSeekCmd query -i ID command gives you the internal IDs of images similar to the specified ID. The -r parameter followed by a numeric value restricts the number of events in the search.

Conclusion

imgSeek easily outshines many other image viewers. Despite conceptual brilliance, the content-based motif search is not entirely reliable due to the complexity of the task. The results, however, are still usable. Unfortunately, development work on this special function is not progressing very quickly. In the last 12 months, the new versions have simply been bugfixes. But even if the developers do not achieve everything they have set out to do, at least their pioneering work can serve as an example for other programmers.