reading multiple images
hi I want to process 6 pictures called (0.jpg 1.jpg 2.jpg 3.jpg 4.jpg 5.jpg 6.jpg) can anyone help me to use imread or anything similar to do it
hi I want to process 6 pictures called (0.jpg 1.jpg 2.jpg 3.jpg 4.jpg 5.jpg 6.jpg) can anyone help me to use imread or anything similar to do it
You can always load the images one by one manually:
//Assuming that the images live on the same directory where you executed your OpenCV program
cv::Mat image_0 = cv::imread("0.jpg");
cv::Mat image_1 = cv::imread("1.jpg");
cv::Mat image_2 = cv::imread("2.jpg");
cv::Mat image_3 = cv::imread("3.jpg");
cv::Mat image_4 = cv::imread("4.jpg");
cv::Mat image_5 = cv::imread("5.jpg");
cv::Mat image_6 = cv::imread("6.jpg");
You chould check that image_*.empty() is not true (that means that the image has been loaded) and then do whatever you want with them.
Asked: 2014-05-20 23:29:35 -0600
Seen: 416 times
Last updated: May 21 '14