I created vector std::vector<cv::Mat> main_layers;
placed in a class. The vector has not been initiated yet. I have also public member cv::Mat source;
initiated in constructor initiation list. Now I have a copy method to copy segments of the image to main_layers:
void copy(){
Rect roi;
auto primarySegment = main_layers.begin();
for (int c = 0; c< primaryKernelsLoad; c++)
{
if (heightPriority)
{
roi = Rect(0, c, size.width, segment1Size);
source(roi).copyTo(primarySegment);
auto nx = std::next(primarySegment, 2);
}
};
};
Here I have error:
gaussian.cpp(133): error C2664: 'void cv::Mat::copyTo(cv::OutputArray) const' : cannot convert parameter 1 from 'std::_Vector_iterator<_Myvec>' to 'cv::OutputArray'
on line with copyTo. How can I get the array from the current image in vector? With regards to C++98, using Visual Studio 2010.