修改MainActivity 文件名为 FaceActivity
@@ -58,7 +58,7 @@ dependencies {
|
||||
testImplementation libs.junit
|
||||
androidTestImplementation libs.ext.junit
|
||||
androidTestImplementation libs.espresso.core
|
||||
implementation 'com.google.mediapipe:tasks-vision:0.10.26'
|
||||
//implementation 'com.google.mediapipe:tasks-vision:0.10.26'
|
||||
def camerax_version = '1.4.2'
|
||||
implementation "androidx.camera:camera-core:$camerax_version"
|
||||
implementation "androidx.camera:camera-camera2:$camerax_version"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.Sample">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:name=".FaceActivity"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
@@ -87,7 +87,7 @@ void processWithVulkan(uint8_t* data, int width, int height, int format,
|
||||
|
||||
extern "C"
|
||||
JNIEXPORT void JNICALL
|
||||
Java_com_hmwl_sample_MainActivity_processImageNative(JNIEnv *env, jobject thiz, jobject buffer,
|
||||
Java_com_hmwl_sample_FaceActivity_processImageNative(JNIEnv *env, jobject thiz, jobject buffer,
|
||||
jint width, jint height, jint format,
|
||||
jint row_stride, jint pixel_stride,
|
||||
jint rotation) {
|
||||
@@ -107,7 +107,7 @@ Java_com_hmwl_sample_MainActivity_processImageNative(JNIEnv *env, jobject thiz,
|
||||
|
||||
extern "C"
|
||||
JNIEXPORT void JNICALL
|
||||
Java_com_hmwl_sample_MainActivity_passDataToNative(JNIEnv *env, jobject thiz, jobject buffer,
|
||||
Java_com_hmwl_sample_FaceActivity_passDataToNative(JNIEnv *env, jobject thiz, jobject buffer,
|
||||
jint point_count, jint width, jint height) {
|
||||
float* pos = static_cast<float*>(env->GetDirectBufferAddress(buffer));
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class MainActivity extends GameActivity implements FaceLandmarkerHelper.LandmarkerListener {
|
||||
public class FaceActivity extends GameActivity implements FaceLandmarkerHelper.LandmarkerListener {
|
||||
private static final String TAG = "MainActivity";
|
||||
|
||||
static {
|
||||
@@ -188,8 +188,8 @@ public class MainActivity extends GameActivity implements FaceLandmarkerHelper.L
|
||||
1,
|
||||
0,
|
||||
RunningMode.LIVE_STREAM,
|
||||
MainActivity.this,
|
||||
MainActivity.this
|
||||
FaceActivity.this,
|
||||
FaceActivity.this
|
||||
);
|
||||
}
|
||||
});
|
||||
|
After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 982 B |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 56 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 96 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |