libcamera v0.1.0+52-a858d20b
Supporting cameras in Linux since 2019
Public Member Functions | Public Attributes | List of all members
libcamera::SensorConfiguration Class Reference

Camera sensor configuration. More...

Collaboration diagram for libcamera::SensorConfiguration:
Collaboration graph
[legend]

Public Member Functions

bool valid () const
 Validate the SensorConfiguration. More...
 
 operator bool () const
 Test if a SensorConfiguration is fully populated. More...
 

Public Attributes

unsigned int bitDepth = 0
 The sensor image format bit depth. More...
 
Rectangle analogCrop
 The analog crop rectangle. More...
 
struct {
   unsigned int   binX = 1
 
   unsigned int   binY = 1
 
binning
 Sensor binning configuration. More...
 
struct {
   unsigned int   xOddInc = 1
 
   unsigned int   xEvenInc = 1
 
   unsigned int   yOddInc = 1
 
   unsigned int   yEvenInc = 1
 
skipping
 The sensor skipping configuration. More...
 
Size outputSize
 The frame output (visible) size. More...
 

Detailed Description

Camera sensor configuration.

The SensorConfiguration class collects parameters to control the operations of the camera sensor, accordingly to the abstract camera sensor model implemented by libcamera.

Todo:
Applications shall fully populate all fields of the CameraConfiguration::sensorConfig class members before validating the CameraConfiguration. If the SensorConfiguration is not fully populated, or if any of its parameters cannot be applied to the sensor in use, the CameraConfiguration validation process will fail and return CameraConfiguration::Status::Invalid.

Applications that populate the SensorConfiguration class members are expected to be highly-specialized applications that know what sensor they are operating with and what parameters are valid for the sensor in use.

A detailed description of the abstract camera sensor model implemented by libcamera and the description of its configuration parameters is available in the libcamera documentation camera-sensor-model file.

Member Function Documentation

◆ operator bool()

libcamera::SensorConfiguration::operator bool ( ) const
inlineexplicit

Test if a SensorConfiguration is fully populated.

Returns
True if the SensorConfiguration is fully populated

◆ valid()

libcamera::SensorConfiguration::valid ( ) const
inline

Validate the SensorConfiguration.

Validate the sensor configuration.

Todo:
A sensor configuration is valid (or well-formed) if it's either completely un-populated or fully populated. For now allow applications to populate the bitDepth and the outputSize only.
Returns
True if the SensorConfiguration is either fully populated or un-populated, false otherwise

Member Data Documentation

◆ analogCrop

libcamera::SensorConfiguration::analogCrop

The analog crop rectangle.

The selected portion of the active pixel array used to produce the image frame.

◆ binning

libcamera::SensorConfiguration::binning

Sensor binning configuration.

Refer to the camera-sensor-model documentation for an accurate description of the binning operations. Disabled by default.

◆ binX

libcamera::SensorConfiguration::binX = 1

Horizontal binning factor.

The horizontal binning factor. Default to 1.

◆ binY

libcamera::SensorConfiguration::binY = 1

Vertical binning factor.

The vertical binning factor. Default to 1.

◆ bitDepth

libcamera::SensorConfiguration::bitDepth = 0

The sensor image format bit depth.

The number of bits (resolution) used to represent a pixel sample.

◆ outputSize

libcamera::SensorConfiguration::outputSize

The frame output (visible) size.

The size of the data frame as received by the host processor.

◆ skipping

libcamera::SensorConfiguration::skipping

The sensor skipping configuration.

Refer to the camera-sensor-model documentation for an accurate description of the skipping operations.

If no skipping is performed, all the structure fields should be set to 1. Disabled by default.


The documentation for this class was generated from the following files: