From 91a9923dcf89af8492d116fb12ab5aeaf1b679f7 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Fri, 9 Nov 2012 09:40:19 +0400 Subject: [PATCH] Face detection package name replaced on org.opencv.facedetect for consistency with Google Play package. --- .../face-detection/AndroidManifest.xml | 2 +- .../jni/DetectionBasedTracker_jni.cpp | 36 +++++++++---------- .../jni/DetectionBasedTracker_jni.h | 12 +++---- .../DetectionBasedTracker.java | 2 +- .../{fd => facedetect}/FdActivity.java | 2 +- .../samples/{fd => facedetect}/FpsMeter.java | 2 +- 6 files changed, 28 insertions(+), 28 deletions(-) rename samples/android/face-detection/src/org/opencv/samples/{fd => facedetect}/DetectionBasedTracker.java (96%) rename samples/android/face-detection/src/org/opencv/samples/{fd => facedetect}/FdActivity.java (99%) rename samples/android/face-detection/src/org/opencv/samples/{fd => facedetect}/FpsMeter.java (97%) diff --git a/samples/android/face-detection/AndroidManifest.xml b/samples/android/face-detection/AndroidManifest.xml index eaa90dfd0..a52dc660e 100644 --- a/samples/android/face-detection/AndroidManifest.xml +++ b/samples/android/face-detection/AndroidManifest.xml @@ -1,6 +1,6 @@ diff --git a/samples/android/face-detection/jni/DetectionBasedTracker_jni.cpp b/samples/android/face-detection/jni/DetectionBasedTracker_jni.cpp index 976f1683c..2ade0ca98 100644 --- a/samples/android/face-detection/jni/DetectionBasedTracker_jni.cpp +++ b/samples/android/face-detection/jni/DetectionBasedTracker_jni.cpp @@ -18,10 +18,10 @@ inline void vector_Rect_to_Mat(vector& v_rect, Mat& mat) mat = Mat(v_rect, true); } -JNIEXPORT jlong JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeCreateObject +JNIEXPORT jlong JNICALL Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeCreateObject (JNIEnv * jenv, jclass, jstring jFileName, jint faceSize) { - LOGD("Java_org_opencv_samples_fd_DetectionBasedTracker_nativeCreateObject enter"); + LOGD("Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeCreateObject enter"); const char* jnamestr = jenv->GetStringUTFChars(jFileName, NULL); string stdFileName(jnamestr); jlong result = 0; @@ -49,14 +49,14 @@ JNIEXPORT jlong JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeC return 0; } - LOGD("Java_org_opencv_samples_fd_DetectionBasedTracker_nativeCreateObject exit"); + LOGD("Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeCreateObject exit"); return result; } -JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeDestroyObject +JNIEXPORT void JNICALL Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeDestroyObject (JNIEnv * jenv, jclass, jlong thiz) { - LOGD("Java_org_opencv_samples_fd_DetectionBasedTracker_nativeDestroyObject enter"); + LOGD("Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeDestroyObject enter"); try { if(thiz != 0) @@ -79,13 +79,13 @@ JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeDe jclass je = jenv->FindClass("java/lang/Exception"); jenv->ThrowNew(je, "Unknown exception in JNI code {highgui::VideoCapture_n_1VideoCapture__()}"); } - LOGD("Java_org_opencv_samples_fd_DetectionBasedTracker_nativeDestroyObject exit"); + LOGD("Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeDestroyObject exit"); } -JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeStart +JNIEXPORT void JNICALL Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeStart (JNIEnv * jenv, jclass, jlong thiz) { - LOGD("Java_org_opencv_samples_fd_DetectionBasedTracker_nativeStart enter"); + LOGD("Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeStart enter"); try { ((DetectionBasedTracker*)thiz)->run(); @@ -104,13 +104,13 @@ JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeSt jclass je = jenv->FindClass("java/lang/Exception"); jenv->ThrowNew(je, "Unknown exception in JNI code {highgui::VideoCapture_n_1VideoCapture__()}"); } - LOGD("Java_org_opencv_samples_fd_DetectionBasedTracker_nativeStart exit"); + LOGD("Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeStart exit"); } -JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeStop +JNIEXPORT void JNICALL Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeStop (JNIEnv * jenv, jclass, jlong thiz) { - LOGD("Java_org_opencv_samples_fd_DetectionBasedTracker_nativeStop enter"); + LOGD("Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeStop enter"); try { ((DetectionBasedTracker*)thiz)->stop(); @@ -129,13 +129,13 @@ JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeSt jclass je = jenv->FindClass("java/lang/Exception"); jenv->ThrowNew(je, "Unknown exception in JNI code {highgui::VideoCapture_n_1VideoCapture__()}"); } - LOGD("Java_org_opencv_samples_fd_DetectionBasedTracker_nativeStop exit"); + LOGD("Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeStop exit"); } -JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeSetFaceSize +JNIEXPORT void JNICALL Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeSetFaceSize (JNIEnv * jenv, jclass, jlong thiz, jint faceSize) { - LOGD("Java_org_opencv_samples_fd_DetectionBasedTracker_nativeSetFaceSize enter"); + LOGD("Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeSetFaceSize enter"); try { if (faceSize > 0) @@ -160,14 +160,14 @@ JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeSe jclass je = jenv->FindClass("java/lang/Exception"); jenv->ThrowNew(je, "Unknown exception in JNI code {highgui::VideoCapture_n_1VideoCapture__()}"); } - LOGD("Java_org_opencv_samples_fd_DetectionBasedTracker_nativeSetFaceSize exit"); + LOGD("Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeSetFaceSize exit"); } -JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeDetect +JNIEXPORT void JNICALL Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeDetect (JNIEnv * jenv, jclass, jlong thiz, jlong imageGray, jlong faces) { - LOGD("Java_org_opencv_samples_fd_DetectionBasedTracker_nativeDetect enter"); + LOGD("Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeDetect enter"); try { vector RectFaces; @@ -189,5 +189,5 @@ JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeDe jclass je = jenv->FindClass("java/lang/Exception"); jenv->ThrowNew(je, "Unknown exception in JNI code {highgui::VideoCapture_n_1VideoCapture__()}"); } - LOGD("Java_org_opencv_samples_fd_DetectionBasedTracker_nativeDetect exit"); + LOGD("Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeDetect exit"); } \ No newline at end of file diff --git a/samples/android/face-detection/jni/DetectionBasedTracker_jni.h b/samples/android/face-detection/jni/DetectionBasedTracker_jni.h index 7ae94c3dd..7e0541d81 100644 --- a/samples/android/face-detection/jni/DetectionBasedTracker_jni.h +++ b/samples/android/face-detection/jni/DetectionBasedTracker_jni.h @@ -12,7 +12,7 @@ extern "C" { * Method: nativeCreateObject * Signature: (Ljava/lang/String;F)J */ -JNIEXPORT jlong JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeCreateObject +JNIEXPORT jlong JNICALL Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeCreateObject (JNIEnv *, jclass, jstring, jint); /* @@ -20,7 +20,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeC * Method: nativeDestroyObject * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeDestroyObject +JNIEXPORT void JNICALL Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeDestroyObject (JNIEnv *, jclass, jlong); /* @@ -28,7 +28,7 @@ JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeDe * Method: nativeStart * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeStart +JNIEXPORT void JNICALL Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeStart (JNIEnv *, jclass, jlong); /* @@ -36,7 +36,7 @@ JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeSt * Method: nativeStop * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeStop +JNIEXPORT void JNICALL Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeStop (JNIEnv *, jclass, jlong); /* @@ -44,7 +44,7 @@ JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeSt * Method: nativeSetFaceSize * Signature: (JI)V */ - JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeSetFaceSize + JNIEXPORT void JNICALL Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeSetFaceSize (JNIEnv *, jclass, jlong, jint); /* @@ -52,7 +52,7 @@ JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeSt * Method: nativeDetect * Signature: (JJJ)V */ -JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeDetect +JNIEXPORT void JNICALL Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeDetect (JNIEnv *, jclass, jlong, jlong, jlong); #ifdef __cplusplus diff --git a/samples/android/face-detection/src/org/opencv/samples/fd/DetectionBasedTracker.java b/samples/android/face-detection/src/org/opencv/samples/facedetect/DetectionBasedTracker.java similarity index 96% rename from samples/android/face-detection/src/org/opencv/samples/fd/DetectionBasedTracker.java rename to samples/android/face-detection/src/org/opencv/samples/facedetect/DetectionBasedTracker.java index 9e4600543..6179f1bdc 100644 --- a/samples/android/face-detection/src/org/opencv/samples/fd/DetectionBasedTracker.java +++ b/samples/android/face-detection/src/org/opencv/samples/facedetect/DetectionBasedTracker.java @@ -1,4 +1,4 @@ -package org.opencv.samples.fd; +package org.opencv.samples.facedetect; import org.opencv.core.Mat; import org.opencv.core.MatOfRect; diff --git a/samples/android/face-detection/src/org/opencv/samples/fd/FdActivity.java b/samples/android/face-detection/src/org/opencv/samples/facedetect/FdActivity.java similarity index 99% rename from samples/android/face-detection/src/org/opencv/samples/fd/FdActivity.java rename to samples/android/face-detection/src/org/opencv/samples/facedetect/FdActivity.java index 9470a8fd1..2b949629c 100644 --- a/samples/android/face-detection/src/org/opencv/samples/fd/FdActivity.java +++ b/samples/android/face-detection/src/org/opencv/samples/facedetect/FdActivity.java @@ -1,4 +1,4 @@ -package org.opencv.samples.fd; +package org.opencv.samples.facedetect; import java.io.File; import java.io.FileOutputStream; diff --git a/samples/android/face-detection/src/org/opencv/samples/fd/FpsMeter.java b/samples/android/face-detection/src/org/opencv/samples/facedetect/FpsMeter.java similarity index 97% rename from samples/android/face-detection/src/org/opencv/samples/fd/FpsMeter.java rename to samples/android/face-detection/src/org/opencv/samples/facedetect/FpsMeter.java index 2c8f3bc7b..2438bf89a 100644 --- a/samples/android/face-detection/src/org/opencv/samples/fd/FpsMeter.java +++ b/samples/android/face-detection/src/org/opencv/samples/facedetect/FpsMeter.java @@ -1,4 +1,4 @@ -package org.opencv.samples.fd; +package org.opencv.samples.facedetect; import java.text.DecimalFormat;