-
Notifications
You must be signed in to change notification settings - Fork 55
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
Cropping using Images #130
Comments
I'm not sure if I get your idea correctly, could you provide a demo for that? If available, a demo card could also be helpful for others. |
The easiest way to crop is indexing: |
@johnnychen94 sorry, I agree that my paragraph above is indeed a bit confusing. |
No, seems worth documenting. Any changes you want to propose to improve the documentation would be welcome. As @johnnychen94 suggests, a demo card would be particularly awesome, but really anything would help. |
Although the trick seems trivial (PaddedView restricts/expand its indices if it is explicitly provided), that is something I didn't come up with and I think it worth a demo or paragraph here. I myself might try as you did, too. Probably it's also worth supporting usage like: |
I wish to take this up,I am almost done with demo for resize,scaling..should I include cropping in that one only or separately?? |
Good to know that you're interested. I assume none of them are sufficiently long? These seem to be spatial transformations so might be good to be one demo. You could also find some ideas from https://evizero.github.io/Augmentor.jl/stable/democards/operations/ I never try them with Images core functionality, so it might be worth exploring. FYI, I've also introduced PaddedViews in https://juliaimages.org/stable/democards/examples/spatial_transformation/alpha_compositing/#Alpha-Compositing |
After searching how to crop an image in the docs, I realized that
PaddedView
can be used to do that.Perhaps it would be useful to mention in its docstring that PaddedView also works if the output image size is smaller than the input one, effectively implementing a cropping functionality, so that the function would show up when searching for related keywords.
The text was updated successfully, but these errors were encountered: