When I had the script detect significant differences between frames in a sequence of film, after cropping, I found one of a few scenarios had occurred.
- Changes in position of subject
- Changes in ambient light (familiar to those using motion intensified video techniques)
- Changes in camera position due to windage
I had some success via modulate to change the brightness which similar.sh detected nicely.
Considering movement due to windage, when I took the outputs of Canny edge detection, I thought I'd try updating the geometry inside a loop to determine if I moved the 2nd frame a pixel in one of the cardinal directions and re-evaluate to see if the new position was more similar, or less similar.
However I found that my attempts to update the geometry using the offsets were not making any difference to the image. (using something along the lines of convert img.png -geometry 400x400+$offset+0 offset_image.png). I wonder if I update the crop frame being the preceding step, rather than attempting to modify the outputs afterwards via geometry might be another way around the problem. Why might I not be seeing any difference as output from- geometry?