From: Andrey Kamaev Date: Thu, 17 Jan 2013 14:36:57 +0000 (+0400) Subject: Merge branch 2.4 X-Git-Tag: submit/tizen_ivi/20141117.190038~2^2~1204 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dc0788c864e6ae0d8e9db6a521d7346563015b97;p=profile%2Fivi%2Fopencv.git Merge branch 2.4 --- dc0788c864e6ae0d8e9db6a521d7346563015b97 diff --cc modules/java/java_test/build.xml index 0000000,49d2bf1..5843f74 mode 000000,100644..100644 --- a/modules/java/java_test/build.xml +++ b/modules/java/java_test/build.xml @@@ -1,0 -1,58 +1,58 @@@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - ++ + + + + + + + + + + + + + + + + + + diff --cc modules/java/java_test/src/org/opencv/test/OpenCVTestRunner.java index 0000000,4d05304..455f953 mode 000000,100644..100644 --- a/modules/java/java_test/src/org/opencv/test/OpenCVTestRunner.java +++ b/modules/java/java_test/src/org/opencv/test/OpenCVTestRunner.java @@@ -1,0 -1,44 +1,44 @@@ + package org.opencv.test; + + import java.io.File; + import java.io.IOException; + import junit.framework.Assert; + + import org.opencv.core.Mat; + + public class OpenCVTestRunner { + public static String LENA_PATH = ""; + public static String CHESS_PATH = ""; + public static String LBPCASCADE_FRONTALFACE_PATH = ""; + + private static String TAG = "opencv_test_java"; + + + public static String getTempFileName(String extension) + { + if (!extension.startsWith(".")) + extension = "." + extension; + try { + File tmp = File.createTempFile("OpenCV", extension); + String path = tmp.getAbsolutePath(); + tmp.delete(); + return path; + } catch (IOException e) { + Log("Failed to get temp file name. Exception is thrown: " + e); + } + return null; + } + + static public void Log(String message) { + System.out.println(TAG + " :: " + message); + } + + static public void Log(Mat m) { + System.out.println(TAG + " :: " + m + "\n " + m.dump()); + } + + public static String getOutputFileName(String name) + { - return getTempFileName(name); ++ return getTempFileName(name); + } + }