Separate web and java api landmark and world landmark to two classes. This makes the platforms interface consistent.
PiperOrigin-RevId: 492332990
This commit is contained in:
committed by
Copybara-Service
parent
ead41132a8
commit
768d2dc548
+2
-2
@@ -28,7 +28,7 @@ import com.google.mediapipe.framework.MediaPipeException;
|
||||
import com.google.mediapipe.framework.image.BitmapImageBuilder;
|
||||
import com.google.mediapipe.framework.image.MPImage;
|
||||
import com.google.mediapipe.tasks.components.containers.Category;
|
||||
import com.google.mediapipe.tasks.components.containers.Landmark;
|
||||
import com.google.mediapipe.tasks.components.containers.NormalizedLandmark;
|
||||
import com.google.mediapipe.tasks.components.containers.proto.LandmarksDetectionResultProto.LandmarksDetectionResult;
|
||||
import com.google.mediapipe.tasks.components.processors.ClassifierOptions;
|
||||
import com.google.mediapipe.tasks.core.BaseOptions;
|
||||
@@ -603,7 +603,7 @@ public class GestureRecognizerTest {
|
||||
assertThat(actualResult.landmarks().get(0))
|
||||
.comparingElementsUsing(
|
||||
Correspondence.from(
|
||||
(Correspondence.BinaryPredicate<Landmark, Landmark>)
|
||||
(Correspondence.BinaryPredicate<NormalizedLandmark, NormalizedLandmark>)
|
||||
(actual, expected) -> {
|
||||
return Correspondence.tolerance(LANDMARKS_ERROR_TOLERANCE)
|
||||
.compare(actual.x(), expected.x())
|
||||
|
||||
+2
-2
@@ -27,7 +27,7 @@ import com.google.mediapipe.framework.MediaPipeException;
|
||||
import com.google.mediapipe.framework.image.BitmapImageBuilder;
|
||||
import com.google.mediapipe.framework.image.MPImage;
|
||||
import com.google.mediapipe.tasks.components.containers.Category;
|
||||
import com.google.mediapipe.tasks.components.containers.Landmark;
|
||||
import com.google.mediapipe.tasks.components.containers.NormalizedLandmark;
|
||||
import com.google.mediapipe.tasks.components.containers.proto.LandmarksDetectionResultProto.LandmarksDetectionResult;
|
||||
import com.google.mediapipe.tasks.core.BaseOptions;
|
||||
import com.google.mediapipe.tasks.vision.core.ImageProcessingOptions;
|
||||
@@ -399,7 +399,7 @@ public class HandLandmarkerTest {
|
||||
assertThat(actualResult.landmarks().get(0))
|
||||
.comparingElementsUsing(
|
||||
Correspondence.from(
|
||||
(Correspondence.BinaryPredicate<Landmark, Landmark>)
|
||||
(Correspondence.BinaryPredicate<NormalizedLandmark, NormalizedLandmark>)
|
||||
(actual, expected) -> {
|
||||
return Correspondence.tolerance(LANDMARKS_ERROR_TOLERANCE)
|
||||
.compare(actual.x(), expected.x())
|
||||
|
||||
Reference in New Issue
Block a user