Commit d4f651ea authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #242 from Aljaksandr/patch-1

Bug fix for feature extraction
parents a08b709e d76b9760
...@@ -307,6 +307,8 @@ void computeChannels(InputArray image, vector<Mat>& channels) ...@@ -307,6 +307,8 @@ void computeChannels(InputArray image, vector<Mat>& channels)
for (int col = 0; col < grad.cols; ++col) { for (int col = 0; col < grad.cols; ++col) {
//float angle = atan2(row_der(row, col), col_der(row, col)) * to_deg; //float angle = atan2(row_der(row, col), col_der(row, col)) * to_deg;
float angle = angles(row, col); float angle = angles(row, col);
if (angle > 180)
angle -= 180;
if (angle < 0) if (angle < 0)
angle += 180; angle += 180;
int ind = (int)(angle / 30); int ind = (int)(angle / 30);
......
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