Ask Your Question

Revision history [back]

You need to move your image acquisition from webcam and template matching into the while loop. You should also have some way to terminate the loop. For example, you could make use of waitKey() to get a character from screen to terminate the loop.