1 | initial version |
sad as it is maybe, you can only apply ascii strings to imread().
as a workaround, you can load the file using native python methods (which can read unicode paths) and pass it to imdecode:
f = open(some_kyrillic_name, "rb");
bytes = f.read()
image = cv2.imdecode(bytes, cv2.IMREAD_COLOR)
2 | No.2 Revision |
sad as it is maybe, you can only apply ascii strings to imread().
as a workaround, you can load the file using native python methods (which can read unicode paths) and pass it to imdecode:
f = open(some_kyrillic_name, "rb");
bytes = f.read()
image = cv2.imdecode(bytes, cv2.imdecode(np.asarray(bytes, np.uint8), cv2.IMREAD_COLOR)