Skip to content

introduce a curried form of binarize #68

@johnnychen94

Description

@johnnychen94

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions