1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

added SL2 (squared L2 distance) and implemented the descriptors matching in L2 using SL2

This commit is contained in:
Maria Dimashova
2011-08-08 13:18:12 +00:00
parent a9fdc1bdff
commit fcd999ae6e
3 changed files with 142 additions and 71 deletions
@@ -300,6 +300,20 @@ For efficiency, ``BruteForceMatcher`` is used as a template parameterized with t
ResultType operator()( const T* a, const T* b, int size ) const;
};
/*
* Squared Euclidean distance functor
*/
template<class T>
struct SL2
{
typedef T ValueType;
typedef typename Accumulator<T>::Type ResultType;
ResultType operator()( const T* a, const T* b, int size ) const;
};
// Note: in case of SL2 distance a parameter maxDistance in the method DescriptorMatcher::radiusMatch
// is a squared maximum distance in L2.
/*
* Manhattan distance (city block distance) functor
@@ -311,7 +325,6 @@ For efficiency, ``BruteForceMatcher`` is used as a template parameterized with t
typedef typename Accumulator<T>::Type ResultType;
ResultType operator()( const T* a, const T* b, int size ) const;
...
};
/*
@@ -334,7 +347,6 @@ For efficiency, ``BruteForceMatcher`` is used as a template parameterized with t
ResultType operator()( const unsigned char* a, const unsigned char* b,
int size ) const;
...
};