Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

if we consider that you have your images into a vector then you just loop through with a for loop:

vector<Mat> images;
for(size_t i = 0; i < images.size(); ++i)
{
    Mat img = images[i]; // either this or you can just use the images[i] straight forward, just be aware that this is a copy of the image into the vector, if you do not want that then use the .clone() attribute

    // use the img now for what you want to do
}

if we consider that you have your images into a vector then you just loop through with a for loop:loop, you can also do it more efficiently with iterators but lets keep it simple:

vector<Mat> images;
for(size_t i = 0; i < images.size(); ++i)
{
    Mat img = images[i]; // either this or you can just use the images[i] straight forward, just be aware that this is a copy of the image into the vector, if you do not want that then use the .clone() attribute

    // use the img now for what you want to do
}