未验证 提交 e00ab78d 编写于 作者: K Kim 提交者: GitHub

force use np.uint8 for cv2 lut (#50867)

上级 5d8fe822
......@@ -440,7 +440,7 @@ def adjust_brightness(img, brightness_factor):
if _is_pil_image(img):
return F_pil.adjust_brightness(img, brightness_factor)
elif _is_numpy_image(img):
return F_cv2.adjust_brightness(img, brightness_factor)
return F_cv2.adjust_brightness(img.astype(np.uint8), brightness_factor)
else:
return F_t.adjust_brightness(img, brightness_factor)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册