[pHash-support] examples/buildmvptreedct

Eli the Bearded phash at eli.users.panix.com
Thu Dec 30 13:29:11 PST 2010


Evan Klinger wrote:
> The MVP tree examples need at least leafcapacity + 2 images in order
> to work properly. In this case I believe the minimum number you need
> is 27. Can you please try with more images and see if that corrects
> the problem? It's also worth noting that the MVP tree provided with
> pHash is now deprecated and has been superceded by the stand alone
> version available on the pHash download page. The new one is more
> efficient and has a much cleaner implementation. We will be announcing
> the new version after the new year.

Adding more images to my test set is trivial, I upped it with a bunch
of recompressed, cropped, and rotated versions of the same image and
tried again. Before that let me ask about the MVP tree. When it is
released will that be with a new phash package, or at least include
directions for easily dropping it into the current phash package?

So, more images to test with. Building a tree seems to work:

$ ./buildmvptreedct testimages/all-memphis-minnie memphis-minnie.tree
dir name: testimages/all-memphis-minnie
nbfiles = 139
files[0]: testimages/all-memphis-minnie/recompress-20.jpg hash = cd2b8c133183cbed
files[1]: testimages/all-memphis-minnie/recompress-26.jpg hash = cd2b8c133183cfad
files[2]: testimages/all-memphis-minnie/recompress-55.jpg hash = cd2b8c133183cbed
files[3]: testimages/all-memphis-minnie/recompress-80.jpg hash = cd2b84133183cfed
files[4]: testimages/all-memphis-minnie/recompress-59.jpg hash = cd2b84133183cfed
files[5]: testimages/all-memphis-minnie/botrighdrop05.jpg hash = 493bcc033183cfdd
[...]
files[138]: testimages/all-memphis-minnie/topdrop01.jpg hash = cd3b8c133103cfad
save: ret code 0
$
$ ls -l ./memphis-minnie.tree.mvp  
-rwxr-xr-x 1 eli eli 32768 2010-12-30 13:11 ./memphis-minnie.tree.mvp

But when I try to query the tree with a different image, coredump,
dum-ta-da-dum-dum:

