Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a21dc3cd0ae67929

Jump to content

// Workers AI · dad joke modeWhat did the separable filter say? I'm divided.

From Wikipedia, the free encyclopedia

A separable filter in image processing can be written as product of two more simple filters. Typically a 2-dimensional convolution operation is separated into two 1-dimensional filters. This reduces the computational costs on an image with a filter from down to . [1]

Examples

[edit]

1. A two-dimensional smoothing filter:

2. Another two-dimensional smoothing filter with stronger weight in the middle:

3. The Sobel operator, used commonly for edge detection:

This works also for the Prewitt operator.

In the examples, there is a cost of 3 multiply–accumulate operations for each vector which gives six total (horizontal and vertical). This is compared to the nine operations for the full 3x3 matrix.

Another notable example of a separable filter is the Gaussian blur whose performance can be greatly improved the bigger the convolution window becomes.

References

[edit]
  1. "Learning Separable Filters" (PDF). p. 3. Archived from the original (PDF) on 2020-07-09. Retrieved 2021-01-06.