Skip to content

Commit

Permalink
Add an architecture diagram
Browse files Browse the repository at this point in the history
And make it obvious everything important happens on the GPU
  • Loading branch information
waveform80 committed Dec 14, 2016
1 parent efeb64b commit c1e4583
Show file tree
Hide file tree
Showing 4 changed files with 738 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/fov.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,26 @@ Framerate adjustments, as done with :attr:`~PiCamera.framerate_delta` are
achieved by manipulating the number of "padding" lines added to the end of a
frame.

At this point, a reader familiar with operating system theory may be
questioning how a non-real-time operating system like Linux could possibly be
reading lines from the sensor? After all, to ensure each line is read in
exactly the same amount of time (to ensure a constant exposure over the whole
image) would require precision timing, which cannot be guaranteed in a
non-real-time OS. The answer is quite simply that Linux *doesn't* control the
sensor.

In fact, none of the camera processing occurs on the CPU at all. Instead, it
is done on the Pi's GPU (VideoCore IV) which is running its own real-time OS
(VCOS). From the Linux side we merely send "messages" to VCOS requesting that
it do certain things (initialize the camera, set an exposure time, configure a
JPEG encoder, begin streaming data), and from time to time VCOS sends messages
back (e.g. here's a frame of JPEG encoded data).

The diagram below roughly illustrates the architecture of the system:

.. image:: images/camera_architecture.*
:align: center

The other important factor influencing sensor counts, other than line read-out
time, is the sensor's gain. Specifically, the gain given the by
:attr:`~PiCamera.analog_gain` attribute. The corresponding
Expand Down
Binary file added docs/images/camera_architecture.pdf
Binary file not shown.
Binary file added docs/images/camera_architecture.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c1e4583

Please sign in to comment.