DWQA QuestionsCategory: PiCapture SupportStrange image capture
Cameron Albert asked 4 years ago

I used raspistill to capture an image (raspistill -o cam.jpg -q 100) and got the image below. I am using a security camera that was previously working with a usb dongle for video conversion. I have a cable plugged into video1 (green). The camera is NTSC. I am not sure what I might be doing wrong. Also, is it possible to screen capture with player, raspistill seems kind of slow for what I need it to do.

 

1 Answers
mwlinder Staff answered 4 years ago

By default, Raspistill captures at the full resolution of the camera sensor:  2492×1944.  Because the PiCapture board is sending 640×480 video, what you are seeing is the real video in the top left area of the image and whatever random data happens to be in the GPU buffer in the rest of the image.
In order to capture the a clean 640×480 image you need to specify both the region of interest (to tell Raspistill what part of the buffer to use) and the output resolution (640×480, although you could have it scale it to something else).
 
For the best image, it is good to disable the automatic white balance and exposure compensation features just as recommended in the PiCapture documentation for Raspivid.
You might try the following command:
raspistill -o cam -q 100 -awb off -awbg 1.0,1.0 -ex off -roi 0.01,0.01,0.23,0.23 -w 640 -h 480 –nopreview
This should give you what you are looking for.
I believe that the reason that Raspistill is very slow for a single image capture is that it allows a lot of time for the camera to power on and for the image to stabilize before taking the snapshot.  If the preview is active you can see changes in the image with the camera during this time.
You might consider using the picamera package for what you are doing.  In their examples they show delays for the camera to power on, but that is not required with PiCapture.  There are examples in the picamera documentation for still image capture.

Cameron AlbertStrange image capture