fixed bugs in CartToPolarToCart test

This commit is contained in:
Vadim Pisarevsky
2011-02-09 21:37:33 +00:00
parent 061b49e0b2
commit 77529b1fa6
3 changed files with 50 additions and 47 deletions

View File

@@ -382,7 +382,7 @@ void mixChannels( const Mat* src, size_t nsrcs, Mat* dst, size_t ndsts, const in
v[k] = &src[k];
for( k = 0; k < n; k++ )
v[m + k] = &dst[k];
NAryMatIterator it(v, planes);
NAryMatIterator it(v, planes, m + n);
for( int i = 0; i < it.nplanes; i++, ++it )
mixChannels( &it.planes[0], m, &it.planes[m], n, fromTo, npairs );

View File

@@ -445,7 +445,7 @@ void cartToPolar( const Mat& X, const Mat& Y, Mat& Mag, Mat& Angle, bool angleIn
NAryMatIterator it(arrays, planes);
for( int i = 0; i < it.nplanes; i++, ++it )
cartToPolar( it.planes[0], it.planes[1], it.planes[2], it.planes[2], angleInDegrees );
cartToPolar( it.planes[0], it.planes[1], it.planes[2], it.planes[3], angleInDegrees );
return;
}
@@ -604,7 +604,7 @@ void polarToCart( const Mat& Mag, const Mat& Angle, Mat& X, Mat& Y, bool angleIn
NAryMatIterator it(arrays, planes);
for( int i = 0; i < it.nplanes; i++, ++it )
polarToCart( it.planes[0], it.planes[1], it.planes[2], it.planes[2], angleInDegrees );
polarToCart( it.planes[0], it.planes[1], it.planes[2], it.planes[3], angleInDegrees );
return;
}