Hi guys i am trying to add an IplImage
into a vector every time i extract a frame from the camera, but somehow the IplImage
stored in my vector always got over-written by the latest frame.
The variable that i want to store is image.get()
with image defined as
boost::scoped_ptr<IplImage> image(cvCreateImage(size, IPL_DEPTH_32F, 1));
i have created a vector to store my image as followed
cv::vector< const IplImage*> buffer;
i use the function push_back to add in the image into buffer
buffer.push_back(image.get());
after that i try to save the image as png format for each variable in the buffer and i discover that the images are the same.
i think this should be a pointer issue as i have no problem trying to save integers into another vector.
any suggestion how i can store different images into a vector? thanks in advance