Correct bug in median computation
Summary: When there were small ranges of values, e.g. in bias images, a lack of consistency in binning logic caused the median algorithm to fail.
Test Plan:
Median values will be the same for most images.
Some images had median calculation failures because of an off-by-one error caused by an inconsistency on bin assignment in histogram computations
For instance, in https://indilib.org/forum/ekos/6520-median-computation-in-fitsviewer-wrong.html#50100 Herrhausen provided an image which previously
got median values of 0. With this fix, the correct median values (768 for each channel) should be calculated.
Reviewers: mutlaqja
Reviewed By: mutlaqja
Subscribers: kde-edu
Tags: KDE Edu
Differential Revision: https://phabricator.kde.org/D27670