fixed error due to index out of bounds while logging keypoint
This commit is contained in:
parent
482fc13826
commit
a0b7a5318e
|
@ -143,14 +143,14 @@ public class MainActivity extends AppCompatActivity {
|
||||||
|
|
||||||
private void logExampleKeypoint(
|
private void logExampleKeypoint(
|
||||||
PoseTrackingResult result) {
|
PoseTrackingResult result) {
|
||||||
if (result.multiPoseTrackings().isEmpty()) {
|
if (result.multiPoseLandmarks().isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LandmarkProto.Landmark exampleLandmark = result.multiPoseLandmarks().get(0);
|
LandmarkProto.Landmark exampleLandmark = result.multiPoseLandmarks().get(PoseTrackingResult.NOSE);
|
||||||
Log.i(
|
Log.i(
|
||||||
TAG,
|
TAG,
|
||||||
String.format(
|
String.format(
|
||||||
"Pose Landmark Landmark at index 0: x=%f, y=%f, z=%f",
|
"Pose Landmark Landmark of Nose: x=%f, y=%f, z=%f",
|
||||||
exampleLandmark.getX() , exampleLandmark.getY(),exampleLandmark.getZ() ));
|
exampleLandmark.getX() , exampleLandmark.getY(),exampleLandmark.getZ() ));
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user