#1 2012-12-20 02:13:12

esmondb
Member
From: London
Registered: 2010-07-20
Posts: 299

Similar images

I was wanting to find a way to search for similar images and came across this library www.phash.org

It creates a perceptual hash of an image. It also builds an MVP tree for queries but is there a way mORMot can do this smile ?
The queries are done using a hamming distance comparison which I initially thought could be done with an rtree but it doesn't look so easy nor that suitable for SQL. Also found a similar question here

Offline

#2 2012-12-20 09:49:32

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: Similar images

As far as I understand the problem, you need to find distances between points, whereas RTREE is about finding intersections between points and regions.
So you will need a dedicated memory structure, with dedicated algorithms.
Using an existing library like phash is a good idea - not to reinvent such a sophisticated wheel may save time!

You can use mORMot to store your structures, including pictures and hashes. Use a dynamic array of bytes if you want to store the hash, and a regular blob field to store the picture.

Offline

Board footer

Powered by FluxBB