Skip to content

Commit

Permalink
Merge pull request #485 from jcozar87/doc-picamera-zoom
Browse files Browse the repository at this point in the history
doc: Slightly zoom property documentation improvement
  • Loading branch information
waveform80 committed Sep 29, 2018
2 parents 3685860 + e1c7909 commit 5b1096d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/fov.rst
Original file line number Diff line number Diff line change
Expand Up @@ -527,8 +527,9 @@ recorded. The components that data passes through are as follows:

- **Resizing**: At this point, the frame is resized to the requested output
resolution (all prior stages have been performed on "full" frame data
at whatever resolution the sensor is configured to produce). See
:attr:`~PiCamera.resolution`.
at whatever resolution the sensor is configured to produce). Firstly, the
zoom is applied (see :attr:`~PiCamera.zoom`) and then the image is resized
to the requested resolution (see :attr:`~PiCamera.resolution`).

Some of these steps can be controlled directly (e.g. brightness, noise
reduction), others can only be influenced (e.g. analog and digital gain),
Expand Down
5 changes: 5 additions & 0 deletions picamera/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -3422,6 +3422,11 @@ def _set_zoom(self, value):
the "Region of Interest" or ROI). The default value is ``(0.0, 0.0,
1.0, 1.0)`` which indicates that everything should be included. The
property can be set while recordings or previews are in progress.
The `zoom` is applied to the processed image, after rotation and rescale.
If rotation has been used, zoom is composed of ``(y, x, h, w)`` instead.
The values `w` and `h` can modify the aspect ratio of the image: use equal
values for `w` and `h` if you want to keep the same the aspect ratio.
""")

def _get_crop(self):
Expand Down

0 comments on commit 5b1096d

Please sign in to comment.