Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Comparing images to find similar images in a database

by james28909 (Deacon)
on Dec 03, 2014 at 10:58 UTC ( [id://1109098]=note: print w/replies, xml ) Need Help??


in reply to Comparing images to find similar images in a database

I am not absolutely sure but Image::Seek looks promising, and it looks pretty straight forward to use as well.
  • Comment on Re: Comparing images to find similar images in a database

Replies are listed 'Best First'.
Re^2: Comparing images to find similar images in a database
by LanX (Saint) on Dec 03, 2014 at 12:18 UTC
    > but Image::Seek looks promising,

    yep, indeed.

    The first thing which came to mind after reading the title is wavelets, and Image::Seek is such an implementation.

    Cheers Rolf

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

Re^2: Comparing images to find similar images in a database
by walkingthecow (Friar) on Dec 04, 2014 at 03:53 UTC
    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!.
      > 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 ☆☆☆☆ :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1109098]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2024-04-20 06:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found