mirror of
https://github.com/opencv/opencv.git
synced 2025-01-19 06:53:50 +08:00
Face Detection sample namespace replaced on org.opencv.facedetect for consistency with Google Play.
This commit is contained in:
parent
4d059e9e5b
commit
95b7f5c46c
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.opencv.samples.fd"
|
||||
package="org.opencv.samples.facedetect"
|
||||
android:versionCode="21"
|
||||
android:versionName="2.1">
|
||||
|
||||
|
@ -65,15 +65,15 @@ struct DetectorAgregator
|
||||
}
|
||||
};
|
||||
|
||||
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;
|
||||
|
||||
LOGD("Java_org_opencv_samples_fd_DetectionBasedTracker_nativeCreateObject");
|
||||
LOGD("Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeCreateObject");
|
||||
|
||||
try
|
||||
{
|
||||
@ -98,18 +98,18 @@ JNIEXPORT jlong JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeC
|
||||
{
|
||||
LOGD("nativeCreateObject catched unknown exception");
|
||||
jclass je = jenv->FindClass("java/lang/Exception");
|
||||
jenv->ThrowNew(je, "Unknown exception in JNI code {Java_org_opencv_samples_fd_DetectionBasedTracker_nativeCreateObject(...)}");
|
||||
jenv->ThrowNew(je, "Unknown exception in JNI code {Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeCreateObject(...)}");
|
||||
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");
|
||||
LOGD("Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeDestroyObject");
|
||||
|
||||
try
|
||||
{
|
||||
@ -131,15 +131,15 @@ JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeDe
|
||||
{
|
||||
LOGD("nativeDestroyObject catched unknown exception");
|
||||
jclass je = jenv->FindClass("java/lang/Exception");
|
||||
jenv->ThrowNew(je, "Unknown exception in JNI code {Java_org_opencv_samples_fd_DetectionBasedTracker_nativeDestroyObject(...)}");
|
||||
jenv->ThrowNew(je, "Unknown exception in JNI code {Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeDestroyObject(...)}");
|
||||
}
|
||||
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");
|
||||
LOGD("Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeStart");
|
||||
|
||||
try
|
||||
{
|
||||
@ -157,15 +157,15 @@ JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeSt
|
||||
{
|
||||
LOGD("nativeStart catched unknown exception");
|
||||
jclass je = jenv->FindClass("java/lang/Exception");
|
||||
jenv->ThrowNew(je, "Unknown exception in JNI code {Java_org_opencv_samples_fd_DetectionBasedTracker_nativeStart(...)}");
|
||||
jenv->ThrowNew(je, "Unknown exception in JNI code {Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeStart(...)}");
|
||||
}
|
||||
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");
|
||||
LOGD("Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeStop");
|
||||
|
||||
try
|
||||
{
|
||||
@ -183,15 +183,15 @@ JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeSt
|
||||
{
|
||||
LOGD("nativeStop catched unknown exception");
|
||||
jclass je = jenv->FindClass("java/lang/Exception");
|
||||
jenv->ThrowNew(je, "Unknown exception in JNI code {Java_org_opencv_samples_fd_DetectionBasedTracker_nativeStop(...)}");
|
||||
jenv->ThrowNew(je, "Unknown exception in JNI code {Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeStop(...)}");
|
||||
}
|
||||
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 -- BEGIN");
|
||||
LOGD("Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeSetFaceSize -- BEGIN");
|
||||
|
||||
try
|
||||
{
|
||||
@ -213,16 +213,16 @@ JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeSe
|
||||
{
|
||||
LOGD("nativeSetFaceSize catched unknown exception");
|
||||
jclass je = jenv->FindClass("java/lang/Exception");
|
||||
jenv->ThrowNew(je, "Unknown exception in JNI code {Java_org_opencv_samples_fd_DetectionBasedTracker_nativeSetFaceSize(...)}");
|
||||
jenv->ThrowNew(je, "Unknown exception in JNI code {Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeSetFaceSize(...)}");
|
||||
}
|
||||
LOGD("Java_org_opencv_samples_fd_DetectionBasedTracker_nativeSetFaceSize -- END");
|
||||
LOGD("Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeSetFaceSize -- END");
|
||||
}
|
||||
|
||||
|
||||
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");
|
||||
LOGD("Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeDetect");
|
||||
|
||||
try
|
||||
{
|
||||
@ -243,7 +243,7 @@ JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeDe
|
||||
{
|
||||
LOGD("nativeDetect catched unknown exception");
|
||||
jclass je = jenv->FindClass("java/lang/Exception");
|
||||
jenv->ThrowNew(je, "Unknown exception in JNI code {Java_org_opencv_samples_fd_DetectionBasedTracker_nativeDetect(...)}");
|
||||
jenv->ThrowNew(je, "Unknown exception in JNI code {Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeDetect(...)}");
|
||||
}
|
||||
LOGD("Java_org_opencv_samples_fd_DetectionBasedTracker_nativeDetect END");
|
||||
LOGD("Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeDetect END");
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -1,4 +1,4 @@
|
||||
package org.opencv.samples.fd;
|
||||
package org.opencv.samples.facedetect;
|
||||
|
||||
import org.opencv.core.Mat;
|
||||
import org.opencv.core.MatOfRect;
|
@ -1,4 +1,4 @@
|
||||
package org.opencv.samples.fd;
|
||||
package org.opencv.samples.facedetect;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
@ -1,4 +1,4 @@
|
||||
package org.opencv.samples.fd;
|
||||
package org.opencv.samples.facedetect;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
|
Loading…
Reference in New Issue
Block a user