Ask Your Question

Revision history [back]

To detect movement between two images, you need a score. You can use the motion template as suggested, therefore, you sum all pixels labeled as ''moving''. Or, you could use the histogram comparison between two images. In OpenCV, different methods are proposed, and the Bhattacharyya distance is normed between [0;1]. 0 for identical image (nothing change in pixel intensity) and 1 for ''completely'' different images. A threshold would be easier to specify in [0;1] than for other solution. In this solution everything is done by OpenCV for you...