Project import generated by Copybara.
GitOrigin-RevId: a67c2c19ade0ba122816a250ecee3aab490ef16b
This commit is contained in:
@@ -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()))
|
||||
|
||||
Reference in New Issue
Block a user