Dividing the timestamp by 1000 when returning a "none" result object from GestureRecognizer and HandLandmarker APIs.

PiperOrigin-RevId: 488409077
This commit is contained in:
Jiuqiang Tang 2022-11-14 10:42:06 -08:00 committed by Copybara-Service
parent c7d531ebb2
commit 4b5c3521af
2 changed files with 5 additions and 2 deletions

View File

@ -164,7 +164,9 @@ public final class GestureRecognizer extends BaseVisionTaskApi {
new ArrayList<>(),
new ArrayList<>(),
new ArrayList<>(),
packets.get(HAND_GESTURES_OUT_STREAM_INDEX).getTimestamp());
BaseVisionTaskApi.generateResultTimestampMs(
recognizerOptions.runningMode(),
packets.get(HAND_GESTURES_OUT_STREAM_INDEX)));
}
return GestureRecognizerResult.create(
PacketGetter.getProtoVector(

View File

@ -156,7 +156,8 @@ public final class HandLandmarker extends BaseVisionTaskApi {
new ArrayList<>(),
new ArrayList<>(),
new ArrayList<>(),
packets.get(LANDMARKS_OUT_STREAM_INDEX).getTimestamp());
BaseVisionTaskApi.generateResultTimestampMs(
landmarkerOptions.runningMode(), packets.get(LANDMARKS_OUT_STREAM_INDEX)));
}
return HandLandmarkerResult.create(
PacketGetter.getProtoVector(