libcamera/test/ipa/libipa/meson.build
Stefan Klug 80ac19a507 libipa: histogram: Fix interQuantileMean() for small ranges
The interQuantileMean() is supposed to return a weighted mean value
between two quantiles. This works for fine histograms, but fails for
coarse histograms and small quantile ranges because the weight is always
taken from the lower border of the bin.

Fix that by rewriting the algorithm to calculate a lower and upper bound
for every (partial) bin that goes into the mean calculation and weight
the bins by the middle of these bounds.

Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2025-04-03 12:36:07 +02:00

19 lines
743 B
Meson

# SPDX-License-Identifier: CC0-1.0
libipa_test = [
{'name': 'fixedpoint', 'sources': ['fixedpoint.cpp']},
{'name': 'histogram', 'sources': ['histogram.cpp']},
{'name': 'interpolator', 'sources': ['interpolator.cpp']},
]
foreach test : libipa_test
exe = executable(test['name'], test['sources'],
dependencies : [libcamera_private, libipa_dep],
implicit_include_directories : false,
link_with : [test_libraries],
include_directories : [test_includes_internal,
'../../../src/ipa/libipa/'])
test(test['name'], exe, suite : 'ipa',
should_fail : test.get('should_fail', false))
endforeach