I am working on a project based on Template Matching using OpenCV.
How can I make an array of images ?
cv::Mat ref_temp[7]; // Array Declaration as we do in c/c++
cv::Mat image = cv::imread("ref.jpg",1);
cv::Mat ref_image;
image.copyTo( ref_image);
cv::Mat ref_temp(1) =(ref_image, cv::Rect(550,85, 433, 455));
cv::Mat ref_temp[2] =(ref_image, cv::Rect(1042,85,433, 455));
cv::Mat ref_temp[3] =(ref_image, cv::Rect(1528,85,433, 455));
cv::Mat ref_temp[4] =(ref_image, cv::Rect(65, 1010, 423, 442));
cv::Mat ref_temp[5] =(ref_image, cv::Rect(548, 1010, 423, 442));
cv::Mat ref_temp[6] =(ref_image, cv::Rect(1025, 1010, 423, 442));
cv::Mat ref_temp[7] =(ref_image, cv::Rect(1529, 1010, 423, 442));
I am not sure I am doing it in a right way. Please help me.