Add integral matrix in motion detection.