|
|
|
@ -90,7 +90,7 @@ protected: |
|
|
|
|
{ |
|
|
|
|
return makePtr<LATCHDescriptorExtractorImpl>(bytes, rotationInvariance, half_ssd_size); |
|
|
|
|
} |
|
|
|
|
void CacluateSums(int count, const std::vector<int> &points, bool rotationInvariance, const Mat &grayImage, const KeyPoint &pt, int &suma, int &sumc, float cos_theta, float sin_theta, int half_ssd_size); |
|
|
|
|
void CalcuateSums(int count, const std::vector<int> &points, bool rotationInvariance, const Mat &grayImage, const KeyPoint &pt, int &suma, int &sumc, float cos_theta, float sin_theta, int half_ssd_size); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void pixelTests1(const Mat& grayImage, const std::vector<KeyPoint>& keypoints, OutputArray _descriptors, const std::vector<int> &points, bool rotationInvariance, int half_ssd_size) |
|
|
|
@ -114,7 +114,7 @@ static void pixelTests1(const Mat& grayImage, const std::vector<KeyPoint>& keypo |
|
|
|
|
int suma = 0; |
|
|
|
|
int sumc = 0; |
|
|
|
|
|
|
|
|
|
CacluateSums(count, points, rotationInvariance, grayImage, pt, suma, sumc, cos_theta, sin_theta, half_ssd_size); |
|
|
|
|
CalcuateSums(count, points, rotationInvariance, grayImage, pt, suma, sumc, cos_theta, sin_theta, half_ssd_size); |
|
|
|
|
desc[ix] += (uchar)((suma < sumc) << j); |
|
|
|
|
|
|
|
|
|
count += 6; |
|
|
|
@ -145,7 +145,7 @@ static void pixelTests2(const Mat& grayImage, const std::vector<KeyPoint>& keypo |
|
|
|
|
int suma = 0; |
|
|
|
|
int sumc = 0; |
|
|
|
|
|
|
|
|
|
CacluateSums(count, points, rotationInvariance, grayImage, pt, suma, sumc, cos_theta, sin_theta, half_ssd_size); |
|
|
|
|
CalcuateSums(count, points, rotationInvariance, grayImage, pt, suma, sumc, cos_theta, sin_theta, half_ssd_size); |
|
|
|
|
desc[ix] += (uchar)((suma < sumc) << j); |
|
|
|
|
|
|
|
|
|
count += 6; |
|
|
|
@ -176,7 +176,7 @@ static void pixelTests4(const Mat& grayImage, const std::vector<KeyPoint>& keypo |
|
|
|
|
int suma = 0; |
|
|
|
|
int sumc = 0; |
|
|
|
|
|
|
|
|
|
CacluateSums(count, points, rotationInvariance, grayImage, pt, suma, sumc, cos_theta, sin_theta, half_ssd_size); |
|
|
|
|
CalcuateSums(count, points, rotationInvariance, grayImage, pt, suma, sumc, cos_theta, sin_theta, half_ssd_size); |
|
|
|
|
desc[ix] += (uchar)((suma < sumc) << j); |
|
|
|
|
|
|
|
|
|
count += 6; |
|
|
|
@ -208,7 +208,7 @@ static void pixelTests8(const Mat& grayImage, const std::vector<KeyPoint>& keypo |
|
|
|
|
int suma = 0; |
|
|
|
|
int sumc = 0; |
|
|
|
|
|
|
|
|
|
CacluateSums(count, points, rotationInvariance, grayImage, pt, suma, sumc, cos_theta, sin_theta, half_ssd_size); |
|
|
|
|
CalcuateSums(count, points, rotationInvariance, grayImage, pt, suma, sumc, cos_theta, sin_theta, half_ssd_size); |
|
|
|
|
desc[ix] += (uchar)((suma < sumc) << j); |
|
|
|
|
|
|
|
|
|
count += 6; |
|
|
|
@ -239,7 +239,7 @@ static void pixelTests16(const Mat& grayImage, const std::vector<KeyPoint>& keyp |
|
|
|
|
int suma = 0; |
|
|
|
|
int sumc = 0; |
|
|
|
|
|
|
|
|
|
CacluateSums(count, points, rotationInvariance, grayImage, pt, suma, sumc, cos_theta, sin_theta, half_ssd_size); |
|
|
|
|
CalcuateSums(count, points, rotationInvariance, grayImage, pt, suma, sumc, cos_theta, sin_theta, half_ssd_size); |
|
|
|
|
desc[ix] += (uchar)((suma < sumc) << j); |
|
|
|
|
|
|
|
|
|
count += 6; |
|
|
|
@ -269,7 +269,7 @@ static void pixelTests32(const Mat& grayImage, const std::vector<KeyPoint>& keyp |
|
|
|
|
int suma = 0; |
|
|
|
|
int sumc = 0; |
|
|
|
|
|
|
|
|
|
CacluateSums(count, points, rotationInvariance, grayImage, pt, suma, sumc, cos_theta, sin_theta, half_ssd_size); |
|
|
|
|
CalcuateSums(count, points, rotationInvariance, grayImage, pt, suma, sumc, cos_theta, sin_theta, half_ssd_size); |
|
|
|
|
desc[ix] += (uchar)((suma < sumc) << j); |
|
|
|
|
|
|
|
|
|
count += 6; |
|
|
|
@ -300,7 +300,7 @@ static void pixelTests64(const Mat& grayImage, const std::vector<KeyPoint>& keyp |
|
|
|
|
int suma = 0; |
|
|
|
|
int sumc = 0; |
|
|
|
|
|
|
|
|
|
CacluateSums(count, points, rotationInvariance, grayImage, pt, suma, sumc, cos_theta, sin_theta, half_ssd_size); |
|
|
|
|
CalcuateSums(count, points, rotationInvariance, grayImage, pt, suma, sumc, cos_theta, sin_theta, half_ssd_size); |
|
|
|
|
desc[ix] += (uchar)((suma < sumc) << j); |
|
|
|
|
|
|
|
|
|
count += 6; |
|
|
|
@ -309,7 +309,7 @@ static void pixelTests64(const Mat& grayImage, const std::vector<KeyPoint>& keyp |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void CacluateSums(int count, const std::vector<int> &points, bool rotationInvariance, const Mat &grayImage, const KeyPoint &pt, int &suma, int &sumc, float cos_theta, float sin_theta, int half_ssd_size) |
|
|
|
|
void CalcuateSums(int count, const std::vector<int> &points, bool rotationInvariance, const Mat &grayImage, const KeyPoint &pt, int &suma, int &sumc, float cos_theta, float sin_theta, int half_ssd_size) |
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
int ax = points[count]; |
|
|
|
|