Add image capture to the scan function.