DWQA QuestionsCategory: How ToPiCapture SD on RPi 3b+ issue
kelro asked 3 weeks ago

sample image
I connected analog camera on picapture sd 1 on RPi 3b+. and i try this code for capture image.
 

from picamera.array import PiRGBArray

from picamera import PiCamera

import cv2

 

camera = PiCamera()

rawCapture = PiRGBArray(camera)

 

camera.capture(rawCapture, format=“bgr”)

image = rawCapture.array

 
cv2.imwrite(‘test.jpg’, image)
 
what reason that? Can i fix that? 

 

 

1 Answers
mwlinder Staff answered 3 weeks ago

It appears that you have not set the “camera mode” to correspond to the “mode 6” video that you are capturing.  The default is a higher resolution mode, and so you are getting garbage from the video buffer.

kelroPiCapture SD on RPi 3b+ issue