I am creating a video using an image series in a folder which are named as 'image0, image1,...'. But when I try to open the video file created, its not opening. I tried opening it with VLC, media player etc. Am i doing something wrong while creating the VideoWriter object?
//Write video
VideoWriter ovideoWriter("C:/Users/chandr_m/Desktop/KCF - Copy/MyVideo.avi",CV_FOURCC('M','J','P','G''), 30,
frameSize);
I take the images as given below:
Mat Image;
do
{
sequence>>Image;
if(Image.empty())
break;
printf("Write image to video \n");
Mat imageArr[] = { Image, Image, Image };
merge(imageArr, 3, imageGrey);
oVideoWriter.write(imageGrey);
}
while(!Image.empty());