core:ppc Fix java CoreTest/testMahalanobis (#11677)

* core:ppc Fix java CoreTest/testMahalanobis

* core:ppc Fix warning unused variable on clang
This commit is contained in:
Sayed Adel 2018-06-07 14:16:48 +03:00 committed by Vadim Pisarevsky
parent 8542887257
commit e0d28aa893
2 changed files with 7 additions and 4 deletions

View File

@ -947,12 +947,16 @@ public class CoreTest extends OpenCVTestCase {
}
public void testMahalanobis() {
Mat src = new Mat(matSize, matSize, CvType.CV_32F);
Core.randu(src, -128, 128);
Mat covar = new Mat(matSize, matSize, CvType.CV_32F);
Mat mean = new Mat(1, matSize, CvType.CV_32F);
Core.calcCovarMatrix(grayRnd_32f, covar, mean, Core.COVAR_ROWS | Core.COVAR_NORMAL, CvType.CV_32F);
Core.calcCovarMatrix(src, covar, mean, Core.COVAR_ROWS | Core.COVAR_NORMAL, CvType.CV_32F);
covar = covar.inv();
Mat line1 = grayRnd_32f.row(0);
Mat line2 = grayRnd_32f.row(1);
Mat line1 = src.row(0);
Mat line2 = src.row(1);
double d = Core.Mahalanobis(line1, line1, covar);

View File

@ -739,7 +739,6 @@ int64 getCPUTickCount(void)
int64 getCPUTickCount(void)
{
int64 result = 0;
unsigned upper, lower, tmp;
__asm__ volatile(
"0: \n"