Do not monkey-patch cv2 methods for unaware caller (#11210)

This commit is contained in:
Grzegorz K authored and GitHub committed 2023-03-30 11:39:11 +02:00
1 parent 0c8de3fca4
commit a82132c10b
1 file changed
+2 -1
+2 -1
View File
@@ -1135,6 +1135,7 @@ def imshow(path, im):
imshow_(path.encode('unicode_escape').decode(), im)
cv2.imread, cv2.imwrite, cv2.imshow = imread, imwrite, imshow # redefine
if Path(inspect.stack()[0].filename).parent.parent.as_posix() in inspect.stack()[-1].filename:
cv2.imread, cv2.imwrite, cv2.imshow = imread, imwrite, imshow # redefine
# Variables ------------------------------------------------------------------------------------------------------------