重新编译aar和binarypb解决不必要的人体遮罩的问题
升级了gradle的版本 移除了弃用的getProto函数
This commit is contained in:
parent
59387de36f
commit
b4df911c64
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="11" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
|
Binary file not shown.
|
@ -1,7 +1,4 @@
|
||||||
|
|
||||||
…ConstantSidePacketCalculator2PACKET:enable_segmentationBI
|
|
||||||
Atype.googleapis.com/mediapipe.ConstantSidePacketCalculatorOptions
|
|
||||||
|
|
||||||
`FlowLimiterCalculatorinput_videoFINISHED:output_video"throttled_input_videoj
|
`FlowLimiterCalculatorinput_videoFINISHED:output_video"throttled_input_videoj
|
||||||
FINISHED
|
FINISHED
|
||||||
×PoseLandmarkGpuIMAGE:throttled_input_video"LANDMARKS:pose_landmarks"#SEGMENTATION_MASK:segmentation_mask"DETECTION:pose_detection"%ROI_FROM_LANDMARKS:roi_from_landmarks*'ENABLE_SEGMENTATION:enable_segmentation
|
×PoseLandmarkGpuIMAGE:throttled_input_video"LANDMARKS:pose_landmarks"#SEGMENTATION_MASK:segmentation_mask"DETECTION:pose_detection"%ROI_FROM_LANDMARKS:roi_from_landmarks*'ENABLE_SEGMENTATION:enable_segmentation
|
||||||
|
|
|
@ -40,7 +40,6 @@ class MainActivity : AppCompatActivity() {
|
||||||
init {
|
init {
|
||||||
// 加载项目中用到的jni库
|
// 加载项目中用到的jni库
|
||||||
System.loadLibrary("mediapipe_jni")
|
System.loadLibrary("mediapipe_jni")
|
||||||
System.loadLibrary("opencv_java3")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
@ -80,7 +79,6 @@ class MainActivity : AppCompatActivity() {
|
||||||
|
|
||||||
processor.videoSurfaceOutput.setFlipY(true)
|
processor.videoSurfaceOutput.setFlipY(true)
|
||||||
|
|
||||||
|
|
||||||
// 捕获获得的坐标数据包
|
// 捕获获得的坐标数据包
|
||||||
// 遇到InvalidProtocolBufferException
|
// 遇到InvalidProtocolBufferException
|
||||||
// 参考 https://github.com/google/mediapipe/issues/1013
|
// 参考 https://github.com/google/mediapipe/issues/1013
|
||||||
|
@ -91,8 +89,13 @@ class MainActivity : AppCompatActivity() {
|
||||||
) {
|
) {
|
||||||
Log.i(tag, "Received Landmark Packets.")
|
Log.i(tag, "Received Landmark Packets.")
|
||||||
try {
|
try {
|
||||||
val landmarkList = PacketGetter.getProto(it, NormalizedLandmarkList::class.java)
|
// 无法采用这种方法获取packet
|
||||||
Log.i(tag, getPoseLandmarksDebugString(landmarkList))
|
// 回报Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 15943 (Thread-9), pid 15810 (o.motioncapture)
|
||||||
|
/*val packetRaw = PacketGetter.getBytes(it)
|
||||||
|
val landmarks = NormalizedLandmarkList.parseFrom(packetRaw)
|
||||||
|
Log.i(tag, getPoseLandmarksDebugString(landmarks))*/
|
||||||
|
val landmarks = PacketGetter.getProto(it, NormalizedLandmarkList.getDefaultInstance())
|
||||||
|
Log.i(tag, getPoseLandmarksDebugString(landmarks))
|
||||||
} catch (exception: InvalidProtocolBufferException) {
|
} catch (exception: InvalidProtocolBufferException) {
|
||||||
Log.e(tag, "failed to get protocol.", exception)
|
Log.e(tag, "failed to get protocol.", exception)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.android.application' version '7.3.1' apply false
|
id 'com.android.application' version '7.4.0' apply false
|
||||||
id 'com.android.library' version '7.3.1' apply false
|
id 'com.android.library' version '7.4.0' apply false
|
||||||
id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
|
id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
|
||||||
}
|
}
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,6 @@
|
||||||
#Sat Jan 07 16:28:48 CST 2023
|
#Sat Jan 07 16:28:48 CST 2023
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|
Loading…
Reference in New Issue
Block a user