Classes | Public Member Functions | Private Member Functions | Private Attributes
haloc::Hash Class Reference

#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 &params)
 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

Hash class constructor.

Definition at line 14 of file hash.cpp.


Member Function Documentation

vector< float > haloc::Hash::compute_random_vector ( uint  seed,
int  size 
) [private]

Computes a random vector of some size.

Returns:
random vector
Parameters:
seedto generate the random values
desiredsize

Definition at line 150 of file hash.cpp.

vector< float > haloc::Hash::getHash ( Mat  desc)

Compute the hash.

Returns:
hash vector
Parameters:
cvMatcontaining the descriptors of the image

Definition at line 55 of file hash.cpp.

void haloc::Hash::init ( Mat  desc)

Definition at line 39 of file hash.cpp.

void haloc::Hash::initProjections ( int  desc_size) [private]

Compute the random vector/s needed to generate the hash.

Returns:
Parameters:
sizeof the initial descriptor matrix.
trueto 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.

float haloc::Hash::match ( vector< float >  hash_1,
vector< float >  hash_2 
)

Compute the distance between 2 hashes.

Returns:
the distance
Parameters:
hash1
hash2

Definition at line 183 of file hash.cpp.

Params haloc::Hash::params ( ) const [inline]

Definition at line 43 of file hash.h.

void haloc::Hash::setParams ( const Params params)

Sets the class parameters.

Returns:
Parameters:
stuctof parameters

Definition at line 33 of file hash.cpp.

vector< float > haloc::Hash::unit_vector ( vector< float >  x) [private]

Make a vector unit.

Returns:
the "unitized" vector
Parameters:
the"non-unitized" vector

Definition at line 163 of file hash.cpp.


Member Data Documentation

int haloc::Hash::h_size_ [private]

> Vector of random values

Definition at line 68 of file hash.h.

bool haloc::Hash::initialized_ [private]

> Size of the hash

Definition at line 69 of file hash.h.

Definition at line 66 of file hash.h.

vector< vector<float> > haloc::Hash::r_ [private]

> Stores parameters

Definition at line 67 of file hash.h.


The documentation for this class was generated from the following files:


libhaloc
Author(s): Pep Lluis Negre
autogenerated on Thu Jun 6 2019 21:25:00