Questions tagged [gaussianblur]

In image processing, a Gaussian blur (also known as Gaussian smoothing) is the result of blurring an image by a Gaussian function (named after mathematician and scientist Carl Friedrich Gauss).

Gaussian Blur is a simple algorithm of blurring. In image processing, a Gaussian blur (also known as Gaussian smoothing) is the result of blurring an image by a Gaussian function (named after mathematician and scientist Carl Friedrich Gauss).

It is a widely used effect in graphics software, typically to reduce image noise and reduce detail. The visual effect of this blurring technique is a smooth blur resembling that of viewing the image through a translucent screen, distinctly different from the bokeh effect produced by an out-of-focus lens or the shadow of an object under usual illumination.

Gaussian smoothing is also used as a pre-processing stage in computer vision algorithms in order to enhance image structures at different scales - see scale space representation and scale space implementation.

210 questions
59
votes
5 answers

How do I gaussian blur an image without using any in-built gaussian functions?

I want to blur my image using the native Gaussian blur formula. I read the Wikipedia article, but I am not sure how to implement this. How do I use the formula to decide weights? I do not want to use any built in functions like what MATLAB has
Moeb
  • 10,527
  • 31
  • 84
  • 110
51
votes
14 answers

How to calculate a Gaussian kernel matrix efficiently in numpy?

def GaussianMatrix(X,sigma): row,col=X.shape GassMatrix=np.zeros(shape=(row,row)) X=np.asarray(X) i=0 for v_i in X: j=0 for v_j in X: GassMatrix[i,j]=Gaussian(v_i.T,v_j.T,sigma) j+=1 …
hidemyname
  • 3,791
  • 7
  • 27
  • 41
44
votes
4 answers

CSS-only Acrylic Material from Fluent Design System

With the advent of Microsoft's Fluent Design System and the propagation of the new Acrylic Material around the Windows ecosystem, I thought it would be great to use it in some Web layouts. Acoording to the spec, the composition of an acrylic layer…
Erick Petrucelli
  • 14,386
  • 8
  • 64
  • 84
12
votes
3 answers

ImageMagick: Looking for a fast way to blur an image

I am searching for a faster way to blur an image than to use the GaussianBlur. The solution I am looking for can be a command line solution, but I prefer code in perl notation. Actually, we use the Perl image magick API to blur images: # $image is…
Thariama
  • 50,002
  • 13
  • 138
  • 166
11
votes
2 answers

Depth of Field: combining a point shader with a blur shader (Processing 3)

I would like to display thousands of points on a 3D canvas (in Processing) with a Depth of Field effect. More specifically, I would like to use a z-buffer (depth buffering) to adjust the level of blur of a point based on its distance from the…
solub
  • 1,291
  • 17
  • 40
11
votes
1 answer

How to define radius for blur with Python Pillow?

I'm trying to blur an image with Pillow, using the ImageFilter as follows: from PIL import ImageFilter blurred_image = im.filter(ImageFilter.BLUR) This works fine, except that it has a set radius which is way too small for me. I want to blur the…
kramer65
  • 50,427
  • 120
  • 308
  • 488
10
votes
5 answers

Why is Gaussian Filter different between cv2 and skimage?

I've got an image that I apply a Gaussian Blur to using both cv2.GaussianBlur and skimage.gaussian_filter libraries, but I get significantly different results. I'm curious as to why, and what can be done to make skimage look more like cv2. I know…
waldol1
  • 1,841
  • 2
  • 18
  • 22
8
votes
3 answers

How to get blur effect similar to Apple maps status bar?

I'm working on a map based iOS 11 application and want to make the status bar blurred exactly like it appears in the Apple maps. This is how it looks on the Maps app: Currently, I'm using UIVisualEffectView to replicate this effect. Here's my…
FE_Tech
  • 1,534
  • 13
  • 25
8
votes
2 answers

Replace a chain of image blurs with one blur

In this question I asked how to implement a chain of blurs in one single step. Then I found out from the gaussian blur page of Wikipedia that: Applying multiple, successive gaussian blurs to an image has the same effect as applying a single,…
justHelloWorld
  • 6,478
  • 8
  • 58
  • 138
7
votes
2 answers

Blurring a Rect within a screenshot

I'm developing an Android app which uses a background Service to programmatically capture a screenshot of whatever is on the screen currently. I obtain the screenshot as a Bitmap. Next, I successfully imported OpenCV into my Android project. What I…
Yash Sampat
  • 30,051
  • 12
  • 94
  • 120
6
votes
1 answer

Fast Gaussian blur at pause

In cocos2d-x I need to implement fast gaussian blur and here is how it should looks like( I just found some game on the App Store with already done such blur, in unity): So, it's nice fadeIn-fadeOut blur when user pauses the game. GPUImage already…
KAMIKAZE
  • 420
  • 6
  • 27
6
votes
1 answer

Correct implementation of Gaussian blur via FFT

I have read a lot of questions on SO about Gaussian blur and FFT, but there aren't answer how to implement steps of it (but there are comments like "it's your homework"). I want to know, how to properly pad the kernel and use FFT and IFFT on kernel…
Guy Fawkes
  • 2,313
  • 2
  • 22
  • 39
5
votes
2 answers

Implementing a 3D gaussian blur using separable 2D convolutions in pytorch

I'm trying to implement a gaussian-like blurring of a 3D volume in pytorch. I can do a 2D blur of a 2D image by convolving with a 2D gaussian kernel easy enough, and the same approach seems to work for 3D with a 3D gaussian kernel. However, it is…
lopsided
  • 2,370
  • 6
  • 28
  • 40
5
votes
0 answers

Where is OpenCV's getGaussianKernel method's formula for sigma coming from?

I noticed that in the OpenCV documentation for getGaussianKernel, sigma is calculated using this formula: sigma = 0.3*((ksize-1)*0.5 - 1) + 0.8 Where is this formula coming from? Is this just some approximation that the OpenCV authors came up…
Shisui
  • 1,051
  • 1
  • 8
  • 23
5
votes
3 answers

how do I implement Gaussian blurring layer in Keras?

I have an autoencoder and I need to add a Gaussian noise layer after my output. I need a custom layer to do this, but I really do not know how to produce it, I need to produce it using tensors. what should I do if I want to implement the above…
david
  • 1,255
  • 4
  • 13
  • 26
1
2 3
13 14