Java API: corrected names of methods in Utils class; fixed bug in DMatch (thank for Hussein Abdinoor); added new utility method loadResource

This commit is contained in:
Andrey Kamaev
2011-08-09 11:46:27 +00:00
parent 13e392763b
commit d9d74678a9
11 changed files with 125 additions and 76 deletions

View File

@@ -26,7 +26,7 @@ public class OpenCVTestRunner extends InstrumentationTestRunner {
private AndroidTestRunner androidTestRunner;
private static String TAG = "opencv_test_java";
public static String getTempFileName(String extension)
{
File cache = context.getCacheDir();
@@ -46,7 +46,7 @@ public class OpenCVTestRunner extends InstrumentationTestRunner {
static public void Log(String message) {
Log.e(TAG, message);
}
static public void Log(Mat m) {
Log.e(TAG, m + "\n " + m.dump());
}
@@ -54,12 +54,13 @@ public class OpenCVTestRunner extends InstrumentationTestRunner {
@Override
public void onStart() {
context = getContext();
LENA_PATH = Utils.ExportResource(context, R.drawable.lena);
CHESS_PATH = Utils.ExportResource(context, R.drawable.chessboard);
LBPCASCADE_FRONTALFACE_PATH = Utils.ExportResource(context, R.raw.lbpcascade_frontalface);
LENA_PATH = Utils.exportResource(context, R.drawable.lena);
CHESS_PATH = Utils.exportResource(context, R.drawable.chessboard);
LBPCASCADE_FRONTALFACE_PATH = Utils.exportResource(context, R.raw.lbpcascade_frontalface);
/*
* The original idea about test order randomization is from marek.defecinski blog.
* The original idea about test order randomization is from
* marek.defecinski blog.
*/
// List<TestCase> testCases = androidTestRunner.getTestCases();
// Collections.shuffle(testCases); //shuffle the tests order
@@ -72,7 +73,7 @@ public class OpenCVTestRunner extends InstrumentationTestRunner {
androidTestRunner = super.getAndroidTestRunner();
return androidTestRunner;
}
public static String getOutputFileName(String name)
{
return context.getExternalFilesDir(null).getAbsolutePath() + File.separatorChar + name;

View File

@@ -16,6 +16,14 @@ public class UtilsTest extends OpenCVTestCase {
fail("Not yet implemented");
}
public void testLoadResourceContextInt() {
fail("Not yet implemented");
}
public void testLoadResourceContextIntInt() {
fail("Not yet implemented");
}
public void testMatToBitmap() {
fail("Not yet implemented");
}