-
Notifications
You must be signed in to change notification settings - Fork 150
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 rotation module and functions #669
Conversation
Thanks! These should go alongside the existing rotation functions in the (clunkily named) geometric_transformation module. |
I've moved them across 👍 |
Do you think we should move the |
Let’s leave them for now and bike shed the module structure with whatever functions we’ve got before the next release :-) |
/// 0, 0, 0, 0; | ||
/// 0, 0, 0, 0)); | ||
/// ``` | ||
pub fn rotate90<P>(image: &Image<P>) -> Image<P> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t feel strongly either way but it’s a bit unfortunate to use angles in degrees in the names of these functions when angles everywhere else in this file (/crate) are in radians. Can’t think of better names off the top of my head though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As some prior art, opencv just has a single rotate()
function which takes an enum that looks like ROTATE_90_CLOCKWISE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should do the same and use a single function with an enum, but I don't feel particularly strongly either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wondered the same thing. I’ll just merge as is for now. Thanks.
As a part of image-rs/image#2238