Qu

blur

Builtin index · Images

result = blur(img)

Input: img · Output: result

What it is

img is an Image of any size. Applies a fixed 3x3 box-average blur kernel.

Overloads

One call shape — this function is not overloaded.

CodeInputOutputDescription
result = blur(img)
img Imagenot documented yet
result Image
Returns a new Image, the same dimensions as img.

Examples

No documentation example calls this form yet. The Images chapter is where one belongs.

How it works

blur(img) / sharpen(img) — the two required convolution filters (3x3 box-average blur, 3x3 unsharp-mask sharpen); see image::Image's doc comments for the exact kernels. edge_detect(img) — a bonus third (3x3 discrete Laplacian). imfilter(img, kernel) — the generic escape hatch: an arbitrary odd-sized square Matrix kernel, direct 2-D convolution with edge-clamped borders (see image::Image::convolve's doc comment for why this is a small from-scratch 2-D convolution rather than a forced reuse of qu_core::transforms::conv, which is 1-D only).

From the note above this builtin in the interpreter, where the reasoning was written down as it was built.