Код: Выделить всё
import cv2 as cv
print(type(data_height[0]))
print(data_height[0].exists())
img = cv.imread(data_height[0].as_posix(), cv.IMREAD_ANYDEPTH)
print(type(img))
>>>
>>> True
>>>
Код: Выделить всё
from PIL import Image
img = Image.open(data_height[0])
print(img)
>>>
Код: Выделить всё
import shutil
shutil.copy(data_height[0], "./test_img.png")
img = cv.imread("./test_img.png", cv.IMREAD_ANYDEPTH)
print(type(img))
>>>
Подробнее здесь: https://stackoverflow.com/questions/790 ... irectories