I wanted to create multiple VideoCapture Objects for stitching video from multiple cameras to a single video mashup.
for example: I have path for three videos that I wanted to be read using Video Capture object shown below to get the frames from individual videos,so they can be used for writing.
Expected:For N number of video paths
cap0=cv2.VideoCapture(path1)
cap1=cv2.VideoCapture(path2)
cap2=cv2.VideoCapture(path3)
.
.
capn=cv2.VideoCapture(path4)
similarly I also wanted to create frame objects to read frames like
ret,frame0=cap0.read()
ret,frame1=cap1.read()
.
.
ret,frameN=capn.read()
I tried using for loop on the lists where the paths are stored but every time only one path is read and frames are stored for that particular video only.I have seen in many forums it is possible to create multiple capture objects in C++ but not in python in dynamic scenario where number of videos are not known before hand.