compare 2 image to decide to record