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

Fix overflow in contrast-stretching #59

Merged
merged 1 commit into from
Jul 23, 2023
Merged

Fix overflow in contrast-stretching #59

merged 1 commit into from
Jul 23, 2023

Conversation

timholy
Copy link
Member

@timholy timholy commented Jul 23, 2023

Fixes #58

I needed to add an explicit ϵ field to ContrastStretching for the test of the explicit case in #58; without it, once you convert to float then eps gets set to Gray{Float32}(1.1920929f-7) rather than Gray{N0f8}(0.004) and you get a very different answer.

@codecov
Copy link

codecov bot commented Jul 23, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.02 🎉

Comparison is base (979ff71) 95.83% compared to head (5a6a8ca) 95.85%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #59      +/-   ##
==========================================
+ Coverage   95.83%   95.85%   +0.02%     
==========================================
  Files          14       14              
  Lines         600      603       +3     
==========================================
+ Hits          575      578       +3     
  Misses         25       25              
Impacted Files Coverage Δ
src/algorithms/contrast_stretching.jl 95.23% <100.00%> (+0.79%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@timholy timholy merged commit 64f8123 into master Jul 23, 2023
13 checks passed
@timholy timholy deleted the teh/overflow branch July 23, 2023 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Overflow in ContrastStretching
1 participant