1 | initial version |
If the images are named image1.jpg, image2.jpg and so on, you can save them to a vector using the following code:
vector<Mat> frames;
for (int i=1;i<K;i++){
sprintf(filename,"C:\\DB\\image%d.jpg",i);
Mat frame=imread(filename);
frames.push_back(frame);
}