Struct libcamera::properties::PixelArraySize
source · pub struct PixelArraySize(pub Size);
Expand description
The camera sensor pixel array readable area vertical and horizontal sizes, in pixels.
The PixelArraySize property defines the size in pixel units of the readable part of full pixel array matrix, including optical black pixels used for calibration, pixels which are not considered valid for capture and active pixels containing valid image data.
The property describes the maximum size of the raw data captured by the camera, which might not correspond to the physical size of the sensor pixel array matrix, as some portions of the physical pixel array matrix are not accessible and cannot be transmitted out.
For example, let’s consider a pixel array matrix assembled as follows
+--------------------------------------------------+
|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|
|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|
|xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx|
|xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx|
|xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx|
|xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx|
|xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx|
|xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx|
... ... ... ... ...
... ... ... ... ...
|xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx|
|xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx|
|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|
|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|
+--------------------------------------------------+
starting with two lines of non-readable pixels (x), followed by N lines of readable data (D) surrounded by two columns of non-readable pixels on each side, and ending with two more lines of non-readable pixels. Only the readable portion is transmitted to the receiving side, defining the sizes of the largest possible buffer of raw data that can be presented to applications.
PixelArraySize.width
/----------------------------------------------/
+----------------------------------------------+ /
|DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| |
|DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| |
|DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| |
|DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| |
|DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| |
|DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| | PixelArraySize.height
... ... ... ... ...
... ... ... ... ...
|DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| |
|DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| |
+----------------------------------------------+ /
This defines a rectangle whose top-left corner is placed in position (0, 0) and whose vertical and horizontal sizes are defined by this property. All other rectangles that describe portions of the pixel array, such as the optical black pixels rectangles and active pixel areas, are defined relatively to this rectangle.
All the coordinates are expressed relative to the default sensor readout direction, without any transformation (such as horizontal and vertical flipping) applied. When mapping them to the raw pixel buffer, applications shall take any configured transformation into account.
\todo Rename this property to Size once we will have property
categories (i.e. Properties::PixelArray::Size)
Tuple Fields§
§0: Size
Trait Implementations§
source§impl Clone for PixelArraySize
impl Clone for PixelArraySize
source§fn clone(&self) -> PixelArraySize
fn clone(&self) -> PixelArraySize
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl ControlEntry for PixelArraySize
impl ControlEntry for PixelArraySize
source§impl Debug for PixelArraySize
impl Debug for PixelArraySize
source§impl Deref for PixelArraySize
impl Deref for PixelArraySize
source§impl DerefMut for PixelArraySize
impl DerefMut for PixelArraySize
source§impl From<PixelArraySize> for ControlValue
impl From<PixelArraySize> for ControlValue
source§fn from(val: PixelArraySize) -> Self
fn from(val: PixelArraySize) -> Self
source§impl TryFrom<ControlValue> for PixelArraySize
impl TryFrom<ControlValue> for PixelArraySize
source§type Error = ControlValueError
type Error = ControlValueError
impl Property for PixelArraySize
Auto Trait Implementations§
impl Freeze for PixelArraySize
impl RefUnwindSafe for PixelArraySize
impl Send for PixelArraySize
impl Sync for PixelArraySize
impl Unpin for PixelArraySize
impl UnwindSafe for PixelArraySize
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)