Skip to content

Instantly share code, notes, and snippets.

@ashwani-rathee
Created March 25, 2021 18:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ashwani-rathee/829c0715e861ac54f84a19e1e9fcb475 to your computer and use it in GitHub Desktop.
Save ashwani-rathee/829c0715e861ac54f84a19e1e9fcb475 to your computer and use it in GitHub Desktop.
Image Morphology Test
using BenchmarkTools
using ImageMorphology, TestImages,ColorTypes
function test()
img = TestImages.shepp_logan(512);
img_erode = Gray.(img); # keeps white objects white
img_erosion1 = erode(img_erode)
end
test()
@btime test() #8.981 ms (14 allocations: 6.01 MiB)
@btime test() #9.050 ms (14 allocations: 6.01 MiB)
@btime test() #8.548 ms (14 allocations: 6.01 MiB)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment