-
Notifications
You must be signed in to change notification settings - Fork 143
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
add a channelwise macro #817
Comments
Is the main advantage here more concise code? |
That's one and the main advantage. To support N-D array, in JuliaImages we take pixels as array elements. This is a great design, however, this would cause confusion when someone directly calls a function without channelview it. For example, for RGB images, Introducing this macro would make this situation easy to explain and easy to avoid. "Okay, you forgot to use it channelwisely" If both channelwised version and non-channelwised version can be called in one line; it's much easier to spell 😃 . |
Hey @johnnychen94 I am planning on working on this if it hasn't been added. I am relatively new to Julia, any tips on getting started? Thanks! |
I believe some understanding of the color systems of JuliaImages, and the metaprogramming would be sufficient for you to start with. Actually, there's a WIP PR for this JuliaImages/ImageCore.jl#105 that you can use as a reference. Part of the reason I didn't continue it is because I wasn't very familiar with macros and I am still not. 😢 Speaking of performance, this |
Abusing I'm closing this in favor of the docs JuliaImages/juliaimages.github.io#206 and alternative JuliaImages/ImageCore.jl#170 |
I don't have a specific implementation in mind, but the following usage is really common:
If we could replace this as something like...
Similarly, replace
as
This is a very draft idea.
The text was updated successfully, but these errors were encountered: