Box blur
A box blur (also known as a box linear filter) is a spatial domain linear filter in which each pixel in the resulting image has a value equal to the average value of its neighboring pixels in the input image.[src] It is a form of low-pass ("blurring") filter.[src] A 3 by 3 box blur ("radius 1") can be written as matrix : \frac{1}{9}\begin{bmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \end{bmatrix}.[src] Due to its property of using equal weights, it can be implemented using a much simpler accumulation algorithm, which is significantly faster than using a sliding-window algorithm.[src] Box blurs are frequently used to approximate a Gaussian blur.[src] By the central limit theorem, repeated application of a box blur will approximate a Gaussian blur.[src] In the frequency domain, a box blur has zeros and negative components.[src] That is, a sine wave with a period equal to the size of the box will be blurred away entirely, and wavelengths shorter than the size of the box may be phase-reversed, as seen when two bokeh circles touch to form a bright spot where there would be a dark spot between two bright spots in the original image.[src]
A box blur (also known as a box linear filter) is a spatial domain linear filter in which each pixel in the resulting image has a value equal to the average value of its neighboring pixels in the input image.[src] It is a form of low-pass ("blurring") filter.[src] A 3 by 3 box blur ("radius 1") can be written as matrix \frac{1}{9}\begin{bmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \end{bmatrix}.[src] Due to its property of using equal weights, it can be implemented using a much simpler accumulation algorithm, which is significantly faster than using a sliding-window algorithm.[src] Box blurs are frequently used to approximate a Gaussian blur.[src] By the central limit theorem, repeated application of a box blur will approximate a Gaussian blur.[src] In the frequency domain, a box blur has zeros and negative components.[src] That is, a sine wave with a period equal to the size of the box will be blurred away entirely, and wavelengths shorter than the size of the box may be phase-reversed, as seen when two bokeh circles touch to form a bright spot where there would be a dark spot between two bright spots in the original image.[src] Box blur (image) { set newImage to image; For x /*row*/, y/*column*/ on newImage do: { // Kernel would not fit![src] If x The example does not handle the edges of the image, which would not fit inside the kernel, so that these areas remain unblurred.[src] In practice, the issue is better handled by: Introducing an alpha channel to represent the absence of colors; Extending the boundary by filling in values, ranked by quality: Fill in a mirrored image at the border Fill in a constant color extending from the last pixel Pad in a fixed color A number of optimizations can be applied when implementing the box blur of a radius r and N pixels: The box blur is a separable filter, so that only two 1D passes of averaging pixels will be needed, one horizontal and one vertical, for each pixel.[src] This lowers the complexity from to .[src] In digital signal processing terminology, each pass is a moving-average filter.[src] Accumulation.[src] Instead of discarding the sum for each pixel, the algorithm re-uses the previous sum, and updates it by subtracting away the old pixel and adding the new pixel in the blurring range.[src] A summed-area table can be used similarly.[src] This lowers the complexity from to .[src] When being used in multiple passes to approximate a Gaussian blur, the cascaded integrator–comb filter construction allows for doing the equivalent operation in a single pass.[src] ==See also== Gaussian blur Gaussian filter Median filter ==References==[src]
27 sentences · 27 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Box blur." encyclopegia.org, 2026, https://encyclopegia.org/wiki/box-blur. Accessed 06 December 2026.
Chicago
"Box blur." encyclopegia.org. Accessed December 6, 2026. https://encyclopegia.org/wiki/box-blur.
APA
encyclopegia.org. (2026). Box blur. Retrieved December 6, 2026, from https://encyclopegia.org/wiki/box-blur
Accessed December 6, 2026 · CC BY-SA 4.0 · citation page · JSON