开发者

store images in an array

I need to store images(I cropped them 开发者_开发百科in a for loop,after every crop,I want to store in an array) into an array of images. How could I do that in OpenCV?


std::vector<IplImage*> vec_images;

IplImage* frame = cvQueryFrame(capture); // Acquiring a new image
// Cropping or whatever

vec_images.push_bask(frame);

Don't forget to deallocate these frames when you don't need them anymore:

for (int i = 0; i < vec_images.size(); i++)
  cvReleaseImage(&vec_images[i]);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