我有一点问题。下面我根据用户定义的ROI扫描图像。一切正常但是当我尝试用一个像素的滑动尺寸扫描我的图像时,我在回击中得到错误。我想知道为什么?有没有记忆问题?
vector<Mat> images;
vector < pair < int, int > > Coordinate;
for (int rowIndex = 0; rowIndex <= lBPIIImage2.rows - roih; rowIndex = getNextIndex(rowIndex, lBPIIImage2.rows, roih, 1))
{
for (int colindex = 0; colindex <= lBPIIImage2.cols - roiw; colindex = getNextIndex(colindex, lBPIIImage2.cols, roiw, 1))
{
searchRect = cvRect(colindex, rowIndex, roiw, roih);
frameSearchRect = lBPIIImage2(searchRect);
LoopDummy = frameSearchRect.clone();
rectangle(frame, searchRect, CV_RGB(255, 0, 0), 1, 8, 0);
images.push_back(LoopDummy);
Coordinate.push_back(make_pair(rowIndex, colindex));
}
}