Algosim documentation: DistortMetric

DistortMetric

Returns a pixmap with each pixel randomly translated vertically and horizontally.

Syntax

Description

DistortMetric(pm, x, y) returns pm with each pixel randomly translated a maximum distance of x and y horizontally and vertically, respectively. If omitted, y defaults to x.

Specifically, each pixel is swapped with a pixel in its rectangular neighbourhood specified by the x and y.

Examples

DistortMetric(ExampleData("rabbit"), 10)

Image 1

DistortMetric(ExampleData("rabbit"), 100)

Image 2

See also