We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e96bb2 commit cebb49dCopy full SHA for cebb49d
modules/xfeatures2d/src/freak.cpp
@@ -287,8 +287,8 @@ void FREAK_Impl::buildPattern()
287
const float dx = patternLookup[orientationPairs[m].i].x-patternLookup[orientationPairs[m].j].x;
288
const float dy = patternLookup[orientationPairs[m].i].y-patternLookup[orientationPairs[m].j].y;
289
const float norm_sq = (dx*dx+dy*dy);
290
- orientationPairs[m].weight_dx = int((dx/(norm_sq))*4096.0+0.5);
291
- orientationPairs[m].weight_dy = int((dy/(norm_sq))*4096.0+0.5);
+ orientationPairs[m].weight_dx = int((dx/(norm_sq))*4096.0+0.5*((dx>0)-(dx<0)));
+ orientationPairs[m].weight_dy = int((dy/(norm_sq))*4096.0+0.5*((dy>0)-(dy<0)));
292
}
293
294
// build the list of description pairs
0 commit comments