Blur
Details
- Blur is a filter function typically used for blurring an image. It is commonly used to suppress noise or to defocus an image.
- Blur[image] is equivalent to Blur[image,2].
- Blur works with 2D and 3D images. For multichannel images, it operates separately on each channel.
- Blur[image,{r1,r2}] uses radius r1 in height and r2 in width.
- Blur[image,{r1,r2,r3}] uses radius r1 in height, r2 in depth and r3 in width.
- Blur[image] gives an image with the same underlying data type as image, except for "Bit" images. »
Background & Context
- Blur is a filter function typically used for blurring (or smoothing) of an image. It can be used to suppress noise and local pixel variation or as an effect to de-focus an image.
- Finer control over the amount and shape of blurring to be applied can be obtained using other filter functions such as GaussianFilter and ImageConvolve.
- The converse of blurring is known as sharpening, which can be performed by functions such as Sharpen and ImageDeconvolve.
Examples
open all close allBasic Examples (2)
Scope (5)
Data (2)
Parameters (3)
Vary the pixel radius to achieve different degrees of blurring:
Blur[[image], #]& /@ {2, 5}Blur in the horizontal direction only:
Blur[[image], {0, 12}]Blur[[image], {12, 0}]Blur a 3D image in the vertical direction only:
Blur[[image], {8, 0, 0}]Blur the horizontal planes only:
Blur[[image], {0, 8, 8}]Applications (7)
Reduce noise in a color image:
i = [image];
Blur[i, 2]Remove Moiré patterns and high spatial frequencies:
Blur[[image]]retina = [image];Subtract the blurred background:
ImageAdjust@ImageSubtract[retina, Blur[Closing[retina, 2], 3]]Sharpen an image using Blur:
i = [image];Subtract the unsharp mask from a version of the original image:
2i - Blur[i, 4]textImage = [image];ImageCompose[
Lighter@Blur[textImage, 8],
SetAlphaChannel[textImage, ColorNegate[textImage]],
Scaled[{.48, .52}]
]Find and anonymize faces in an image:
img = [image];faces = FindFaces[img];Create a mask that covers each face by a disk:
dims = ImageDimensions[img];
mask = Rasterize[Graphics[
Map[box |-> Disk[RegionCentroid[box], Sqrt[Area[box]] / 2], faces], PlotRange -> Thread[{0, dims}]], RasterSize -> dims]Compose the original image and a blurred version using the mask:
ImageCompose[img, SetAlphaChannel[Blur[img, 10], ColorNegate@mask]]Emphasize faces in an image by blurring the background:
ImageCompose[img, SetAlphaChannel[Blur[img, 8], mask]]Display a motion pattern by blurring an animation in the temporal dimension:
anim = {[image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image]};Convert the animation frames into an Image3D object and blur along the slices:
First@Image3DSlices[Blur[Image3D@anim, {3, 0, 0}], {12}]Properties & Relations (2)
Blur is equivalent to GaussianFilter with radius r, width σ=r/2, and "Fixed" padding:
img = [image];{GaussianFilter[img, 2, Padding -> "Fixed"], Blur[img]}Blur preserves the ImageType, except for "Bit" images:
list = {[image], [image], [image]};ImageType /@ listBlur /@ listImageType /@ %Neat Examples (1)
Blur an image outside an artificial focal plane, as in digital tilt-shift photography:
i = [image];mask = [image];b = RemoveAlphaChannel@ImageCompose[i, SetAlphaChannel[Blur[i, 12], mask]]e = EdgeDetect[ImageSubtract[b, Blur[b, 1]]];
HighlightImage[b, FillingTransform[Closing[e, 1]]]Tech Notes
Text
Wolfram Research (2008), Blur, Wolfram Language function, https://reference.wolfram.com/language/ref/Blur.html (updated 2012).
CMS
Wolfram Language. 2008. "Blur." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2012. https://reference.wolfram.com/language/ref/Blur.html.
APA
Wolfram Language. (2008). Blur. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Blur.html
BibTeX
@misc{reference.wolfram_2026_blur, author="Wolfram Research", title="{Blur}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/Blur.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_blur, organization={Wolfram Research}, title={Blur}, year={2012}, url={https://reference.wolfram.com/language/ref/Blur.html}, note=[Accessed: 12-June-2026]}