-
-
Notifications
You must be signed in to change notification settings - Fork 450
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(example): enable to get pose world landmarks
- Loading branch information
Showing
12 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
Packages/com.github.homuler.mediapipe/Runtime/Scripts/Framework/Packet/LandmarkListPacket.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System; | ||
|
||
namespace Mediapipe { | ||
public class LandmarkListPacket : Packet<LandmarkList> { | ||
public LandmarkListPacket() : base() {} | ||
public LandmarkListPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) {} | ||
|
||
public override LandmarkList Get() { | ||
UnsafeNativeMethods.mp_Packet__GetLandmarkList(mpPtr, out var serializedProtoPtr).Assert(); | ||
GC.KeepAlive(this); | ||
|
||
var landmarkList = Protobuf.DeserializeProto<LandmarkList>(serializedProtoPtr, LandmarkList.Parser); | ||
UnsafeNativeMethods.mp_api_SerializedProto__delete(serializedProtoPtr); | ||
|
||
return landmarkList; | ||
} | ||
|
||
public override StatusOr<LandmarkList> Consume() { | ||
throw new NotSupportedException(); | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
.../com.github.homuler.mediapipe/Runtime/Scripts/Framework/Packet/LandmarkListPacket.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
...com.github.homuler.mediapipe/Runtime/Scripts/Framework/Packet/LandmarkListVectorPacket.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace Mediapipe { | ||
public class LandmarkListVectorPacket : Packet<List<LandmarkList>> { | ||
public LandmarkListVectorPacket() : base() {} | ||
public LandmarkListVectorPacket(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) {} | ||
|
||
public override List<LandmarkList> Get() { | ||
UnsafeNativeMethods.mp_Packet__GetLandmarkListVector(mpPtr, out var serializedProtoVectorPtr).Assert(); | ||
GC.KeepAlive(this); | ||
|
||
var landmarkLists = Protobuf.DeserializeProtoVector<LandmarkList>(serializedProtoVectorPtr, LandmarkList.Parser); | ||
UnsafeNativeMethods.mp_api_SerializedProtoVector__delete(serializedProtoVectorPtr); | ||
|
||
return landmarkLists; | ||
} | ||
|
||
public override StatusOr<List<LandmarkList>> Consume() { | ||
throw new NotSupportedException(); | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...ithub.homuler.mediapipe/Runtime/Scripts/Framework/Packet/LandmarkListVectorPacket.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
abbade0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank You!
abbade0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any tips on how to get this working and showing when using the Holistic graph example?