Slower webcams don't have an image available for the first call to capture.read(), so make sure that an image has been returned before trying to operate on a null image