Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qview histogram tool miscalculates some stats in very-high-dynamic-range images #5371

Closed
rvwagner opened this issue Dec 11, 2023 · 0 comments · Fixed by #5445
Closed

Qview histogram tool miscalculates some stats in very-high-dynamic-range images #5371

rvwagner opened this issue Dec 11, 2023 · 0 comments · Fixed by #5445
Assignees
Labels
bug Something isn't working

Comments

@rvwagner
Copy link

ISIS version(s) affected: 8.0.2, 7.1.0, 3.10.2, likely more

Description

When using the histogram tool on a neutral region of a cube with a significant number of extreme outlier pixels (enough to distort the default stretch), such as a ratio of two images with slightly mismatched shadows, the reported median and mode values are very wrong. Also the displayed histogram only contains 1-2 bars.

The included example's values are based on an actual ratio of Mercury images that was giving "median" values outside the min/max range of the selection.

The average, minimum, maximum, stand. dev., and variance values appear to be calculated correctly; the mode is apparently always identical to the median in this situation, and skew is also incorrect. It looks like median, mode, and skew are calculated using histogram bins from a global binning, while the other stats are based on the actual pixels selected.

How to reproduce

makecube l=100 s=100 b=1 to=t.cub
fakecube f=t.cub t=gradient.cub
fx f1=gradient.cub eq="f1/200 - 11519*(line < 2) + 43457*(line > 99)" 
fx f1=gradient.cub eq="f1/200" to=gradient2.cub

qview dynamic.cub gradient2.cub

Use the Histogram (H) tool to draw small boxes at various places in the grey region of dynamic.cub. Note that the median and mode values always match, are always either -0.121646 or 0.717249, and are often outside the min/max range of the selection. Compare to gradient.cub, where the average and median (correctly) match to within half a pixel quantization step (0.0025).

QviewHistogramError

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

2 participants