From 2181ef371e5493eb3cddcfa50b59804cbabce73d Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 5 Apr 2022 11:49:32 +0200 Subject: [PATCH] Update `cv2.imread()` patch with flags argument (#7287) --- 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):