I'm trying to shoot some .raw pictures and I'd like to test both the rgb and the yuv option.
What I've obtained so far is a not usable file/image. Meaning that once I open the it with Photoshop, for example, I can only see a scrambled black and white image.
Here's the code using 'rgb':
import time import picamera campic = 1 def take_picture(campic): print("Take picture", campic) filename = "/home/pi/insect" + str(campic) + ".raw" with picamera.PiCamera() as camera: camera.resolution = (1920, 1088) camera.start_preview() time.sleep(2) camera.capture(filename, 'rgb') time.sleep(0.5) camera.stop_preview() for i in range(3): # starting with 3 pics to try take_picture(campic) time.sleep(5) campic = campic + 1
Any idea on how to fix it would be greatly appreciated, thanks! :)