logo
background
 Home and Links
 Your PC and Security
 Server NAS
 Wargames
 Astronomy
 PhotoStory
 DVD making
 Raspberry Pi
 PIC projects
 Other projects
 Next >>

Notes index links

Links to all my notes (includes mini-projects and source code etc)

(+) 0001 How do I change the Pi System partition size ?

(+) 0100 Device tree settings

(+) 0201 Power over Ethernet - (PoE)

(+) 0202 Solar Power - (with WiFi)

(+) 0203 Power Bank pass through

(+) 0400 Accessing the SDHC card system image

(+) 0401 Accessing PC shares from the Pi

(+) 0402 Installing samba - (the Pi as a Network Share on your PC)

(+) 0900 Can this approach be scaled up to a PC UPS ?

(+) 1001 Pandora Spotify on the Pi

(+) 1002 Playing movies on the Pi

(+) 1003 Getting VGA from the HDMI socket

(+) 1004 Using the RCA socket

(+) 1005 Using the Pi RS232 serial links

(+) 1006 Using the GPIO pins

(+) 1007 Controlling the Pi Zero ACT LED

(+) 1200 List of standard camera modes

(+) 1300 Auto file names

(+) 6500 How to make the System partition read only ?

(+) 6501 Minimising SDHC corruption on power down

(+) 9000 diode switch

(+) 9001 Auto shut down

(+) 9001 MOSFET switch



(-) C201 High speed photos


Max. photos per second

In still image (photo) mode, all pixels have to be read and this takes 200mS. So 'in theory' we can achieve 5 fps (frames per second) - but what's the actual maximium ?

Preventing Preview

The no preview flag (-n) doesn't actually 'stop' previews - instead it just sends the preview data to DEV NUL. However this does 'save some time' (since normally the data would have to be directed to the display memory).

A Previews is a short video sequence. For videos, something called 'rolling shutter mode' is used, whilst for still photo capture the sensor is operated in a different mode.

This means the camera has to be switched from Preview (video) mode to still mode before a photo can be taken - and this not only takes time but also corrupts the first 'frame' read in still capture mode. Even worse, at the then of each photo 'by default' the camera drive switches back to preview mode !

To avoid all the time (and 'first frames') lost switching modes, a new flag was intruduced called 'burst mode'. When the -bm flag is used, the camera does not re-enter Preview after the photo has been taken.

Note that the camera has to start in Preview mode because that's when it's setting is Automatic Gain Control (AGC). The AGC value starts at zero and is 'wound up' until image data is found (0 means 'totally underxposed' i.e. black frame). It's possible to 'stop' the AGC (which freezes it at whatever value it's reached) however that's usually 'not a good idea' :-)


Setting the -tl time

You might think that setting -tl to 200 (200 mS = 5 fps) would get you the maximium possible number of frames. Well 'yes', but if the rest of the system 'can't keep up' (convert to jpg, write to SDHC etc) you will end up reading frames 'late' ... and once the first is late the problem is likley to 'cascade' until you end up skipping frames.

So, for max. speed, you set -tl to 0 (which means the camera runs for the -t time generating photos as fast as the rest of the system asks for)

JPEG or YUV ?

The first thing 'output' from the camera is YUV - this then has to be processed into whatever final output format you ask for. Some formats - such as jpeg - are processed by the GPU, so take 'almost no' extra time.

Even so, YUV will be avialble faster than jpeg. The 'problem' with choosing YUV is that the image size will be 7.5Mb - and it's slower to strore 7.5Mb than it is to convert to jpeg and stor the (typical) 2.2 Mb result.

Dropping the thumbnail

By default, a thumbnail (-th w:h:q) is added to jpeg photos. This takes time (and uses extra space), so setting '--thumb none' (or '-th 0:0:0') speeds up the jpeg photo output.

Writing to RAM disk

There does not appear to be much difference between writing to a good Class 10 SDHC card or writing to 'tmpfs' RAM disk - however, ever little bit counts

This note last modified: 17th Nov 2017 17:30.

[top]

(+) Dec 1969 (no desc)

(+) a000 Display setup - (for PhotoFrame)

(+) a001 go photoframe - (how it works)

(+) a002 set photo - (select for display)

(+) a003 go button script - (photoframe pause control)

(+) a005 get photos - (fetch resize)

(+) a00x Other display utilities

(+) c000 CCTV UPS requirements

(+) c001 countering low speed motion detect

(+) c002 Pi Overclocking

(+) c203 Pi ram disk - (tmpfs)

(+) c901 iR illumination

(+) c902 Viewing a video stream

(+) c905 Image anotation

(+) Dec 1969 (no desc)

(+) raspicamdocs.txt (no desc)

(+) s010 Elevation sensing

Next subject :- index

[top]