libcamera  v0.0.0+3668-1c9dc0fd
Supporting cameras in Linux since 2019
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
raspberrypi.h
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 /*
3  * Copyright (C) 2019-2020, Raspberry Pi Ltd.
4  *
5  * raspberrypi.h - Image Processing Algorithm interface for Raspberry Pi
6  */
7 
8 #pragma once
9 
10 #include <stdint.h>
11 
12 #include <libcamera/control_ids.h>
13 #include <libcamera/controls.h>
14 
15 #ifndef __DOXYGEN__
16 
17 namespace libcamera {
18 
19 namespace RPi {
20 
21 /*
22  * List of controls handled by the Raspberry Pi IPA
23  *
24  * \todo This list will need to be built dynamically from the control
25  * algorithms loaded by the json file, once this is supported. At that
26  * point applications should check first whether a control is supported,
27  * and the pipeline handler may be reverted so that it aborts when an
28  * unsupported control is encountered.
29  */
30 static const ControlInfoMap Controls({
31  { &controls::AeEnable, ControlInfo(false, true) },
32  { &controls::ExposureTime, ControlInfo(0, 999999) },
33  { &controls::AnalogueGain, ControlInfo(1.0f, 32.0f) },
37  { &controls::ExposureValue, ControlInfo(-8.0f, 8.0f, 0.0f) },
38  { &controls::AwbEnable, ControlInfo(false, true) },
39  { &controls::ColourGains, ControlInfo(0.0f, 32.0f) },
40  { &controls::AwbMode, ControlInfo(controls::AwbModeValues) },
41  { &controls::Brightness, ControlInfo(-1.0f, 1.0f, 0.0f) },
42  { &controls::Contrast, ControlInfo(0.0f, 32.0f, 1.0f) },
43  { &controls::Saturation, ControlInfo(0.0f, 32.0f, 1.0f) },
44  { &controls::Sharpness, ControlInfo(0.0f, 16.0f, 1.0f) },
45  { &controls::ColourCorrectionMatrix, ControlInfo(-16.0f, 16.0f) },
46  { &controls::ScalerCrop, ControlInfo(Rectangle{}, Rectangle(65535, 65535, 65535, 65535), Rectangle{}) },
47  { &controls::FrameDurationLimits, ControlInfo(INT64_C(1000), INT64_C(1000000000)) },
50 
51 } /* namespace RPi */
52 
53 } /* namespace libcamera */
54 
55 #endif /* __DOXYGEN__ */
const Control< float > Saturation
Specify a fixed saturation parameter. Normal saturation is given by the value 1.0; larger values prod...
const Control< float > AnalogueGain
Analogue gain value applied in the sensor device. The value of the control specifies the gain multipl...
const Control< int32_t > NoiseReductionMode
Control to select the noise reduction algorithm mode. Currently identical to ANDROID_NOISE_REDUCTION_...
const Control< Span< const int64_t > > FrameDurationLimits
The minimum and maximum (in that order) frame duration, expressed in microseconds.
const Control< Span< const float > > ColourGains
Pair of gain values for the Red and Blue colour channels, in that order. ColourGains can only be appl...
const std::array< const ControlValue, 5 > NoiseReductionModeValues
List of all NoiseReductionMode supported values.
const Control< bool > AeEnable
Enable or disable the AE.
Camera control identifiers.
Top-level libcamera namespace.
Definition: backtrace.h:17
const std::array< const ControlValue, 8 > AwbModeValues
List of all AwbMode supported values.
const Control< int32_t > AwbMode
Specify the range of illuminants to use for the AWB algorithm. The modes supported are platform speci...
const Control< Span< const float > > ColourCorrectionMatrix
The 3x3 matrix that converts camera RGB to sRGB within the imaging pipeline. This should describe the...
const Control< int32_t > AeConstraintMode
Specify a constraint mode for the AE algorithm to use. These determine how the measured scene brightn...
const Control< float > Sharpness
A value of 0.0 means no sharpening. The minimum value means minimal sharpening, and shall be 0...
const std::array< const ControlValue, 4 > AeMeteringModeValues
List of all AeMeteringMode supported values.
const Control< int32_t > ExposureTime
Exposure time (shutter speed) for the frame applied in the sensor device. This value is specified in ...
const std::array< const ControlValue, 4 > AeExposureModeValues
List of all AeExposureMode supported values.
const Control< float > ExposureValue
Specify an Exposure Value (EV) parameter. The EV parameter will only be applied if the AE algorithm i...
const Control< int32_t > AeMeteringMode
Specify a metering mode for the AE algorithm to use. The metering modes determine which parts of the ...
const std::array< const ControlValue, 4 > AeConstraintModeValues
List of all AeConstraintMode supported values.
const Control< bool > AwbEnable
Enable or disable the AWB.
const Control< float > Brightness
Specify a fixed brightness parameter. Positive values (up to 1.0) produce brighter images; negative v...
const ControlIdMap controls
List of all supported libcamera controls.
Definition: control_ids.cpp:1290
const Control< int32_t > AeExposureMode
Specify an exposure mode for the AE algorithm to use. These specify how the desired total exposure is...
Framework to manage controls related to an object.
const Control< float > Contrast
Specify a fixed contrast parameter. Normal contrast is given by the value 1.0; larger values produce ...
const Control< Rectangle > ScalerCrop
Sets the image portion that will be scaled to form the whole of the final output image. The (x,y) location of this rectangle is relative to the PixelArrayActiveAreas that is being used. The units remain native sensor pixels, even if the sensor is being used in a binning or skipping mode.