ftwin finds similar images thanks to libpuzzle
By Jok on Saturday, September 29 2007, 01:06 - Software development - Permalink
After a little feature for the 0.4.0, I was looking the news @ freshmeat, and found a fabulous library to try !
LibPuzzle was developed by Jedi / Franck Denis, mr PureFTPd (or mr SkyBlog according to some people that worked with me at Qualys).
Excerpt from the README :
The Puzzle library is designed to quickly find visually similar images (gif,png, jpg), even if they have been resized, recompressed, recolored or slightly modified. ... The Puzzle library is a implementation of "An image signature for any kind of image", by H. CHI WONG, Marschall BERN and David GOLDBERG.
For the moment, as I don't understand all the subtleties of the vector fixed-length splitting (I have discovered libpuzzle 2 days ago...), ftwin is mainly computing vectors for every files it checks, then, compares all the vector with each others.
That's pretty overkill, but for a desktop usage, it is sufficient.
Comments
Can you give some usage-examples here, so we can try it out before reading all the options?
installed the 0.5.0 verison with libpuzzle i get the next error :
code: ftwin code: ftwin: error while loading shared libraries: libpuzzle.so.1: cannot open shared object file: No such file or directory
where should i find the libpuzzle.so.1? where is ftwin searching for it and what should be the command for creating the shared library libpuzzle.so.1 ?
thx a lot!
qwert
hi!
1. i had allready installed libpuzzle. it's working ok even puzzle-diff.
2. i installed ftwin
3. when i type "ftwin" i get the next error "ftwin: error while loading shared libraries: libpuzzle.so.1: cannot open shared object file: No such file or directory"
merçi beaucoup!!!
thx for the previous info.
could you offer some examples with the -p options?
-p path
local path? absolute path? did it support symbolic paths?
thx a lot!
qwertsad:
"ftwin: error while loading shared libraries: libpuzzle.so.1: cannot open shared object file: No such file or directory"
On this error, simply take an "ldconfig" as root.
Jok: Very good tool!
You should have a look to libarchive to be able to include tar tar.gz tar.bz2, but also cpio, zip, iso, ar files : http://people.freebsd.org/~kientzle/libarchive/
All that in a simple, small and well documented library.
I forgot to mention it previously, I package ftwin for archlinux http://aur.archlinux.org/packages.php?do_Details=1&ID=13245 and I will see to port it to FreeBSD (As soon as I have enough time :)).
Can't wait for a new release able to compare more archive content (libarchive :))
Bon boulot, merci.
Hi,
I have a compileproblem with ftwin 0.8.5 on Fedora 11 x86_64, ./configure runs:
[...snip]
** Configuration summary for ftwin 0.8.5:
Support for puzzle library: yes
Support for archive library: no
Support for zlib library: yes
Support for bz2 library: yes
configure: creating ./config.status
config.status: creating Doxyfile
config.status: creating Makefile
config.status: creating src/config.h
config.status: src/config.h is unchanged
config.status: executing depfiles commands
make says:
$make
gcc -DHAVE_CONFIG_H -I. -I./src -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -I/usr/include/apr-1 -I/usr/local//include -I/usr//include -I/usr//include -pthread -DHAVE_APR -Wall -Werror -g -ggdb -I./src -O0 -MT ftwin-ftwin.o -MD -MP -MF .deps/ftwin-ftwin.Tpo -c -o ftwin-ftwin.o `test -f 'src/ftwin.c' || echo './'`src/ftwin.c
cc1: warnings being treated as errors
src/ftwin.c: In Funktion »ft_conf_add_file«:
src/ftwin.c:425: Fehler: »fname_len« may be used uninitialized in this function
make: *** [ftwin-ftwin.o] Fehler 1
Do I need a package?