$ ./querymvptreedct testimages/blur-sharpen-mix/ memphis-minnie.tree
using db memphis-minnie.tree
using dir testimages/blur-sharpen-mix/ for query files
nb query files = 1
radius = 30.000000
knearest = 20
threshold = 15.000000
query[0]: testimages/blur-sharpen-mix//1061073.jpg cd2b8c133103cfed
** glibc detected *** /home/eli/builds/perceptualdiff/pHash-0.9.3/examples/.libs/querymvptreedct: double free or corruption (out): 0x0000000000603110 ***
======= Backtrace: =========
/lib64/libc.so.6[0x7f6c8ee18c76]
/lib64/libc.so.6(cfree+0x6c)[0x7f6c8ee1d96c]
/home/eli/builds/perceptualdiff/pHash-0.9.3/src/.libs/libpHash.so.0(ph_query_mvptree+0x28a)[0x7f6c8fcd087a]
/home/eli/builds/perceptualdiff/pHash-0.9.3/examples/.libs/querymvptreedct[0x40115c]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x7f6c8edc4a7d]
/home/eli/builds/perceptualdiff/pHash-0.9.3/examples/.libs/querymvptreedct[0x400e59]
======= Memory map: ========
00400000-00402000 r-xp 00000000 08:01 636927                             /home/eli/builds/perceptualdiff/pHash-0.9.3/examples/.libs/querymvptreedct
00601000-00602000 r--p 00001000 08:01 636927                             /home/eli/builds/perceptualdiff/pHash-0.9.3/examples/.libs/querymvptreedct
00602000-00603000 rw-p 00002000 08:01 636927                             /home/eli/builds/perceptualdiff/pHash-0.9.3/examples/.libs/querymvptreedct
00603000-006f1000 rw-p 00000000 00:00 0                                  [heap]
7f6c88000000-7f6c88021000 rw-p 00000000 00:00 0 
7f6c88021000-7f6c8c000000 ---p 00000000 00:00 0 
7f6c8eb90000-7f6c8eba4000 r-xp 00000000 08:01 397210                     /lib64/libz.so.1.2.3
7f6c8eba4000-7f6c8eda4000 ---p 00014000 08:01 397210                     /lib64/libz.so.1.2.3
7f6c8eda4000-7f6c8eda5000 r--p 00014000 08:01 397210                     /lib64/libz.so.1.2.3
7f6c8eda5000-7f6c8eda6000 rw-p 00015000 08:01 397210                     /lib64/libz.so.1.2.3
7f6c8eda6000-7f6c8eef7000 r-xp 00000000 08:01 395330                     /lib64/libc-2.10.1.so
7f6c8eef7000-7f6c8f0f7000 ---p 00151000 08:01 395330                     /lib64/libc-2.10.1.so
7f6c8f0f7000-7f6c8f0fb000 r--p 00151000 08:01 395330                     /lib64/libc-2.10.1.so
7f6c8f0fb000-7f6c8f0fc000 rw-p 00155000 08:01 395330                     /lib64/libc-2.10.1.so
7f6c8f0fc000-7f6c8f101000 rw-p 00000000 00:00 0 
7f6c8f101000-7f6c8f117000 r-xp 00000000 08:01 398701                     /lib64/libgcc_s.so.1
7f6c8f117000-7f6c8f316000 ---p 00016000 08:01 398701                     /lib64/libgcc_s.so.1
7f6c8f316000-7f6c8f317000 r--p 00015000 08:01 398701                     /lib64/libgcc_s.so.1
7f6c8f317000-7f6c8f318000 rw-p 00016000 08:01 398701                     /lib64/libgcc_s.so.1
7f6c8f318000-7f6c8f36c000 r-xp 00000000 08:01 395338                     /lib64/libm-2.10.1.so
7f6c8f36c000-7f6c8f56b000 ---p 00054000 08:01 395338                     /lib64/libm-2.10.1.so
7f6c8f56b000-7f6c8f56c000 r--p 00053000 08:01 395338                     /lib64/libm-2.10.1.so
7f6c8f56c000-7f6c8f56d000 rw-p 00054000 08:01 395338                     /lib64/libm-2.10.1.so
7f6c8f56d000-7f6c8f65d000 r-xp 00000000 08:01 399517                     /usr/lib64/libstdc++.so.6.0.12
7f6c8f65d000-7f6c8f85d000 ---p 000f0000 08:01 399517                     /usr/lib64/libstdc++.so.6.0.12
7f6c8f85d000-7f6c8f864000 r--p 000f0000 08:01 399517                     /usr/lib64/libstdc++.so.6.0.12
7f6c8f864000-7f6c8f866000 rw-p 000f7000 08:01 399517                     /usr/lib64/libstdc++.so.6.0.12
7f6c8f866000-7f6c8f87b000 rw-p 00000000 00:00 0 
7f6c8f87b000-7f6c8f8a2000 r-xp 00000000 08:01 398218                     /usr/lib64/libpng12.so.0.39.0
7f6c8f8a2000-7f6c8faa1000 ---p 00027000 08:01 398218                     /usr/lib64/libpng12.so.0.39.0
7f6c8faa1000-7f6c8faa2000 r--p 00026000 08:01 398218                     /usr/lib64/libpng12.so.0.39.0
7f6c8faa2000-7f6c8faa3000 rw-p 00027000 08:01 398218                     /usr/lib64/libpng12.so.0.39.0
7f6c8faa3000-7f6c8fac6000 r-xp 00000000 08:01 397375                     /usr/lib64/libjpeg.so.62.0.0
7f6c8fac6000-7f6c8fcc5000 ---p 00023000 08:01 397375                     /usr/lib64/libjpeg.so.62.0.0
7f6c8fcc5000-7f6c8fcc6000 r--p 00022000 08:01 397375                     /usr/lib64/libjpeg.so.62.0.0
7f6c8fcc6000-7f6c8fcc7000 rw-p 00023000 08:01 397375                     /usr/lib64/libjpeg.so.62.0.0
7f6c8fcc7000-7f6c8fd22000 r-xp 00000000 08:01 636917                     /home/eli/builds/perceptualdiff/pHash-0.9.3/src/.libs/libpHash.so.0.0.0
7f6c8fd22000-7f6c8ff21000 ---p 0005b000 08:01 636917                     /home/eli/builds/perceptualdiff/pHash-0.9.3/src/.libs/libpHash.so.0.0.0
7f6c8ff21000-7f6c8ff22000 r--p 0005a000 08:01 636917                     /home/eli/builds/perceptualdiff/pHash-0.9.3/src/.libs/libpHash.so.0.0.0
7f6c8ff22000-7f6c8ff23000 rw-p 0005b000 08:01 636917                     /home/eli/builds/perceptualdiff/pHash-0.9.3/src/.libs/libpHash.so.0.0.0
7f6c8ff23000-7f6c8ff39000 r-xp 00000000 08:01 395356                     /lib64/libpthread-2.10.1.so
7f6c8ff39000-7f6c90139000 ---p 00016000 08:01 395356                     /lib64/libpthread-2.10.1.so
7f6c90139000-7f6c9013a000 r--p 00016000 08:01 395356                     /lib64/libpthread-2.10.1.so
7f6c9013a000-7f6c9013b000 rw-p 00017000 08:01 395356                     /lib64/libpthread-2.10.1.so
7f6c9013b000-7f6c9013f000 rw-p 00000000 00:00 0 
7f6c9013f000-7f6c9015d000 r-xp 00000000 08:01 393468                     /lib64/ld-2.10.1.so
7f6c90325000-7f6c9032a000 rw-p 00000000 00:00 0 
7f6c90359000-7f6c9035c000 rw-p 00000000 00:00 0 
7f6c9035c000-7f6c9035d000 r--p 0001d000 08:01 393468                     /lib64/ld-2.10.1.so
7f6c9035d000-7f6c9035e000 rw-p 0001e000 08:01 393468                     /lib64/ld-2.10.1.so
7fffc4445000-7fffc445a000 rw-p 00000000 00:00 0                          [stack]
7fffc4536000-7fffc4537000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Abort(coredump)

Any ideas now?

Elijah



More information about the pHash-support mailing list