Function Repository Resource:

BlurBackground

Source Notebook

Blur the background of an image

Contributed by: Suhas Arun

ResourceFunction["BlurBackground"][image]

returns image with a blurred background.

ResourceFunction["BlurBackground"][image,rad]

returns image with a background blurred over the pixel radius rad.

ResourceFunction["BlurBackground"][image,rad,model]

uses foreground or background model specification.

Details and Options

The default pixel radius used by ResourceFunction["BlurBackground"] is 10.
The model specification is used to indicate the foreground or background, as for RemoveBackground. The default model is {"Background", "Uniform"}.
The background detection is reliant on the RemoveBackground function. If this function cannot recognize the background, then the blurring will not work properly.

Examples

Basic Examples (1) 

Blur the background of an image :

In[1]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/fc43bd1b-b233-4338-922a-805df1c12d93"]
Out[1]=

Scope (5) 

Specify the amount of blurring:

In[2]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/29121334-57b7-4e72-a00c-a885883eb7b1"]
Out[2]=

Create a slider to control the amount of blurring:

In[3]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/71db7cd5-b364-444d-9c18-7aa949b0a83b"]
Out[3]=

Specify the colour and threshold of the background:

In[4]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/51e7b369-a890-45a6-8622-6ed8ab6422eb"]
Out[4]=

Specify a marker for detecting the background:

In[5]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/8c03ded5-e564-4ba2-9d50-a0b1b636fd80"]
Out[5]=

Specify markers using a list of coordinates:

In[6]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/3dc576a0-8181-489f-89ce-ba478ebd1b3e"]
Out[6]=

Publisher

Suhas Arun

Version History

  • 1.0.0 – 06 March 2020

Related Resources

License Information