Jump to content
You must now use your email address to sign in [click for more info] ×

"Glow" around image using gaussian blur


Recommended Posts

I have a photo of a boy in a white shirt with trees in the background.  I want to blur the trees.

I select the boy using the Selection Brush.  Invert the selection.  Add a gaussian filter.

The back ground blur works fine except that there is now a white "glow" around the boy.  I expected the boy to be excluded from any blurring,

What am I doing wrong?  Why are the edges of the boy not completely excluded from any blurring.

Thanks.

Link to comment
Share on other sites

If I’ve correctly understood what you’re describing, you’re making a selection and then blurring the boundary between the selected and unselected regions, but you can’t blur one without blurring the other at the same time.

Make sure you’re working on a ‘Pixel’ layer, not an ‘Image’ layer, and duplicate the selection to put a copy of the boy on a new layer. Now deselect to remove the ‘marching ants’, go back to the original layer and add a Gaussian blur to the entire layer.

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.4.1 (iPad 7th gen)

Link to comment
Share on other sites

To make for a more convincing blur effect, isolate the foreground by moving it to a separate layer. Then, on the original layer, inpaint the foreground part so it gets replaced by textures and/or objects from the background. It doesn't need to look realistic because you're going to blur it anyway. Finally, apply your gaussian blur filter only to the background layer. That way, you'll avoid blending pixel information from the foreground beyond its original contour.

Link to comment
Share on other sites

I have this problem all the time in Photoshop and Affinity photo. The problem is simply the Gaussian blur causes the background to bleed out from behind the layer ontop of it (and it'll do this even if you have it on the same layer and you're just using a selection). This isn't a bug; it's just how blurring works. For illustation, I have placed down a blue circle and created a selection around the circle.

image.thumb.png.272660c86ee3027268a29930f6bb77f7.png

Even though the selection is around the circle, it still must take the circle into account for the blur to function properly.

image.thumb.png.3cb7d5edb6244de86c151681f0995454.png

It wont apply the blur directly to areas not selected, but it will still take those areas into account.

So the trick is to copy the boy onto another layer, and then use Affinity Photo's "Inpainting" brush to remove the boy from the background layer. Then conduct the blur on the background layer. The inpainting does not need to be perfect; it's simply providing a different nearest neighbor for the Gaussian blur. 

I made a video showing how to do this:

P.S. use lens blur instead of Gaussian blur... it looks better :D!

 

Link to comment
Share on other sites

The Gaussian Blur filter is "borrowing" (or perhaps "spreading") white pixels from inside the selection.

If you want to restrict the blurring to a single layer, as opposed to @HuniSenpai's response above , you could try a Median Blur:

1319242861_Screenshot2018-08-26at19_53_49.png.8674c4c463dd6bc97bfdebc7bf555b45.png

->

1260828965_Screenshot2018-08-26at19_54_04.png.ef8582721175cb50cb824051021a508c.png

(I've hidden the marching ants to make the edge easier to see). But at 100px radius there is a bit of spreading.

Cheers

 

 

 

Affinity Photo 2.0.3,  Affinity Designer 2.0.3, Affinity Publisher 2.0.3, Mac OSX 13, 2018 MacBook Pro 15" Intel.

Link to comment
Share on other sites

2 hours ago, h_d said:

Never assume... ;)

Never assume what? That none of the ‘gentlemen’ here are actually ladies, or that all of the men deserve to be called gentlemen? Or perhaps both of the above?? :P

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.4.1 (iPad 7th gen)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.