i am debugging a simple program that would count the number and position of mouse click using setMouseCallback function on a live stream from a video camera, but as soon as the program starts, it gets struck and the position and number of mouse clicks are updated because of the movement of mouse instead of clicks.
I am attaching the program i tried, i would be grateful if anybody points out the mistake and as well as give me the solution for the attached program.
Thanks in advance.