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