@@ -10,6 +10,7 @@
#pragma once
+#include <array>
#include <stdint.h>
#include "libcamera/internal/matrix.h"
@@ -25,6 +26,13 @@ struct DebayerParams {
float gamma = 1.0;
float contrastExp = 1.0;
RGB<float> gains = RGB<float>({ 1.0, 1.0, 1.0 });
+
+ static constexpr unsigned int kLscGridSize = 16;
+ static constexpr unsigned int kLscValuesPerCell = 3;
+ using LscValueType = float;
+ using LscLookupTable =
+ std::array<LscValueType, kLscGridSize * kLscGridSize * kLscValuesPerCell>;
+ LscLookupTable lscLut{};
};
} /* namespace libcamera */
@@ -43,6 +43,34 @@ namespace libcamera {
* \brief Contrast value to be used as an exponent
*/
+/**
+ * \var DebayerParams::kLscGridSize
+ * \brief Number of lens shading grid areas in one direction
+ */
+
+/**
+ * \var DebayerParams::kLscValuesPerCell
+ * \brief Number of pixel values per each of the lens shading grid areas
+ */
+
+/**
+ * \typedef DebayerParams::LscValueType
+ * \brief Type of LSC grid values
+ */
+
+/**
+ * \typedef DebayerParams::LscLookupTable
+ * \brief Lookup table for lens shading correction
+ *
+ * It's an array of values to be later used as a texture.
+ * The values are in row - column - RGB order.
+ */
+
+/**
+ * \var DebayerParams::lscLut
+ * \brief Lens shading lookup table
+ */
+
/**
* \class Debayer
* \brief Base debayering class