[libcamera-devel] [PATCH v4 1/6] libcamera: properties: Define pixel array properties
Niklas Söderlund
niklas.soderlund at ragnatech.se
Wed Apr 8 00:54:40 CEST 2020
Hi Jacopo,
Thanks for your great effort in defining properties!
On 2020-03-26 15:59:22 +0100, Jacopo Mondi wrote:
> Add definition of pixel array related properties.
>
> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
> ---
> src/libcamera/property_ids.yaml | 155 ++++++++++++++++++++++++++++++++
> 1 file changed, 155 insertions(+)
>
> diff --git a/src/libcamera/property_ids.yaml b/src/libcamera/property_ids.yaml
> index ce627fa042ba..ea9d363fdef8 100644
> --- a/src/libcamera/property_ids.yaml
> +++ b/src/libcamera/property_ids.yaml
> @@ -386,4 +386,159 @@ controls:
> | |
> | |
> +--------------------+
> +
> + - PixelArraySize:
> + type: float
> + size: [2]
> + description: |
> + The physical sizes of the pixel array (width and height), in
> + millimeters.
> +
> + - PixelArray:
> + type: int32_t
> + size: [2]
> + description: |
> + The camera sensor pixel array vertical and horizontal sizes, in pixels.
> +
> + The property describes a rectangle with its top-left corner in position
> + (0, 0) and width and height described by the first and second values
> + of this property.
> +
> + The PixelArray property defines the rectangle that includes all possible
> + rectangles defined by the ActiveAreas property, and describes the full
> + pixel array, including non-active pixels, black level calibration
> + pixels etc.
> +
> + - ActiveAreas:
> + type: int32_t
> + size: [4 x n]
> + description: |
> + The camera sensor active pixel area rectangles, represented as
> + rectangles contained in the one described by the PixelArrays property.
s/PixelArrays/PixelArray/
Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
> +
> + This property describes an arbitrary number of overlapping rectangles,
> + representing the active pixel portions of the camera sensor pixel array.
> +
> + Each rectangle is defined by its displacement from pixel (0, 0) of
> + the rectangle described by the PixelArray property, a width and an
> + height.
> +
> + Each rectangle described by this property represents the maximum image
> + size that the camera module can produce for a given image resolution.
> +
> + Example 1.
> + A sensor which only produces images in the 4:3 image resolution will
> + report a single ActiveArea rectangle, from which all other image formats
> + are obtained by either cropping the field-of-view and/or applying pixel
> + sub-sampling techniques such as pixel skipping or binning.
> +
> + PixelArray(0)
> + /-----------------/
> + x1 x2
> + (0,0)-> +-o------------o-+ /
> + y1 o +------------+ | |
> + | |////////////| | |
> + | |////////////| | | PixelArray(1)
> + | |////////////| | |
> + y2 o +------------+ | |
> + +----------------+ /
> +
> + The property reports a single rectangle
> +
> + ActiveArea = (x1, y1, (x2 - x1), (y2 - y1))
> +
> + Example 2
> + A camera sensor which can produce images in different native
> + resolutions, will report several overlapping rectangle, one for each
> + natively supported resolution, ordered from the tallest to the shortest
> + one.
> +
> + PixelArray(0)
> + /-----------------/
> + x1 x2 x3 x4
> + (0,0)-> +o---o------o---o+ /
> + y1 | +------+ | |
> + | |//////| | |
> + y2 o+---+------+---+| |
> + ||///|//////|///|| | PixelArray(1)
> + y3 o+---+------+---+| |
> + | |//////| | |
> + y4 | +------+ | |
> + +----+------+----+ /
> +
> + The property reports two rectangles
> +
> + PixelArray = ( (x2, y1, (x3 - x2), (y4 - 1),
> + (x1, y2, (x4 - x1), (y3 - y2))
> +
> + The first rectangle describes the maximum field-of-view of all image
> + formats in the 4:3 resolutions, while the second one describes the
> + maximum field of view for all image formats in the 16:9 resolutions.
> +
> + - BayerFilterArrangement:
> + type: int32_t
> + description: |
> + The pixel array color filter displacement.
> +
> + This property describes the arrangement and readout sequence of the
> + three RGB color components of the sensor's Bayer Color Filter Array
> + (CFA).
> +
> + Color filters are usually displaced in line-alternating fashion on the
> + sensor pixel array. In example, one line might be composed of Red-Green
> + while the successive is composed of Blue-Green color information.
> +
> + The value of this property represents the arrangement of color filters
> + in the top-left 2x2 pixel square.
> +
> + For example, for a sensor with the following color filter displacement
> +
> + (0, 0) (max-col)
> + +---+ +--------------...---+
> + |B|G|<---|B|G|B|G|B|G|B|...B|G|
> + |G|R|<---|G|R|G|R|G|R|G|...G|R|
> + +---+ |B|G|B|G|B|G|B|...B|G|
> + ... ..
> + ... ..
> + |G|R|G|R|G|R|G|...G|R|
> + |B|G|B|G|B|G|B|...B|G| (max-lines)
> + +--------------...---+
> +
> + The filter arrangement is represented by the BGGR value, which
> + correspond to the pixel readout sequence in line interleaved mode.
> +
> + enum:
> + - name: BayerFilterRGGB
> + value: 0
> + description: |
> + Color filter array displacement is Red-Green/Green-Blue
> +
> + - name: BayerFilterGRBG
> + value: 1
> + description: |
> + Color filter array displacement is Green-Red/Blue-Green
> +
> + - name: BayerFilterGBRG
> + value: 2
> + description: |
> + Color filter array displacement is Green-Blue/Red-Green
> +
> + - name: BayerFilterBGGR
> + value: 3
> + description: |
> + Color filter array displacement is Blue-Green/Green-Red
> +
> + - name: BayerFilterNonStandard
> + value: 4
> + description: |
> + The pixel array color filter does not use the standard Bayer RGB
> + color model
> +
> + - ISOSensitivityRange:
> + type: int32_t
> + size: [2]
> + description: |
> + The range of supported ISO sensitivities, as documented by the
> + ISO 12232:2006 (or later) standard.
> +
> ...
> --
> 2.25.1
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
--
Regards,
Niklas Söderlund
More information about the libcamera-devel
mailing list