Commit e0d28aa8 authored by Sayed Adel's avatar Sayed Adel Committed by Vadim Pisarevsky

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

* core:ppc Fix java CoreTest/testMahalanobis

* core:ppc Fix warning unused variable on clang
parent 85428872
...@@ -947,12 +947,16 @@ public class CoreTest extends OpenCVTestCase { ...@@ -947,12 +947,16 @@ public class CoreTest extends OpenCVTestCase {
} }
public void testMahalanobis() { 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 covar = new Mat(matSize, matSize, CvType.CV_32F);
Mat mean = new Mat(1, 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(); 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); double d = Core.Mahalanobis(line1, line1, covar);
......
...@@ -739,7 +739,6 @@ int64 getCPUTickCount(void) ...@@ -739,7 +739,6 @@ int64 getCPUTickCount(void)
int64 getCPUTickCount(void) int64 getCPUTickCount(void)
{ {
int64 result = 0;
unsigned upper, lower, tmp; unsigned upper, lower, tmp;
__asm__ volatile( __asm__ volatile(
"0: \n" "0: \n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment