Skip to content

Conversation

johnnychen94
Copy link
Owner

@johnnychen94 johnnychen94 commented Nov 27, 2021

3x faster this time

using ImageFeatures
using LocalBinaryPatterns
using TestImages, ImageCore

img = float32.(testimage("camera"));

@btime lbp($img, 8, 4, lbp_original); # 39.790 ms (15 allocations: 2.00 MiB)
@btime lbp_original($img, 8, 2, $(Linear())); # 12.570 ms (12 allocations: 3.50 MiB)

# Constant interpolation is optimized by moving interpolation calculation out of the core loop
@btime lbp_original($img, 8, 2, $(Constant())); # 2.113 ms (10 allocations: 2.50 MiB)

future work: support npoints > 8 case.

@codecov
Copy link

codecov bot commented Nov 27, 2021

Codecov Report

Merging #10 (5b72c17) into master (9418159) will decrease coverage by 0.34%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #10      +/-   ##
==========================================
- Coverage   96.77%   96.42%   -0.35%     
==========================================
  Files           3        3              
  Lines          62       84      +22     
==========================================
+ Hits           60       81      +21     
- Misses          2        3       +1     
Impacted Files Coverage Δ
src/lbp_original.jl 100.00% <100.00%> (ø)
src/utils.jl 100.00% <100.00%> (ø)
src/compat.jl 0.00% <0.00%> (-33.34%) ⬇️

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 9418159...5b72c17. Read the comment docs.

@johnnychen94 johnnychen94 merged commit afaa7a1 into master Nov 28, 2021
@johnnychen94 johnnychen94 deleted the jc/lbp_circular branch November 28, 2021 05:14
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.

1 participant