It would be convenient to make binarize(alg) return a function so that
map(binarize(Yen()), imgs)
This is equivalent to binarize.(Ref(Yen()), imgs) but a function can be composed together with other functions using ∘, or eventually the |> API similar to that in Augmentor:
pipeline = FlipX(0.5) |> Rotate([-5,-3,0,3,5]) |> CropSize(64,64) |> Zoom(1:0.1:1.2)
Cases that I know in Base are isequal, isapprox(in Julia 1.5), startwith(in Julia 1.5) and endswith(in Julia 1.5):
julia> map(isequal(2), 1:5)
5-element Array{Bool,1}:
0
1
0
0
0
It would be convenient to make
binarize(alg)return a function so thatThis is equivalent to
binarize.(Ref(Yen()), imgs)but a function can be composed together with other functions using∘, or eventually the|>API similar to that in Augmentor:Cases that I know in Base are
isequal,isapprox(in Julia 1.5),startwith(in Julia 1.5) andendswith(in Julia 1.5):