#include <hash.h>
List of all members.
Classes |
struct | Params |
Public Member Functions |
vector< float > | getHash (Mat desc) |
| Compute the hash.
|
| Hash () |
| Hash class constructor.
|
void | init (Mat desc) |
bool | isInitialized () |
| Return true if the class has been initialized.
|
float | match (vector< float > hash_1, vector< float > hash_2) |
| Compute the distance between 2 hashes.
|
Params | params () const |
void | setParams (const Params ¶ms) |
| Sets the class parameters.
|
Private Member Functions |
vector< float > | compute_random_vector (uint seed, int size) |
| Computes a random vector of some size.
|
void | initProjections (int desc_size) |
| Compute the random vector/s needed to generate the hash.
|
vector< float > | unit_vector (vector< float > x) |
| Make a vector unit.
|
Private Attributes |
int | h_size_ |
| > Vector of random values
|
bool | initialized_ |
| > Size of the hash
|
Params | params_ |
vector< vector< float > > | r_ |
| > Stores parameters
|
Detailed Description
Definition at line 16 of file hash.h.
Constructor & Destructor Documentation
Member Function Documentation
Computes a random vector of some size.
- Returns:
- random vector
- Parameters:
-
seed | to generate the random values |
desired | size |
Definition at line 150 of file hash.cpp.
Compute the hash.
- Returns:
- hash vector
- Parameters:
-
cvMat | containing the descriptors of the image |
Definition at line 55 of file hash.cpp.
Compute the random vector/s needed to generate the hash.
- Returns:
- Parameters:
-
size | of the initial descriptor matrix. |
true | to generate 'n' random orthogonal projections, false to generate 'n' random non-orthogonal projections. |
Definition at line 86 of file hash.cpp.
Return true if the class has been initialized.
- Returns:
Definition at line 24 of file hash.cpp.
Compute the distance between 2 hashes.
- Returns:
- the distance
- Parameters:
-
Definition at line 183 of file hash.cpp.
Sets the class parameters.
- Returns:
- Parameters:
-
Definition at line 33 of file hash.cpp.
Make a vector unit.
- Returns:
- the "unitized" vector
- Parameters:
-
Definition at line 163 of file hash.cpp.
Member Data Documentation
> Vector of random values
Definition at line 68 of file hash.h.
> Size of the hash
Definition at line 69 of file hash.h.
> Stores parameters
Definition at line 67 of file hash.h.
The documentation for this class was generated from the following files: