Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the function in MapFun should be a function that operates an image #35

Open
johnnychen94 opened this issue Dec 19, 2019 · 0 comments
Open
Labels
breaking change changes that should be handled carefully enhancement
Milestone

Comments

@johnnychen94
Copy link
Collaborator

johnnychen94 commented Dec 19, 2019

Currently, we need to pass a function that operates on single pixel to MapFun, many operations become invalid because of this; many available image processing algorithms accept only image (not pixel).

Pixel operations can be just broadcasted to become valid, e.g.,

- augment(img, MapFun(px -> px - RGBA(0.5, 0.3, 0.7, 0.0)))
+ augment(img, MapFun(px -> px .- RGBA(0.5, 0.3, 0.7, 0.0)))

A usage of this could be:

pl = ConvertEltype(Gray{Float32}) |>
     MapFun(AdditiveWhiteGaussianNoise(0.1)) |> # ImageNoise.jl
     Either(NoOp(), Rotate90(), Rotate180(), Rotate270()) |>
     Either(0.5=>NoOp(), 0.25=>FlipX(), 0.25=>FlipY())
@johnnychen94 johnnychen94 added this to the v0.7 milestone Dec 19, 2019
@johnnychen94 johnnychen94 added breaking change changes that should be handled carefully enhancement labels Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change changes that should be handled carefully enhancement
Projects
None yet
Development

No branches or pull requests

1 participant