I want to open a window and load a image sequence from a given path
import cv2
imSeq = cv2.VideoCapture(r"D:\software\scripts\NikScr\img\610_002_UD_v001.%04d.jpg")
if(imSeq.isOpened() == False):
print("Error opening the video")
while(imSeq.isOpened()):
ret, frame = imSeq.read()
if ret == True:
cv2.imshow("Frames",frame)
if cv2.waitKey(25):
breakpoint()
else:
break
imSeq.release()
cv2.destroyAllWindows()
i want to display sequence.but Im getting this error
[image2 @ 0000028afef22840] Could find no file with path ‘D:\software\scripts\NikScr\img\610_002_070_4CG_UD_v001.%04d.jpg’ and index in the range 0-4
Error opening the video
As you suggested I tried the 1 st option and tried 1%03d format. but the image is 3840x2160 resolution and my display has resolution of 1920x1080. so it is not displaying the complete image. so tried resizing the image. but it is displaying only the 1 st image for the sequence.
I searched for the sequence error, so is that anything to do with the ffmpeg build for opencv? I have done pip install opencv so the cmake build procedure is not working can you suggest me a way?
thank you so much it now opening in the same window but the image sequence is not playing, only 1 image is being displayed. If I try to drag and maximize or minimize the window it is not responding and the window exists. Does it have anything to do with the version of python and opencv? I’m using python 3.9 and the latest opencv 4.5.2.54
Thank you so much it is working. it is playing 1 frame per sec now. was searching for a output for image sequence for a lot of time. Finally got it thank you so much. do you have any documentation for this or something to go through to gain more knowledge regarding the sequence.?