JuliaImages / ImageContrastAdjustment.jl

A Julia package for enhancing and manipulating image contrast.
MIT License
11 stars 5 forks source link

Adds PiecewiseLinearStretching #54

Open zygmuntszpak opened 3 years ago

zygmuntszpak commented 3 years ago

Adds PiecewiseLinearStretching as a basis for addressing https://github.com/JuliaImages/ImageContrastAdjustment.jl/issues/33

Currently, I have implemented this under the old adjust_histogram umbrella. The intention is to refactor everything into adjust_intensities in subsequent pull requests.

The next steps involve adding Percentile and perhaps Quantile types to ImageCore to facilitate the implementation of some convenience functions described in https://github.com/JuliaImages/ImageContrastAdjustment.jl/issues/33 and other places.

codecov[bot] commented 3 years ago

Codecov Report

Merging #54 (87bee8a) into master (b3e7330) will increase coverage by 0.71%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #54      +/-   ##
==========================================
+ Coverage   95.94%   96.65%   +0.71%     
==========================================
  Files          12       14       +2     
  Lines         592      718     +126     
==========================================
+ Hits          568      694     +126     
  Misses         24       24              
Impacted Files Coverage Δ
src/ImageContrastAdjustment.jl 100.00% <100.00%> (ø)
src/algorithms/piecewise_linear_stretching.jl 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b3e7330...87bee8a. Read the comment docs.

zygmuntszpak commented 3 years ago

@timholy @johnnychen94 I think this implementation should cover what we need to facilitate generalised linear stretching. Please let me know if you think there is anything major I may have missed. Barring that, I plan to merge this pull-request in a couple of days.

zygmuntszpak commented 3 years ago

Thank you both for the excellent feedback. I'll have a stab at refactoring the code and ping you once I am done.