diff --git a/mediapipe/python/pybind/image.cc b/mediapipe/python/pybind/image.cc index f3d89bada..98f162342 100644 --- a/mediapipe/python/pybind/image.cc +++ b/mediapipe/python/pybind/image.cc @@ -51,7 +51,7 @@ void ImageSubmodule(pybind11::module* module) { ```python import cv2 - cv_mat = cv2.imread(input_file)[:, :, ::-1] + cv_mat = cv2.imread(input_file) rgb_frame = mp.Image(image_format=mp.ImageFormat.SRGB, data=cv_mat) gray_frame = mp.Image( image_format=mp.ImageFormat.GRAY8, diff --git a/mediapipe/python/pybind/image_frame.cc b/mediapipe/python/pybind/image_frame.cc index 9ec60dbec..90db05066 100644 --- a/mediapipe/python/pybind/image_frame.cc +++ b/mediapipe/python/pybind/image_frame.cc @@ -84,7 +84,7 @@ void ImageFrameSubmodule(pybind11::module* module) { ```python import cv2 - cv_mat = cv2.imread(input_file)[:, :, ::-1] + cv_mat = cv2.imread(input_file) rgb_frame = mp.ImageFrame(image_format=ImageFormat.SRGB, data=cv_mat) gray_frame = mp.ImageFrame( image_format=ImageFormat.GRAY,