Quantcast
Viewing latest article 2
Browse Latest Browse All 2

How to read in a directory of images with OpenCV

I'm trying to read this directory of jpg images and add them to a list but the list is empty when I run this code:

import glob
import cv2
cv_img = []
for img in glob.glob("E:/project/file/*.jpg"):
    n= cv2.imread(img)
    cv_img.append(n)

Viewing latest article 2
Browse Latest Browse All 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>