How to read a series of images with python using OpenCV?
I don't know the way to load multiple images with python using OpenCV's API
I don't know the way to load multiple images with python using OpenCV's API
you probably still have to "read" an image somehow, but you can batch-process them like this:
from glob import glob
for fn in glob('*.png'):
im = cv2.imread(fn)
#
# your processing here.
if your images are numbered, like im00004.png
you can even abuse the VideoCapture:
cap = cv2.VideoCapture("im%05d.png") #like a printf pattern, leading zeros are important !
while cap.isOpened():
ret,img = cap.read()
#
# your processing here
Asked: 2016-08-25 23:07:01 -0600
Seen: 10,329 times
Last updated: Aug 26 '16
Area of a single pixel object in OpenCV
how to understand which functions available in python bindings?
Problems installing opencv on mac with python
build problems for android_binary_package - Eclipse Indigo, Ubuntu 12.04
OpenCV DescriptorMatcher matches
Can't compile .cu file when including opencv.hpp
Weird result while finding angle
cv2.perspectiveTransform() with Python
Using OpenCV's stitching module, strange error when compositing images
what do you mean, exactly ?
like reading in a whole directory ?
I mean reading many images at the same time so that I don't need to read them in one by one.Since I have to process these pictures using the same algorithm.