Obtaining the frame difference