Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在使用矢量时遇到问题,
我希望只使用向量而不是数组。例如。下面显示了数组的用法。
IplImage* bdrInt[a] = cvCreateImage(cvSize(cImg.at(a)->width+2*left, cImg.at(a)->height+2*top), IPL_DEPTH_8U, 1);
我认为您需要将IplImage指针保存在vector<IplImage *>. 向量只存储指针,它不关心图像大小。
IplImage
vector<IplImage *>
vector<IplImage*> bdrInt; bdrInt.push_back( cvCreateImage(cvSize(cImg.at(a)->width+2*left, cImg.at(a)->height+2*top), IPL_DEPTH_8U, 1) );