Project import generated by Copybara.

GitOrigin-RevId: a67c2c19ade0ba122816a250ecee3aab490ef16b
This commit is contained in:
MediaPipe Team
2020-09-28 01:22:05 -04:00
committed by chuoling
parent 8f69af91fe
commit cccf6244d3
26 changed files with 428 additions and 557 deletions
+2 -2
View File
@@ -124,7 +124,7 @@ class ImageFrameTest(absltest.TestCase):
cv2.COLOR_RGB2GRAY)
image_frame = mp.ImageFrame(
image_format=mp.ImageFormat.GRAY8,
data=mat[offset:-offset, offset:-offset])
data=np.ascontiguousarray(mat[offset:-offset, offset:-offset]))
self.assertTrue(
np.array_equal(mat[offset:-offset, offset:-offset],
image_frame.numpy_view()))
@@ -137,7 +137,7 @@ class ImageFrameTest(absltest.TestCase):
cv2.COLOR_RGB2BGR)
image_frame = mp.ImageFrame(
image_format=mp.ImageFormat.SRGB,
data=mat[offset:-offset, offset:-offset, :])
data=np.ascontiguousarray(mat[offset:-offset, offset:-offset, :]))
self.assertTrue(
np.array_equal(mat[offset:-offset, offset:-offset, :],
image_frame.numpy_view()))