affine_rotate
result = affine_rotate(angle_degrees)
Input: angle_degrees · Output: result
What it is
angle_degrees is a number.
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
result = affine_rotate(angle_degrees) | angle_degrees numbernot documented yet | result Mat or matrix | Returns a new 3x3 Mat encoding a CCW rotation matrix in standard math convention (see the clockwise-on-screen note above for the visual difference from imrotate). |
Examples
From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.
img = load_image("sample.bmp")
# Rotate 30 degrees about the origin, then shift right/down by (50, 20).
M = affine_translate(50, 20) * affine_rotate(30)
out = imwarp(img, M, method="bilinear", bbox="loose", fill=255)
imshow(out)
from images