mirror of
https://github.com/opencv/opencv.git
synced 2025-06-12 20:42:53 +08:00
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:
parent
8542887257
commit
e0d28aa893
@ -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)
|
|||||||
|
|
||||||
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"
|
||||||
|
Loading…
Reference in New Issue
Block a user