ImgSeekWeb
INSTALL guide
Set
up environment
We
expected your environment as forrow
- implement
CGI under the suEXEC mode.
direcotry construction
- main
CGI
- /home/user/public_html/cgi-bin/imgSeekWeb.py
- image
direcotory
- /home/user/public_html/iswImage/images
- thumbnail
direcotory
- /home/user/public_html/iswImage/thumbnails
- data
base
- /home/user/data/img-db.iqd
And previous
programs, files and directories can access as forrow on the web.
- top directory
- http://yourhostname/~user/cgi-bin/imgSeekWeb.py
- image URL
- http://yourhostname/~user/iswImage/images/someimage.jpg
- thumbnail URL
- http://yourhostname/~user/iswImage/thumbnails/someimage_thumb.jpg
module
requirements
- Python Imaging Library (PIL)
- http://www.pythonware.com/products/pil/
- PyQT
- http://www.riverbankcomputing.co.uk/pyqt/index.php
install imgSeek
imgSeekWeb needs imgSeek
for image clustering.
Debian
On Debian sarge you can install as forrow.
$ apt-get install imgseek
anoter distribution
If you wan't to install from imgSeek website (recommend var0.8.5)
You can get from
http://www.imgseek.net/index.html
Next, you should expand imgSeek-0.8.5.tar.bz2 like forrow.
$ tar -xvjf imgSeek-0.8.5.tar.bz2
But var0.8.5 and var0.8.6 has bug in imgSeekCmd which is program of the
imgSeek.
So you should get correct
imgSeekCmd from here
http://imgseek.python-hosting.com/file/trunk/imgseek/Tools/imgSeekCmd?rev=23&format=raw
and replace to
imgSeek-0.8.5/Tools/imgSeekCmd
After,
$ cd imgSeek-0.8.5
$ python setup.py install
Or if you want to local install (recommended)
Type like forrow.
$ python setup.py install --prefix=/usr/local/imgSeek
After local install. You shuld better to write forrow lines (e.g in
.bashrc).
export
PYTHONPATH=/usr/local/imgSeek/imgSeek-0.8.5/lib/python2.3/site-packages:$PYTHONPATH
export PATH=/usr/local/imgSeek/imgSeek-0.8.5/bin:$PATH
install
imgSeekWeb
Get imgSeekWeb and expand it.
$ tar xvzf imgSeekWeb-0.0.1.tar.gz
$ cd imgSeekWeb-0.0.1
Type as forrow install libraries to system standard path
and install cgi to /home/user/public_html/cgi-bin/imgSeekWeb
$ python setup.py install --prefix=/usr/local/imgSeekWeb
--install-scripts=/home/user/public_html/cgi-bin/imgSeekWeb
If you want to local install (recommended)
$ python setup.py install --prefix=/usr/local/imgSeekWeb
--install-scripts=/home/user/public_html/cgi-bin/imgSeekWeb
And after you pathed directory like forrow, too.
export
PYTHONPATH=/usr/local/imgSeekWeb/lib/python2.3/site-packages:$PYTHONPATH
Generate database by imgSeekCmd
making image file (in /home/user/public_html/iswImage/images/) database
img-db.iqd by imgSeekCmd.
Type like forrow.
$ imgSeekCmd add -b /home/user/data/img-db.iqd -r
-d /home/user/public_html/iswImage/images
As a result generate image database file /home/user/data/img-db.iqd
configuration
imgSeekWeb.py
Edit configUserParams in imgSeekWeb.py and configuration database path,
thumbnails URL, directory of thumbnails, images URL and
directory of images.
# example of configUserParams
configUserParams = {
"DBname" : "/home/user/data/img-db.iqd",
"HTMLThumbnailsURL": "http://yourhostname/~user/iswImage/thumbnails",
"IswThumbnailsDir" :
"/home/user/public_html/iswImage/thumbnails",
"HTMLImageURL" :
"http://yourhostname/~user/iswImage/images",
"IswImageDir" :
"/home/user/public_html/iswImage/images",
}
# example of mine (a2c). In this case I tested on localhost
configUserParams = {
"DBname" : "/home/a2c/data/img-db.iqd",
"HTMLThumbnailsURL" :
"http://localhost/~a2c/iswImages/thumbnails",
"IswThumbnailsDir" :
"/home/a2c/public_html/iswImages/thumbnails/",
"HTMLImageURL" :
"http://localhost/~a2c/iswImages/images",
"IswImageDir" :
"/home/a2c/public_html/iswImages/images",
}
implement
imgSeekWeb
acces to forrow URL by your web browser
http://yourhostname/~user/cgi-bin/imgSeekWeb.py
If you succes, random image which choose from
/home/user/public_html/iswImage/images
which discribed on left side and seeked image discribed on right side.