libcamera  v0.4.0
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 isValid () const
 Check if the sensor configuration is valid. 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, according 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

◆ isValid()

bool libcamera::SensorConfiguration::isValid ( ) const

Check if the sensor configuration is valid.

A sensor configuration is valid if it's fully populated.

Todo:
For now allow applications to populate the bitDepth and the outputSize only as skipping and binnings factors are initialized to 1 and the analog crop is ignored.
Returns
True if the sensor configuration is valid, 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: