JuliaImages / ImageBinarization.jl

A Julia package of algorithms for analyzing images and automatically binarizing them into background and foreground.
MIT License
35 stars 8 forks source link

replace `recommend_size` with function AdaptiveThreshold (closes #41) #45

Closed johnnychen94 closed 5 years ago

johnnychen94 commented 5 years ago

This PR reverts some deprecation on window_size introduced by #30 and #42, and then adopt the idea introduced by #41, i.e.,

f = AdaptiveThreshold(img)
binarized_img = binarize(img, f)

P.S., the old equivalent usage (in master branch) is:

f = AdaptiveThreshold(window_size=recommend_size(img))
binarized_img = binarize(img, f)
codecov[bot] commented 5 years ago

Codecov Report

Merging #45 into api will decrease coverage by 0.31%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##              api      #45      +/-   ##
==========================================
- Coverage   95.26%   94.94%   -0.32%     
==========================================
  Files          20       20              
  Lines         190      178      -12     
==========================================
- Hits          181      169      -12     
  Misses          9        9
Impacted Files Coverage Δ
src/adaptive_threshold.jl 100% <100%> (ø) :arrow_up:
src/deprecations.jl 50% <100%> (-25%) :arrow_down:
src/niblack.jl 100% <100%> (ø) :arrow_up:

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 d249ad8...28a9087. Read the comment docs.

codecov[bot] commented 5 years ago

Codecov Report

Merging #45 into api will decrease coverage by 0.31%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##              api      #45      +/-   ##
==========================================
- Coverage   95.26%   94.94%   -0.32%     
==========================================
  Files          20       20              
  Lines         190      178      -12     
==========================================
- Hits          181      169      -12     
  Misses          9        9
Impacted Files Coverage Δ
src/adaptive_threshold.jl 100% <100%> (ø) :arrow_up:
src/deprecations.jl 50% <100%> (-25%) :arrow_down:
src/niblack.jl 100% <100%> (ø) :arrow_up:

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 d249ad8...28a9087. Read the comment docs.

johnnychen94 commented 5 years ago

I'm merging this now since there are no functionality changes except the depwarn. We could safely revert this depwarn if it's not wanted.