From 01037cb9c565b6ab9fd3dc34bffe713c653b5309 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 5 Apr 2022 11:47:25 +0200 Subject: [PATCH] Update `cv2.imread()` patch with flags argument --- utils/general.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/general.py b/utils/general.py index da7dbb6d3e55..65dd9326797e 100755 --- a/utils/general.py +++ b/utils/general.py @@ -925,8 +925,8 @@ def increment_path(path, exist_ok=False, sep='', mkdir=False): imshow_ = cv2.imshow # copy to avoid recursion errors -def imread(path): - return cv2.imdecode(np.fromfile(path, np.uint8), cv2.IMREAD_COLOR) +def imread(path, flags=cv2.IMREAD_COLOR): + return cv2.imdecode(np.fromfile(path, np.uint8), flags) def imwrite(path, im):