Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
b5e009eb
Commit
b5e009eb
authored
Nov 13, 2012
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #144 from asmorkalov/fd_package_fix_2.4
parents
64847325
91a9923d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
28 deletions
+29
-28
AndroidManifest.xml
samples/android/face-detection/AndroidManifest.xml
+1
-1
DetectionBasedTracker_jni.cpp
.../android/face-detection/jni/DetectionBasedTracker_jni.cpp
+19
-18
DetectionBasedTracker_jni.h
...es/android/face-detection/jni/DetectionBasedTracker_jni.h
+6
-6
DetectionBasedTracker.java
.../org/opencv/samples/facedetect/DetectionBasedTracker.java
+1
-1
FdActivity.java
...tection/src/org/opencv/samples/facedetect/FdActivity.java
+1
-1
FpsMeter.java
...detection/src/org/opencv/samples/facedetect/FpsMeter.java
+1
-1
No files found.
samples/android/face-detection/AndroidManifest.xml
View file @
b5e009eb
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"org.opencv.samples.f
d
"
package=
"org.opencv.samples.f
acedetect
"
android:versionCode=
"21"
android:versionName=
"2.1"
>
...
...
samples/android/face-detection/jni/DetectionBasedTracker_jni.cpp
View file @
b5e009eb
...
...
@@ -18,10 +18,10 @@ inline void vector_Rect_to_Mat(vector<Rect>& v_rect, Mat& mat)
mat
=
Mat
(
v_rect
,
true
);
}
JNIEXPORT
jlong
JNICALL
Java_org_opencv_samples_f
d
_DetectionBasedTracker_nativeCreateObject
JNIEXPORT
jlong
JNICALL
Java_org_opencv_samples_f
acedetect
_DetectionBasedTracker_nativeCreateObject
(
JNIEnv
*
jenv
,
jclass
,
jstring
jFileName
,
jint
faceSize
)
{
LOGD
(
"Java_org_opencv_samples_f
d
_DetectionBasedTracker_nativeCreateObject enter"
);
LOGD
(
"Java_org_opencv_samples_f
acedetect
_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_f
d
_DetectionBasedTracker_nativeCreateObject exit"
);
LOGD
(
"Java_org_opencv_samples_f
acedetect
_DetectionBasedTracker_nativeCreateObject exit"
);
return
result
;
}
JNIEXPORT
void
JNICALL
Java_org_opencv_samples_f
d
_DetectionBasedTracker_nativeDestroyObject
JNIEXPORT
void
JNICALL
Java_org_opencv_samples_f
acedetect
_DetectionBasedTracker_nativeDestroyObject
(
JNIEnv
*
jenv
,
jclass
,
jlong
thiz
)
{
LOGD
(
"Java_org_opencv_samples_f
d
_DetectionBasedTracker_nativeDestroyObject enter"
);
LOGD
(
"Java_org_opencv_samples_f
acedetect
_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_f
d
_DetectionBasedTracker_nativeDestroyObject exit"
);
LOGD
(
"Java_org_opencv_samples_f
acedetect
_DetectionBasedTracker_nativeDestroyObject exit"
);
}
JNIEXPORT
void
JNICALL
Java_org_opencv_samples_f
d
_DetectionBasedTracker_nativeStart
JNIEXPORT
void
JNICALL
Java_org_opencv_samples_f
acedetect
_DetectionBasedTracker_nativeStart
(
JNIEnv
*
jenv
,
jclass
,
jlong
thiz
)
{
LOGD
(
"Java_org_opencv_samples_f
d
_DetectionBasedTracker_nativeStart enter"
);
LOGD
(
"Java_org_opencv_samples_f
acedetect
_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_f
d
_DetectionBasedTracker_nativeStart exit"
);
LOGD
(
"Java_org_opencv_samples_f
acedetect
_DetectionBasedTracker_nativeStart exit"
);
}
JNIEXPORT
void
JNICALL
Java_org_opencv_samples_f
d
_DetectionBasedTracker_nativeStop
JNIEXPORT
void
JNICALL
Java_org_opencv_samples_f
acedetect
_DetectionBasedTracker_nativeStop
(
JNIEnv
*
jenv
,
jclass
,
jlong
thiz
)
{
LOGD
(
"Java_org_opencv_samples_f
d
_DetectionBasedTracker_nativeStop enter"
);
LOGD
(
"Java_org_opencv_samples_f
acedetect
_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_f
d
_DetectionBasedTracker_nativeStop exit"
);
LOGD
(
"Java_org_opencv_samples_f
acedetect
_DetectionBasedTracker_nativeStop exit"
);
}
JNIEXPORT
void
JNICALL
Java_org_opencv_samples_f
d
_DetectionBasedTracker_nativeSetFaceSize
JNIEXPORT
void
JNICALL
Java_org_opencv_samples_f
acedetect
_DetectionBasedTracker_nativeSetFaceSize
(
JNIEnv
*
jenv
,
jclass
,
jlong
thiz
,
jint
faceSize
)
{
LOGD
(
"Java_org_opencv_samples_f
d
_DetectionBasedTracker_nativeSetFaceSize enter"
);
LOGD
(
"Java_org_opencv_samples_f
acedetect
_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_f
d
_DetectionBasedTracker_nativeSetFaceSize exit"
);
LOGD
(
"Java_org_opencv_samples_f
acedetect
_DetectionBasedTracker_nativeSetFaceSize exit"
);
}
JNIEXPORT
void
JNICALL
Java_org_opencv_samples_f
d
_DetectionBasedTracker_nativeDetect
JNIEXPORT
void
JNICALL
Java_org_opencv_samples_f
acedetect
_DetectionBasedTracker_nativeDetect
(
JNIEnv
*
jenv
,
jclass
,
jlong
thiz
,
jlong
imageGray
,
jlong
faces
)
{
LOGD
(
"Java_org_opencv_samples_f
d
_DetectionBasedTracker_nativeDetect enter"
);
LOGD
(
"Java_org_opencv_samples_f
acedetect
_DetectionBasedTracker_nativeDetect enter"
);
try
{
vector
<
Rect
>
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_f
d
_DetectionBasedTracker_nativeDetect exit"
);
LOGD
(
"Java_org_opencv_samples_f
acedetect
_DetectionBasedTracker_nativeDetect exit"
);
}
\ No newline at end of file
samples/android/face-detection/jni/DetectionBasedTracker_jni.h
View file @
b5e009eb
...
...
@@ -12,7 +12,7 @@ extern "C" {
* Method: nativeCreateObject
* Signature: (Ljava/lang/String;F)J
*/
JNIEXPORT
jlong
JNICALL
Java_org_opencv_samples_f
d
_DetectionBasedTracker_nativeCreateObject
JNIEXPORT
jlong
JNICALL
Java_org_opencv_samples_f
acedetect
_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_f
d
_DetectionBasedTracker_nativeDestroyObject
JNIEXPORT
void
JNICALL
Java_org_opencv_samples_f
acedetect
_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_f
d
_DetectionBasedTracker_nativeStart
JNIEXPORT
void
JNICALL
Java_org_opencv_samples_f
acedetect
_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_f
d
_DetectionBasedTracker_nativeStop
JNIEXPORT
void
JNICALL
Java_org_opencv_samples_f
acedetect
_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_f
d
_DetectionBasedTracker_nativeSetFaceSize
JNIEXPORT
void
JNICALL
Java_org_opencv_samples_f
acedetect
_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_f
d
_DetectionBasedTracker_nativeDetect
JNIEXPORT
void
JNICALL
Java_org_opencv_samples_f
acedetect
_DetectionBasedTracker_nativeDetect
(
JNIEnv
*
,
jclass
,
jlong
,
jlong
,
jlong
);
#ifdef __cplusplus
...
...
samples/android/face-detection/src/org/opencv/samples/f
d
/DetectionBasedTracker.java
→
samples/android/face-detection/src/org/opencv/samples/f
acedetect
/DetectionBasedTracker.java
View file @
b5e009eb
package
org
.
opencv
.
samples
.
f
d
;
package
org
.
opencv
.
samples
.
f
acedetect
;
import
org.opencv.core.Mat
;
import
org.opencv.core.MatOfRect
;
...
...
samples/android/face-detection/src/org/opencv/samples/f
d
/FdActivity.java
→
samples/android/face-detection/src/org/opencv/samples/f
acedetect
/FdActivity.java
View file @
b5e009eb
package
org
.
opencv
.
samples
.
f
d
;
package
org
.
opencv
.
samples
.
f
acedetect
;
import
java.io.File
;
import
java.io.FileOutputStream
;
...
...
samples/android/face-detection/src/org/opencv/samples/f
d
/FpsMeter.java
→
samples/android/face-detection/src/org/opencv/samples/f
acedetect
/FpsMeter.java
View file @
b5e009eb
package
org
.
opencv
.
samples
.
f
d
;
package
org
.
opencv
.
samples
.
f
acedetect
;
import
java.text.DecimalFormat
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment