[libcamera-devel] [PATCH v1 2/5] ipa: raspberrypi: histogram: Add a constructor for an empty histogram
David Plowman
david.plowman at raspberrypi.com
Wed Nov 23 14:40:43 CET 2022
HI Naush
Thanks for the patch.
On Tue, 22 Nov 2022 at 11:22, Naushir Patuck via libcamera-devel
<libcamera-devel at lists.libcamera.org> wrote:
>
> Add a default constructor to the RPiController::Histogram class that creates
> an empty histogram. Since this is a cumulative histogram, push a value of 0 into
> the first (and only) bin to signify this.
>
> Signed-off-by: Naushir Patuck <naush at raspberrypi.com>
Reviewed-by: David Plowman <david.plowman at raspberrypi.com>
Thanks!
David
> ---
> src/ipa/raspberrypi/controller/histogram.h | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/src/ipa/raspberrypi/controller/histogram.h b/src/ipa/raspberrypi/controller/histogram.h
> index 66a68b087964..6b3e3a9e68e4 100644
> --- a/src/ipa/raspberrypi/controller/histogram.h
> +++ b/src/ipa/raspberrypi/controller/histogram.h
> @@ -20,6 +20,11 @@ namespace RPiController {
> class Histogram
> {
> public:
> + Histogram()
> + {
> + cumulative_.push_back(0);
> + }
> +
> template<typename T> Histogram(T *histogram, int num)
> {
> assert(num);
> --
> 2.25.1
>
More information about the libcamera-devel
mailing list