Interface TupleMapDistanceNorm

All Known Implementing Classes:
TupleMapDistanceNorm.L1, TupleMapDistanceNorm.L2

public interface TupleMapDistanceNorm
Generalized way for normalizing and computing the distance between two sparse descriptors in a map format. Intended for use with RecognitionVocabularyTreeNister2006. Uses efficient distance formula from [1].

[1] Nister, David, and Henrik Stewenius. "Scalable recognition with a vocabulary tree." 2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'06). Vol. 2. Ieee, 2006.

  • Method Details

    • normalize

      void normalize(DogArray_F32 weights)
      Normalizes the descriptor. Computes the norm then divides each element by the norm.
    • distanceUpdate

      float distanceUpdate(float valA, float valB)
      Incremental update to the distance. Initially the distance is set to 2.0, then for every word that is present in both descriptors add this value to it. This only works for a subclass of normalizations. See [1] for details.
    • newInstanceThread

      TupleMapDistanceNorm newInstanceThread()
      Create a new instance that is thread safe, i.e. read only settings can be shared