fixed a few problems detected by Xcode 4.2.1

This commit is contained in:
Vadim Pisarevsky
2012-02-15 19:48:04 +00:00
parent ada6ab3778
commit 716a5d04ab
15 changed files with 34 additions and 121 deletions

View File

@@ -135,7 +135,7 @@ cvCreateGLCM( const IplImage* srcImage,
}
CV_CALL( newGLCM = (CvGLCM*)cvAlloc(sizeof(newGLCM)));
memset( newGLCM, 0, sizeof(newGLCM) );
memset( newGLCM, 0, sizeof(*newGLCM) );
newGLCM->matrices = 0;
newGLCM->numMatrices = numStepDirections;
@@ -515,8 +515,8 @@ icvCreateGLCMDescriptors_AllowDoubleNest( CvGLCM* destGLCM, int matrixIndex )
correlationStdDeviation += (actualSideLoop1-correlationMean) * (actualSideLoop1-correlationMean) * sideEntryValueSum;
}
HXY1 =- HXY1;
HXY2 =- HXY2;
HXY1 = -HXY1;
HXY2 = -HXY2;
descriptors[ CV_GLCMDESC_CORRELATIONINFO1 ] = ( HXY - HXY1 ) / ( correlationMean );
descriptors[ CV_GLCMDESC_CORRELATIONINFO2 ] = sqrt( 1.0 - exp( -2.0 * (HXY2 - HXY ) ) );