1 | initial version |
I think this should be straight straithforward supposing you know how to read images.
Mat image1 = imread("location_image1");
Mat image2 = imread("location_image2");
vector<Mat> various_images;
various_images.push_back(image1);
various_images.push_back(image2);
With this code you can create loops of your desire!
2 | No.2 Revision |
I think this should be straight straithforward supposing you know how to read images.
Mat image1 = imread("location_image1");
Mat image2 = imread("location_image2");
vector<Mat> various_images;
various_images.push_back(image1);
various_images.push_back(image2);
With this code you can create loops of your desire!
UPDATE:
And to access elements of your matrix, it all kind of depends what type of matrix you are using but in the case of a matrix of type CV_8UC1
you can use the command
int currentElement = image.at<uchar>(row,col);
If you have a multi channel image than first use the split
function
3 | No.3 Revision |
I think this should be straight straithforward supposing you know how to read images.
Mat image1 = imread("location_image1");
Mat image2 = imread("location_image2");
vector<Mat> various_images;
various_images.push_back(image1);
various_images.push_back(image2);
With this code you can create loops of your desire!
UPDATE:
And to access elements of your matrix, it all kind of depends what type of matrix you are using but in the case of a matrix of type CV_8UC1
you can use the command
int currentElement = image.at<uchar>(row,col);
If you have a multi channel image than first use the split
function
UPDATE 2:
Access of a vector is done by
Mat retrieve_element = various_images[index];
where index is a number between 0 and amountElements-1