使用vector时报错,vector subscript out of range
作者:互联网
解决方案:
将循环变量i改为size_t就可以了。。。
for(size_t i=0;i<good_matches.size();++i)
{
obj.push_back(keyPoints_object[good_matches[i].trainIdx].pt);
scene.push_back(keyPoints_scene[good_matches[i].queryIdx].pt);
}
标签:good,pt,matches,scene,keyPoints,range,vector,subscript,size 来源: https://blog.csdn.net/weixin_41597991/article/details/100987692