How can access vector <cv::mat> data by using ptr or data method?
I used at method for access vector <cv::mat> data.
This Method is so slow, so I would like to change ptr or data method.
This is my code. How can I change?
vector<mat> conc_img;
vector<mat> loss_img(conc_img);
for (int iter = r_start; iter < r_start + h_size; iter++) {
for (int nframe = 0; nframe < conc_img.size(); nframe++) {
part_x[nframe][cnt][0] = loss_img[nframe].at<float>(iter, ref_p[0]);
part_x[nframe][cnt][1] = loss_img[nframe].at<float>(iter, ref_p[1]);
part_x[nframe][cnt][2] = loss_img[nframe].at<float>(iter, ref_p[2]);
part_x[nframe][cnt][3] = loss_img[nframe].at<float>(iter, ref_p[3]);
}
}