I am very new to opencv. I am using opencv 2.4.10 C++ to detect motion using difference between successive frames. The code I used is given below. The problem with it is it shows no motion even if there is motion happening. That is diff window is always black.I am very new to opencv. I am using opencv 2.4.