Here is a python code to read a sequence ( 0.jpg ...1052.jpg) of images with VideoCapture
module of openCV
.
import cv2
import numpy
cap = cv2.VideoCapture("/path to/RGB/I%04d.jpg",cv2.CAP_IMAGES).
while(1):
ret,frame = cap.read()
cv2.imshow('image',frame)
cv2.waitKey()
print(frame.shape)
I get this error
OpenCV Error: Assertion failed (size.width>0 && size.height>0) in imshow.
It seems that the frame object is empty!