diff options
author | Jacopo Mondi <jacopo.mondi@ideasonboard.com> | 2023-10-19 16:01:23 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2023-10-23 16:05:50 +0300 |
commit | cc65629b68d49d5f2a4d61537584c56ba510a335 (patch) | |
tree | 960d2d08884bae3b9793dbc264cda31b6acd012f /src/libcamera/camera.cpp | |
parent | 042649f044ae8cd2f9d970c4be180a2c2191d74e (diff) |
libcamera: camera: Introduce Orientation
Introduce the Orientation enumeration which describes the possible 2D
transformations that can be applied to an image using two basic plane
transformations.
Add to the CameraConfiguration class a new member 'orientation' which is
used to specify the image orientation in the memory buffers delivered to
applications.
The enumeration values follow the ones defined by the EXIF specification at
revision 2.32, Tag 274 'orientation'.
The newly introduced field is meant to replace
CameraConfiguration::transform which is not removed yet not to break
compilation.
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/libcamera/camera.cpp')
-rw-r--r-- | src/libcamera/camera.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp index b940647d..59ee3c40 100644 --- a/src/libcamera/camera.cpp +++ b/src/libcamera/camera.cpp @@ -291,7 +291,8 @@ bool SensorConfiguration::isValid() const * \brief Create an empty camera configuration */ CameraConfiguration::CameraConfiguration() - : transform(Transform::Identity), config_({}) + : transform(Transform::Identity), orientation(Orientation::Rotate0), + config_({}) { } @@ -553,6 +554,21 @@ CameraConfiguration::Status CameraConfiguration::validateColorSpaces(ColorSpaceF */ /** + * \var CameraConfiguration::orientation + * \brief The desired orientation of the images produced by the camera + * + * The orientation field is a user-specified 2D plane transformation that + * specifies how the application wants the camera images to be rotated in + * the memory buffers. + * + * If the orientation requested by the application cannot be obtained, the + * camera will not rotate or flip the images, and the validate() function will + * Adjust this value to the native image orientation produced by the camera. + * + * By default the orientation field is set to Orientation::Rotate0. + */ + +/** * \var CameraConfiguration::config_ * \brief The vector of stream configurations */ |