Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

the images you get from a webcam point to videodriver memory. though you've got 2 Mat instances, their pixels point at the same thing. (temp will get overwritten in the next frame)

so, if you want to save temp for a rainy day, clone it!

vid >> temp;
temp = temp.clone();