[pHash-support] examples/buildmvptreedct

Evan Klinger eklinger at phash.org
Wed Dec 29 16:57:19 PST 2010


Elijah,
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.

Thank you
Evan

On Wed, Dec 29, 2010 at 4:02 PM, Eli the Bearded
<phash at eli.users.panix.com> wrote:
> The buildmvptreedct example fails to actually save the tree, so it
> can't be used to store hashes for later comparison:
>
> $ ./buildmvptreedct testimages/all-memphis-minnie memphis-minnie.tree  dir
> name: testimages/all-memphis-minnie
> nbfiles = 5
> files[0]: testimages/all-memphis-minnie/losslessrotate.jpg hash = 72fa9c2c9676838a
> files[1]: testimages/all-memphis-minnie/resizedup.jpg hash = ed2b8c133103cbed
> files[2]: testimages/all-memphis-minnie/resizeddown.jpg hash = cd3b8c133003cfed
> files[3]: testimages/all-memphis-minnie/topngandback.jpg hash = cd2b8c133183cbed
> files[4]: testimages/all-memphis-minnie/orig.jpg hash = cd2b8c133183cbed
> save: ret code 10
> $
> $ # no tree file created
> $ ls -l memphis-minnie.tree
> ls: cannot access memphis-minnie.tree: No such file or directory
> $
> $ ./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/edited-memphis-minnie.jpg cd2b8c133103cfed
> could not complete query, 3
> ave calcs/query: nan
> $
> $ # fails because there is no tree
>
> Five minutes examining the code and I'm not sure why the tree fails to
> save. I'm interested in this feature the most: saving hashes for later
> comparison, but c++ ain't my strong point. Any help?
>
> Elijah
> _______________________________________________
> pHash-support mailing list
> pHash-support at lists.phash.org
> http://lists.phash.org/listinfo.cgi/phash-support-phash.org
>



More information about the pHash-support mailing list