title: Compare two image in real time with predefined image with real time capture image in Opencv c++
body: <p>I am doing a project of Automatic fabric defect detection. In this i developed the algorithm using the [FFT][1] (Fast Fourier Transform) and its working fine in my Ubuntu 14.04 <code>opencv c++</code>. But now i want to develop this to real time there i have to capture image every 2s and have to process that image with my developed algorithm. I need ideas on how to capture images using webcam in <code>opencv c++</code> and to process withat same image which is being captured. Please do help me if anyone knows of this. Thank you in advance.</p>