读取大量图像时出现内存错误

2024-04-26 22:41:04 发布

您现在位置:Python中文网/ 问答频道 /正文

使用opencvpython读取10000个图像

for filename in os.listdir(directory)
    img = cv2.imread(os.path.join(directory,filename))

    #Different Image preprocessing function applied after reading it 
    #After 700 image preprocess it gives memory error

如何解决此错误

image 1


Tags: pathin图像imgforositfilename