fixed build under windows (replace M_PI with CV_PI)

pull/13383/head
Vladislav Vinogradov 14 years ago
parent bcec7a7e35
commit 30ecb28877
  1. 8
      modules/imgproc/src/phasecorr.cpp

@ -318,10 +318,10 @@ void cv::createHanningWindow(OutputArray _dst, cv::Size winSize, int type)
for(int i = 0; i < rows; i++)
{
double wr = 0.5 * (1.0f - cos(2.0f * M_PI * (double)i / (double)(rows - 1)));
double wr = 0.5 * (1.0f - cos(2.0f * CV_PI * (double)i / (double)(rows - 1)));
for(int j = 0; j < cols; j++)
{
double wc = 0.5 * (1.0f - cos(2.0f * M_PI * (double)j / (double)(cols - 1)));
double wc = 0.5 * (1.0f - cos(2.0f * CV_PI * (double)j / (double)(cols - 1)));
dstData[i*cols + j] = wr * wc;
}
}
@ -335,10 +335,10 @@ void cv::createHanningWindow(OutputArray _dst, cv::Size winSize, int type)
for(int i = 0; i < rows; i++)
{
double wr = 0.5 * (1.0 - cos(2.0 * M_PI * (double)i / (double)(rows - 1)));
double wr = 0.5 * (1.0 - cos(2.0 * CV_PI * (double)i / (double)(rows - 1)));
for(int j = 0; j < cols; j++)
{
double wc = 0.5 * (1.0 - cos(2.0 * M_PI * (double)j / (double)(cols - 1)));
double wc = 0.5 * (1.0 - cos(2.0 * CV_PI * (double)j / (double)(cols - 1)));
dstData[i*cols + j] = wr * wc;
}
}

Loading…
Cancel
Save