diff options
-rw-r--r-- | src/ipa/libipa/lux.cpp | 20 | ||||
-rw-r--r-- | src/ipa/libipa/lux.h | 3 | ||||
-rw-r--r-- | src/ipa/rkisp1/algorithms/lux.cpp | 4 |
3 files changed, 7 insertions, 20 deletions
diff --git a/src/ipa/libipa/lux.cpp b/src/ipa/libipa/lux.cpp index 61f8fea8..899e8824 100644 --- a/src/ipa/libipa/lux.cpp +++ b/src/ipa/libipa/lux.cpp @@ -44,11 +44,6 @@ namespace ipa { */ /** - * \var Lux::binSize_ - * \brief The maximum count of each bin - */ - -/** * \var Lux::referenceExposureTime_ * \brief The exposure time of the reference image, in microseconds */ @@ -65,9 +60,8 @@ namespace ipa { /** * \var Lux::referenceY_ - * \brief The measured luminance of the reference image, out of the bin size + * \brief The measured luminance of the reference image, normalized to 1 * - * \sa binSize_ */ /** @@ -76,11 +70,9 @@ namespace ipa { */ /** - * \brief Construct the Lux helper module - * \param[in] binSize The maximum count of each bin - */ -Lux::Lux(unsigned int binSize) - : binSize_(binSize) + * \brief Construct the Lux helper module + */ +Lux::Lux() { } @@ -97,7 +89,7 @@ Lux::Lux(unsigned int binSize) * referenceExposureTime: 10000 * referenceAnalogueGain: 4.0 * referenceDigitalGain: 1.0 - * referenceY: 12000 + * referenceY: 0.1831 * referenceLux: 1000 * \endcode * @@ -167,7 +159,7 @@ double Lux::estimateLux(utils::Duration exposureTime, double exposureTimeRatio = referenceExposureTime_ / exposureTime; double aGainRatio = referenceAnalogueGain_ / aGain; double dGainRatio = referenceDigitalGain_ / dGain; - double yRatio = currentY * (binSize_ / yHist.bins()) / referenceY_; + double yRatio = (currentY / yHist.bins()) / referenceY_; double estimatedLux = exposureTimeRatio * aGainRatio * dGainRatio * yRatio * referenceLux_; diff --git a/src/ipa/libipa/lux.h b/src/ipa/libipa/lux.h index 93ca6479..d95bcdaf 100644 --- a/src/ipa/libipa/lux.h +++ b/src/ipa/libipa/lux.h @@ -21,7 +21,7 @@ class Histogram; class Lux { public: - Lux(unsigned int binSize); + Lux(); int parseTuningData(const YamlObject &tuningData); double estimateLux(utils::Duration exposureTime, @@ -29,7 +29,6 @@ public: const Histogram &yHist) const; private: - unsigned int binSize_; utils::Duration referenceExposureTime_; double referenceAnalogueGain_; double referenceDigitalGain_; diff --git a/src/ipa/rkisp1/algorithms/lux.cpp b/src/ipa/rkisp1/algorithms/lux.cpp index b0f74963..a467767e 100644 --- a/src/ipa/rkisp1/algorithms/lux.cpp +++ b/src/ipa/rkisp1/algorithms/lux.cpp @@ -33,12 +33,8 @@ namespace ipa::rkisp1::algorithms { /** * \brief Construct an rkisp1 Lux algo module - * - * The Lux helper is initialized to 65535 as that is the max bin count on the - * rkisp1. */ Lux::Lux() - : lux_(65535) { } |