Commit 05531cd7 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #5768 from cbalint13:kaze_akaze

parents 919fc443 0087c57e
...@@ -191,7 +191,7 @@ public: ...@@ -191,7 +191,7 @@ public:
for (int i = range.start; i < range.end; i++) for (int i = range.start; i < range.end; i++)
{ {
float ratio = (float)fastpow(2, evolution[i].octave); float ratio = (float)fastpow(2, evolution[i].octave);
int sigma_size_ = fRound(evolution[i].esigma * options_.derivative_factor / ratio); int sigma_size_ = fRound(evolution[i].esigma * options_.derivative_factor / ratio);
compute_scharr_derivatives(evolution[i].Lsmooth, evolution[i].Lx, 1, 0, sigma_size_); compute_scharr_derivatives(evolution[i].Lsmooth, evolution[i].Lx, 1, 0, sigma_size_);
...@@ -1000,7 +1000,7 @@ void MSURF_Descriptor_64_Invoker::Get_MSURF_Descriptor_64(const KeyPoint& kpt, f ...@@ -1000,7 +1000,7 @@ void MSURF_Descriptor_64_Invoker::Get_MSURF_Descriptor_64(const KeyPoint& kpt, f
// Get the information from the keypoint // Get the information from the keypoint
ratio = (float)(1 << kpt.octave); ratio = (float)(1 << kpt.octave);
scale = fRound(0.5f*kpt.size / ratio); scale = fRound(0.5f*kpt.size / ratio);
angle = kpt.angle; angle = (kpt.angle * static_cast<float>(CV_PI)) / 180.f;
level = kpt.class_id; level = kpt.class_id;
yf = kpt.pt.y / ratio; yf = kpt.pt.y / ratio;
xf = kpt.pt.x / ratio; xf = kpt.pt.x / ratio;
...@@ -1406,8 +1406,9 @@ void MLDB_Full_Descriptor_Invoker::Get_MLDB_Full_Descriptor(const KeyPoint& kpt, ...@@ -1406,8 +1406,9 @@ void MLDB_Full_Descriptor_Invoker::Get_MLDB_Full_Descriptor(const KeyPoint& kpt,
float scale = (float)fRound(0.5f*kpt.size / ratio); float scale = (float)fRound(0.5f*kpt.size / ratio);
float xf = kpt.pt.x / ratio; float xf = kpt.pt.x / ratio;
float yf = kpt.pt.y / ratio; float yf = kpt.pt.y / ratio;
float co = cos(kpt.angle); float angle = (kpt.angle * static_cast<float>(CV_PI)) / 180.f;
float si = sin(kpt.angle); float co = cos(angle);
float si = sin(angle);
int pattern_size = options_->descriptor_pattern_size; int pattern_size = options_->descriptor_pattern_size;
int dpos = 0; int dpos = 0;
...@@ -1441,7 +1442,7 @@ void MLDB_Descriptor_Subset_Invoker::Get_MLDB_Descriptor_Subset(const KeyPoint& ...@@ -1441,7 +1442,7 @@ void MLDB_Descriptor_Subset_Invoker::Get_MLDB_Descriptor_Subset(const KeyPoint&
// Get the information from the keypoint // Get the information from the keypoint
float ratio = (float)(1 << kpt.octave); float ratio = (float)(1 << kpt.octave);
int scale = fRound(0.5f*kpt.size / ratio); int scale = fRound(0.5f*kpt.size / ratio);
float angle = kpt.angle; float angle = (kpt.angle * static_cast<float>(CV_PI)) / 180.f;
int level = kpt.class_id; int level = kpt.class_id;
float yf = kpt.pt.y / ratio; float yf = kpt.pt.y / ratio;
float xf = kpt.pt.x / ratio; float xf = kpt.pt.x / ratio;
......
...@@ -512,7 +512,7 @@ public: ...@@ -512,7 +512,7 @@ public:
for (int i = range.start; i < range.end; i++) for (int i = range.start; i < range.end; i++)
{ {
kpts[i].angle = 0.0; kpts[i].angle = 0.0;
if (options_.upright) if (options_.upright)
{ {
kpts[i].angle = 0.0; kpts[i].angle = 0.0;
if (options_.extended) if (options_.extended)
...@@ -805,7 +805,7 @@ void KAZE_Descriptor_Invoker::Get_KAZE_Descriptor_64(const KeyPoint &kpt, float ...@@ -805,7 +805,7 @@ void KAZE_Descriptor_Invoker::Get_KAZE_Descriptor_64(const KeyPoint &kpt, float
yf = kpt.pt.y; yf = kpt.pt.y;
xf = kpt.pt.x; xf = kpt.pt.x;
scale = fRound(kpt.size / 2.0f); scale = fRound(kpt.size / 2.0f);
angle = kpt.angle; angle = (kpt.angle * static_cast<float>(CV_PI)) / 180.f;
level = kpt.class_id; level = kpt.class_id;
co = cos(angle); co = cos(angle);
si = sin(angle); si = sin(angle);
...@@ -1088,7 +1088,7 @@ void KAZE_Descriptor_Invoker::Get_KAZE_Descriptor_128(const KeyPoint &kpt, float ...@@ -1088,7 +1088,7 @@ void KAZE_Descriptor_Invoker::Get_KAZE_Descriptor_128(const KeyPoint &kpt, float
yf = kpt.pt.y; yf = kpt.pt.y;
xf = kpt.pt.x; xf = kpt.pt.x;
scale = fRound(kpt.size / 2.0f); scale = fRound(kpt.size / 2.0f);
angle = kpt.angle; angle = (kpt.angle * static_cast<float>(CV_PI)) / 180.f;
level = kpt.class_id; level = kpt.class_id;
co = cos(angle); co = cos(angle);
si = sin(angle); si = sin(angle);
......
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