Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

here's the problem:

cap >> frame1;

the images you get from the capture, are pointing to video-driver space, you can't store a flat copy in a vector like this, the memory will go out of scope. instead, do like this:

cap >> frame1;

you'll want to copy the pixel memory too, if you want to store them in a vector