Remove gcd function from core headers
This commit is contained in:
parent
c886afb502
commit
4ab650d15b
@ -1036,18 +1036,7 @@ inline FileNode FileStorage::getFirstTopLevelNode() const
|
||||
|
||||
//////////////////////////////////////// Various algorithms ////////////////////////////////////
|
||||
|
||||
template<typename _Tp> static inline _Tp gcd(_Tp a, _Tp b)
|
||||
{
|
||||
if( a < b )
|
||||
std::swap(a, b);
|
||||
while( b > 0 )
|
||||
{
|
||||
_Tp r = a % b;
|
||||
a = b;
|
||||
b = r;
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
|
||||
// This function splits the input sequence or set into one or more equivalence classes and
|
||||
// returns the vector of labels - 0-based class indexes for each element.
|
||||
|
@ -1015,6 +1015,19 @@ Rect HOGCache::getWindow(const Size& imageSize, const Size& winStride, int idx)
|
||||
return Rect( x*winStride.width, y*winStride.height, winSize.width, winSize.height );
|
||||
}
|
||||
|
||||
static inline int gcd(int a, int b)
|
||||
{
|
||||
if( a < b )
|
||||
std::swap(a, b);
|
||||
while( b > 0 )
|
||||
{
|
||||
int r = a % b;
|
||||
a = b;
|
||||
b = r;
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
void HOGDescriptor::compute(const Mat& img, std::vector<float>& descriptors,
|
||||
Size winStride, Size padding, const std::vector<Point>& locations) const
|
||||
{
|
||||
|
@ -995,6 +995,8 @@ inline bool HOGDescriptorTester::is_failed() const
|
||||
return failed;
|
||||
}
|
||||
|
||||
static inline int gcd(int a, int b) { return (a % b == 0) ? b : gcd (b, a % b); }
|
||||
|
||||
void HOGDescriptorTester::detect(const Mat& img,
|
||||
vector<Point>& hits, vector<double>& weights, double hitThreshold,
|
||||
Size winStride, Size padding, const vector<Point>& locations) const
|
||||
|
Loading…
x
Reference in New Issue
Block a user