Skip to content

Commit

Permalink
Use mp.ImageFormat instead of just ImageFormat
Browse files Browse the repository at this point in the history
Fixes google-ai-edge#4911

PiperOrigin-RevId: 577003083
  • Loading branch information
schmidt-sebastian authored and copybara-github committed Oct 26, 2023
1 parent 5459705 commit 2cb0100
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mediapipe/python/pybind/image.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ void ImageSubmodule(pybind11::module* module) {
```python
import cv2
cv_mat = cv2.imread(input_file)[:, :, ::-1]
rgb_frame = mp.Image(image_format=ImageFormat.SRGB, data=cv_mat)
rgb_frame = mp.Image(image_format=mp.ImageFormat.SRGB, data=cv_mat)
gray_frame = mp.Image(
image_format=ImageFormat.GRAY,
image_format=mp.ImageFormat.GRAY8,
data=cv2.cvtColor(cv_mat, cv2.COLOR_RGB2GRAY))
from PIL import Image
Expand Down

0 comments on commit 2cb0100

Please sign in to comment.