Raspberry PI camera, quick guide

For those who want a real lowdown right away, here is the final verdict, as of the time of writing this, there are no faster options, the limitations here are imposed by the creators of PI and it’s chips (The Broadcom GPU)

You have 2 options for capturing stills in burst mode. In the case i am addressing here, taking photos of rapidly moving objects in broad daylight, so the shutter speed is very fast, the ISO is not so high (Because of the sun).

1- Through the GPUs stills part of the processor, you would get less than 2 frames per second, you can use the timelapse function.

2- Through the video port on the GPU, this will allow a maximum of 15 frames per second at 5MP resolution, no binning, no sensor cropping, but the still port gives somewhat better photo quality

Considerations

The speed of storage counts, if your storage becomes a bottleneck, 15FPS will not be possible.

1- You can use faster USB storage, the USB port is bound to a maximum of 45MB/Second

2- A fast memory card, currently 25MB/s comes on expensive “Professional” SD cards, i would rather use the USB port

3- Splitting the bandwidth between storage and Ethernet is not a good idea, the Ethernet adapter on the raspberry PI is connected through USB, so it will share the USB bandwidth 😉

4- Splitting the storage or buffering some of the frames on the SD card can be a good idea, as the SD card is connected directly to the CPU not through USB

5- Lowering the photo quality through increased performance will give you good mileage, something equivalent to what other programs call 80% quality will reduce the size pretty well without sacrificing much.

How to get through the stills port

raspistill -o %04d.jpg -ss 5000 -ISO 300 -t 10000 -tl 100 -q 10 -th none

So, the questions that come to mind instantly are, how come quality is a value from 0 to 100 and we are using 10 ? it is a good question, and this is something that is not making sense i know, but judging with my eyes, -q 10 will give us good compression ratio and the photo is still good, the range between 10 and 100 does not make much difference, and then under 10, things go very bad rapidly, no idea why

Now to the next method, which is getting photos from the video port… here is a quick and dirty picamera python script

If you don’t know how python works, please don’t change the indentation, indenting the print statement will add the print to the previous code block which is something we don’t want.

#!/usr/bin/python3
import time
import picamera

frames = 60

with picamera.PiCamera() as camera:
    camera.resolution = (2592, 1944)
    camera.shutter_speed = 5000
    camera.iso = 100
    camera.framerate = 10
    camera.start_preview()
    time.sleep(2)
    start = time.time()
    camera.capture_sequence([
        '/usbstick/image%02d.jpg' % i
        for i in range(frames)
        ], use_video_port=True)
    finish = time.time()
print('Captured %d frames at %.2ffps' % (
    frames,
    frames / (finish - start)))



So simply put, if you are running raspbian, you need to get into the pi config (command is raspi-config), and enable the camera then reboot

Also, don’t forget to run “rpi-update” or apt-get upgrade

Now if you try to take a photo you would enter the command

raspistill -o cam.jpg

But this will take a long time to take one photo (5 seconds by default), this is because it needs to set the exposure, if you want to give it less time you could run the command

raspistill -t 1500 -o test.jpg (One and a half seconds)

But that’s is too long, i already know that it is broad daylight, and that i need a very fast shutter speed, So how do i manually set things ?

Taking a photo of fast moving things in the SUN, i would run the command as follows

raspistill -t 1 -ss 1000 –awb sun -o test1.jpg

Taking photos of moving things in cloudy weather, i would run the command as

So, here are the manual things

–ss 1000 (1 ms, good for a sunny day oudoors, 4ms is good on a cloudy day, with dim light, i would recommend bumping this up a bit)

–ISO 300 (Sensitivity, Back in the day, the film dictated this property), the faster the shutter (Lower value), the higher the needed sensitivity (ISO VALUE), the range is 100 to 800

–nopreview

Prsets for Automatic white balance (AWB)

–awb sun

2 thoughts on “Raspberry PI camera, quick guide

  1. Hi!

    I need a camera with fast shutter speed and I was wondering if you knew how fast these cameras can do this? All of the posts I have encountered are discussing how long the exposure can be. I would like to know how short can the exposure be?

    Thanks!

    1. I actually do, As soon as i have time, I will check my setup (look for the PI with that SD card in it) and post it here for you, Please do let me know if it is urgent and i will check it out for you faster.

Leave a Reply

Your email address will not be published. Required fields are marked *