Code to get images from the camera and turn them into data