Commit b7e9c622 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

fifixed compile problem on VS2010 64-bit. fixed L1 and L2 distances

parent 48183f10
...@@ -1782,10 +1782,10 @@ struct CV_EXPORTS Accumulator ...@@ -1782,10 +1782,10 @@ struct CV_EXPORTS Accumulator
typedef T Type; typedef T Type;
}; };
template<> struct Accumulator<unsigned char> { typedef unsigned int Type; }; template<> struct Accumulator<unsigned char> { typedef float Type; };
template<> struct Accumulator<unsigned short> { typedef unsigned int Type; }; template<> struct Accumulator<unsigned short> { typedef float Type; };
template<> struct Accumulator<char> { typedef int Type; }; template<> struct Accumulator<char> { typedef float Type; };
template<> struct Accumulator<short> { typedef int Type; }; template<> struct Accumulator<short> { typedef float Type; };
/* /*
* Squared Euclidean distance functor * Squared Euclidean distance functor
...@@ -1823,7 +1823,7 @@ struct CV_EXPORTS L1 ...@@ -1823,7 +1823,7 @@ struct CV_EXPORTS L1
for( int i = 0; i < size; i++ ) for( int i = 0; i < size; i++ )
{ {
ResultType diff = a[i] - b[i]; ResultType diff = a[i] - b[i];
result += fabs( diff ); result += (ResultType)fabs( diff );
} }
return result; return result;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment