mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-12 14:59:44 +03:00
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>
This commit is contained in:
parent
3b9c432920
commit
80ac19a507
2 changed files with 25 additions and 14 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
libipa_test = [
|
||||
{'name': 'fixedpoint', 'sources': ['fixedpoint.cpp']},
|
||||
{'name': 'histogram', 'sources': ['histogram.cpp'], 'should_fail': true},
|
||||
{'name': 'histogram', 'sources': ['histogram.cpp']},
|
||||
{'name': 'interpolator', 'sources': ['interpolator.cpp']},
|
||||
]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue