in reply to Re: Comparing images to find similar images in a database
in thread Comparing images to find similar images in a database

From what I can tell, it almost looks as if the Stonehenge post and Image::Seek are using the same algorithm. I'm looking specifically at haar.cpp from Image::Seek. Anyway, Image::Seek is a really good starting point. I think what I am going to do is make some minor modifications to the source to fit my needs. I will post my results once finished.

Thanks for pointing me in the right direction!.
  • Comment on Re^2: Comparing images to find similar images in a database

Replies are listed 'Best First'.
Re^3: Comparing images to find similar images in a database (grid-search)
by LanX (Saint) on Dec 04, 2014 at 14:53 UTC
    > it almost looks as if the Stonehenge post and Image::Seek are using the same algorithm

    I don't think so... wavelets are fare more sophisticated and reliable.

    But it seems like the results of Merlyn's algorithm were already sufficient for you and you only need a good lookup strategy for your SQL-query.

    For this approach you are calculating if sum of distances of 48 vectors are below a threshold. (BTW: could you please fix your OP by adding code-tags?)

    succesive narowing

    So start by only looking up the set of images were the first vectors distance is below the threshold.

    Then you need to look up the images were 2. distance < threshold - 1. distance and so on.

    grid approach

    Grouping and indexing the vectors in a grid where the cells have the widths of the threshold should speed up the look up considerably.

    Then two vectors can only have a smaller distance if they are in the same or neighboring cells!

    Prefiltering over the 48 vecors like this would narrow the set of possible results considerably well, to allow a more detailed comparison.

    I don't know the inner optimization of your DB server sufficiently well to formulate an optimal SQL query for this, but this would be off topic anyway and I hope you get the idea mow. :)

    Cheers Rolf

    (addicted to the Perl Programming Language and ☆☆☆☆ :)