I am using OpenCV 2.4.6 with VS2010. I think my webcam ... add this line cap. retrieve(frame);.
stackoverflow.com