swapped x,y in elbp_

pull/1897/head
berak 11 years ago
parent 429ab8ebee
commit 773616ee04
  1. 4
      modules/contrib/src/facerec.cpp

@ -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));

Loading…
Cancel
Save