Added code to account for motion traveled while camera image is being processed