Merge pull request #1897 from berak:b_3393_24

This commit is contained in:
Roman Donchenko 2013-12-02 17:11:55 +04:00 committed by OpenCV Buildbot
commit 838961a289

View File

@ -603,8 +603,8 @@ inline void elbp_(InputArray _src, OutputArray _dst, int radius, int neighbors)
dst.setTo(0);
for(int n=0; n<neighbors; n++) {
// sample points
float x = static_cast<float>(-radius * sin(2.0*CV_PI*n/static_cast<float>(neighbors)));
float y = static_cast<float>(radius * cos(2.0*CV_PI*n/static_cast<float>(neighbors)));
float x = static_cast<float>(radius * cos(2.0*CV_PI*n/static_cast<float>(neighbors)));
float y = static_cast<float>(-radius * sin(2.0*CV_PI*n/static_cast<float>(neighbors)));
// relative indices
int fx = static_cast<int>(floor(x));
int fy = static_cast<int>(floor(y));