JuliaImages / ImageSmooth.jl

Image smoothing algorithms
MIT License
7 stars 1 forks source link

Split the L0Smooth algorithm for Gray images and RGB images #7

Closed JKay0327 closed 3 years ago

JKay0327 commented 3 years ago

In this work, there are two main mission:

It's glad to see that the performance for processing Gray input improved a lot.

The performance after using ImageBase.fdiff:

julia> img_gray = testimage("cameraman");

julia> f = L0Smooth()
L0Smooth(0.02, 2.0, 100000.0)

julia> @btime smooth(img_gray, f)
  393.819 ms (1449 allocations: 138.77 MiB)

Current performance after split the L0Smooth algorithm:

julia> img_gray = testimage("cameraman");

julia> f = L0Smooth()
L0Smooth(0.02, 2.0, 100000.0)

julia> @btime smooth(img_gray , f)
  229.504 ms (1434 allocations: 130.94 MiB)
codecov[bot] commented 3 years ago

Codecov Report

Merging #7 (7b7ed21) into master (9a0354e) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master        #7   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines           69       107   +38     
=========================================
+ Hits            69       107   +38     
Impacted Files Coverage Δ
src/SmoothAPI/smooth.jl 100.00% <100.00%> (ø)
src/algorithms/l0_smooth.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 9a0354e...7b7ed21. Read the comment docs.