I'm trying to store multiple images in a folder on a vector for later processing. The problem is that I get the error:
*Debug Assertion Failed!
Expression: vector subscript out of range.*
The code that I'm testing is as follows.
stringstream Nombre2;
vector<Mat> Imagen2;
for (int a=0; a<=Count;a++)
{
Nombre2.clear();
Nombre2 << "C:\\Users\\Azu\\Documents\\Visual Studio 2010\\Projects\\SIFT2\\SIFT2\\BBDDFaces\\"<< a+1 << ".pgm";
imread(Nombre2.str()).copyTo(Imagen2[a]);
}
The images names are numerical: 1.pgm, 2.pgm, so on..
I'd appreciate, if anyone can help me fix it!