Update `cv2.imread()` patch with flags argument (#7287)
Browse files- utils/general.py +2 -2
utils/general.py
CHANGED
@@ -925,8 +925,8 @@ def increment_path(path, exist_ok=False, sep='', mkdir=False):
|
|
925 |
imshow_ = cv2.imshow # copy to avoid recursion errors
|
926 |
|
927 |
|
928 |
-
def imread(path):
|
929 |
-
return cv2.imdecode(np.fromfile(path, np.uint8),
|
930 |
|
931 |
|
932 |
def imwrite(path, im):
|
|
|
925 |
imshow_ = cv2.imshow # copy to avoid recursion errors
|
926 |
|
927 |
|
928 |
+
def imread(path, flags=cv2.IMREAD_COLOR):
|
929 |
+
return cv2.imdecode(np.fromfile(path, np.uint8), flags)
|
930 |
|
931 |
|
932 |
def imwrite(path, im):
|