重新编译aar和binarypb解决不必要的人体遮罩的问题
升级了gradle的版本 移除了弃用的getProto函数
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
|
||||
<EFBFBD>ConstantSidePacketCalculator2PACKET:enable_segmentationBI
|
||||
Atype.googleapis.com/mediapipe.ConstantSidePacketCalculatorOptions
|
||||
|
||||
`FlowLimiterCalculatorinput_videoFINISHED:output_video"throttled_input_videoj
|
||||
FINISHED
|
||||
<EFBFBD>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 {
|
||||
// 加载项目中用到的jni库
|
||||
System.loadLibrary("mediapipe_jni")
|
||||
System.loadLibrary("opencv_java3")
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
@@ -80,7 +79,6 @@ class MainActivity : AppCompatActivity() {
|
||||
|
||||
processor.videoSurfaceOutput.setFlipY(true)
|
||||
|
||||
|
||||
// 捕获获得的坐标数据包
|
||||
// 遇到InvalidProtocolBufferException
|
||||
// 参考 https://github.com/google/mediapipe/issues/1013
|
||||
@@ -91,8 +89,13 @@ class MainActivity : AppCompatActivity() {
|
||||
) {
|
||||
Log.i(tag, "Received Landmark Packets.")
|
||||
try {
|
||||
val landmarkList = PacketGetter.getProto(it, NormalizedLandmarkList::class.java)
|
||||
Log.i(tag, getPoseLandmarksDebugString(landmarkList))
|
||||
// 无法采用这种方法获取packet
|
||||
// 回报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) {
|
||||
Log.e(tag, "failed to get protocol.", exception)
|
||||
}
|
||||
|
Reference in New Issue
Block a user