-
Notifications
You must be signed in to change notification settings - Fork 866
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
Rotation degrees are opposite. #252
Comments
Hi @YiweiZou - so in your case the p.rotate(probability=0.7, max_left_rotation=0, max_right_rotation=10) This would result in a rotation going in the wrong direction (counter clockwise)? As for the |
Yes, for the example, the images would randomly rotation within 0-10 degrees counterclockwise. |
Hi @mdbloice , After reviewing the Operations.py file, I noticed that you assigned the angle of rotation as positive for clockwise rotation and negative for anticlockwise rotation. However, this is opposite to the default behavior of the image.rotate() method. In image.rotate() method, when a positive angle of rotation is provided, it performs an anticlockwise rotation, whereas a negative angle results in a clockwise rotation. To address this inconsistency, I added a negative sign whenever you are passing the angle in the image.rotate() method in the Operations.py file. By adjusting the sign of the angle of rotation passed to the image.rotate() method, I ensured that the rotations are now correctly aligned with the intended clockwise and anticlockwise directions. Since implementing these modifications I have tested, and all rotations have been functioning correctly in my local system. Thank you. |
In the python module, Image.py rotation with positive degrees returns a rotated image with the given number of degrees counterclockwise around its center, but not clockwise. So the function rotate90, rotate270, rotate, rotate_without_crop give out results with left and right opposite.
And also to mention, rotate function can't rotate with certain degrees when max_left_raotion == max_right_rotation.
The text was updated successfully, but these errors were encountered: