Qu

affine_shear

Builtin index · Images

result = affine_shear(shx, shy)

Input: shx, shy · Output: result

What it is

shx/shy are numbers, the shear factors along x and y.

Overloads

One call shape — this function is not overloaded.

CodeInputOutputDescription
result = affine_shear(shx, shy)
shx numbernot documented yet
shy numbernot documented yet
result Mat
Returns a new 3x3 Mat encoding that shear.

Examples

From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.

img = image_new(20, 20, r=0, g=0, b=0)

shifted = imtranslate(img, 5, 3, fill=255)
scaled = imscale(img, 1.5, fill=0)
imshow(shifted)

M = affine_scale(2, 1.5) * affine_shear(0.2, 0) * affine_identity()
print(shifted.width, scaled.width, M)
output
20 30 [2, 0.4, 0; 0, 1.5, 0; 0, 0, 1]
a synthetic field with one bright patch

from images