1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

fix logPolar/linearPolar

This commit is contained in:
Alexander Alekhin
2016-03-03 18:04:33 +03:00
parent 88a33a4e4f
commit 275bfcf99c
2 changed files with 84 additions and 5 deletions
+2 -5
View File
@@ -6500,7 +6500,7 @@ cvLogPolar( const CvArr* srcarr, CvArr* dstarr,
double* exp_tab = _exp_tab;
for( rho = 0; rho < dst->width; rho++ )
exp_tab[rho] = std::exp(rho/M);
exp_tab[rho] = std::exp(rho/M) - 1.0;
for( phi = 0; phi < dsize.height; phi++ )
{
@@ -6632,7 +6632,7 @@ void cvLinearPolar( const CvArr* srcarr, CvArr* dstarr,
for( rho = 0; rho < dsize.width; rho++ )
{
double r = maxRadius*(rho+1)/dsize.width;
double r = maxRadius*rho/dsize.width;
double x = r*cp + center.x;
double y = r*sp + center.y;
@@ -6669,9 +6669,6 @@ void cvLinearPolar( const CvArr* srcarr, CvArr* dstarr,
cvCartToPolar( &bufx, &bufy, &bufp, &bufa, 0 );
for( x = 0; x < dsize.width; x++ )
bufp.data.fl[x] += 1.f;
for( x = 0; x < dsize.width; x++ )
{
double rho = bufp.data.fl[x]*pscale;