Quantcast
Channel: How to read in a directory of images with OpenCV - Stack Overflow
Viewing all articles
Browse latest Browse all 2

How to read in a directory of images with OpenCV

$
0
0

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 all articles
Browse latest Browse all 2

Trending Articles



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