libcamera: libcamera::SensorConfiguration Class Reference

libcamera v0.7.2 Supporting cameras in Linux since 2019

Loading...
Searching...
No Matches
libcamera::SensorConfiguration Class Reference

Camera sensor configuration. More...

Collaboration diagram for libcamera::SensorConfiguration:
[legend]

## Public Member Functions
bool | isValid () const
| Check if the sensor configuration is valid.

## Public Attributes
unsigned int | bitDepth = 0
| The sensor image format bit depth.
Rectangle | analogCrop
| The analog crop rectangle.
struct | binning
| Sensor binning configuration.
struct | skipping
| The sensor skipping configuration.
Size | outputSize
| The frame output (visible) size.

## 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

Rectangle libcamera::SensorConfiguration::analogCrop

The analog crop rectangle.

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

## ◆ binning

struct libcamera::SensorConfiguration::[struct].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.

## ◆ bitDepth

unsigned int libcamera::SensorConfiguration::bitDepth = 0

The sensor image format bit depth.

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

## ◆ outputSize

Size libcamera::SensorConfiguration::outputSize

The frame output (visible) size.

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

## ◆ skipping

struct libcamera::SensorConfiguration::[struct].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:

- include/libcamera/camera.h
- src/libcamera/camera.cpp