Questions tagged [gaussian]

For issues related to any of the uses of the Gaussian function. Don't forget to add additional tags to clarify the context.

The graph of a Gaussian is a characteristic symmetric "bell curve" shape that quickly falls off towards plus/minus infinity. The 1-D Gaussian is defined as (taken from wikipedia):

gaussian function from wikipedia

The parameter a is the height of the curve's peak, b is the position of the centre of the peak, and c controls the width of the "bell".

In multiple dimensions, the Gaussian is defined as the product of 1D curves along each dimension.

Gaussian functions are widely used in statistics where they describe the normal distributions, in signal processing where they serve to define Gaussian filters, in image processing where two-dimensional Gaussians are used for Gaussian blurs, in mathematics and physics where they are used to solve heat equations and diffusion equations, to formulate the propagation of optical beams (Gaussian beams), to from a basis set of wavefunctions, to define the Weierstrass transform, and many more.

1812 questions
8
votes
3 answers

Generate a data set consisting of N=100 2-dimensional samples

How do I generate a data set consisting of N = 100 2-dimensional samples x = (x1,x2)T ∈ R2 drawn from a 2-dimensional Gaussian distribution, with mean µ = (1,1)T and covariance matrix Σ = (0.3 0.2 0.2 0.2) I'm told that you can use a Matlab…
pythonnewbie
  • 475
  • 2
  • 7
  • 10
8
votes
2 answers

How to make a Gaussian filter in Matlab

I have tried to make a Gaussian filter in Matlab without using imfilter() and fspecial(). I have tried this but result is not like the one I have with imfilter and fspecial. Here is my codes. function Gaussian_filtered = Gauss(image_x, sigma) % for…
user1098761
  • 579
  • 1
  • 5
  • 16
8
votes
1 answer

Display images in different sizes in MATLAB

I am creating gaussian pyramid in MATLAB 2010b. I want to show images like same patterned mentioned here. I tried to use imresize, truesize but getting all images in same size. Could anybody please help me on this issue?
sattu
  • 632
  • 1
  • 22
  • 37
8
votes
4 answers

C++: generate gaussian distribution

I would like to know if in C++ standard libraries there is any gaussian distribution number generator, or if you have any code snippet to pass. Thanks in advance.
puccio
  • 3,054
  • 8
  • 29
  • 20
7
votes
2 answers

jQuery Animated Gaussian Blur

On the home page of a website I'm designing, I'd like the initial hero image to animate from blurred (gaussian) to sharp. I've looked around, and have been surprised that there's not a readily obvious jQuery solution for doing this. Am I missing…
Keefer
  • 2,269
  • 7
  • 33
  • 50
7
votes
1 answer

Julia - Generate multivariate Gaussian samples with given mean and covariance matrix using mvNormal

I need to generate, say 2000 samples of 2D multivariate Gaussian distribution with mean [2;3] and covaraince C = [0.2 0; 0 0.3] in Julia. Is it possible to do it using MvNormal function from Distributions package? Thanks in advance.
7
votes
3 answers

3D Gaussian Filter in MATLAB

Is there a 3D eqivalent of imfilter available for MATLAB? I wish to apply Gaussian filtering to a 3D histogram. I was going to implement it myself, by creating a (3D) Gaussian filter, then looping over each element in my histogram, and summing up…
Bill Cheatham
  • 11,396
  • 17
  • 69
  • 104
7
votes
2 answers

Generate a random number in a Gaussian Range?

I want to use a random number generator that creates random numbers in a gaussian range where I can define the median by myself. I already asked a similar question here and now I'm using this code: class RandomGaussian { private static…
anon
7
votes
5 answers

Best way to write a Python function that integrates a gaussian?

In attempting to use scipy's quad method to integrate a gaussian (lets say there's a gaussian method named gauss), I was having problems passing needed parameters to gauss and leaving quad to do the integration over the correct variable. Does anyone…
physicsmichael
  • 4,793
  • 11
  • 35
  • 54
7
votes
2 answers

Fitting partial Gaussian

I'm trying to fit a sum of gaussians using scikit-learn because the scikit-learn GaussianMixture seems much more robust than using curve_fit. Problem: It doesn't do a great job in fitting a truncated part of even a single gaussian peak: from sklearn…
lhcgeneva
  • 1,981
  • 2
  • 21
  • 29
7
votes
1 answer

Implementing Discrete Gaussian Kernel in Python?

I'm looking to implement the discrete Gaussian kernel as defined by Lindeberg in his work about scale space theory. It is defined as T(n,t) = exp(-t)*I_n(t) where I_n is the modified Bessel function of the first kind. I am trying to implement this…
kotakotakota
  • 731
  • 8
  • 26
7
votes
1 answer

Correctly implement a 2 pass Gaussian blur

I'm attempting to implement a performant Gaussian blur taking advantage of the fact that a Gaussian kernel is separable, i. e. you can express a 2D convolution as a combination of two 1D convolutions. I'm able to generate two kernels which I believe…
James South
  • 10,147
  • 4
  • 59
  • 115
7
votes
1 answer

Building a covariance matrix in Python

Problem I want to implement an algorithm from an unpublished paper by my supervisor and as part of that, I need to construct a covariance matrix C using some rules given in the paper. I'm coming from Matlab and wanted to take this opportunity to…
Ben
  • 465
  • 2
  • 6
  • 17
7
votes
2 answers

How to add Gaussian noise to an image?

How to add a certain amount of Gaussian noise to the image in python? Do I need to convert somehow the values of the image to double type or something else? Also, I have doubts about measuring the level of noise in the image. One adds it according…
Donatas
  • 443
  • 3
  • 6
  • 11
7
votes
1 answer

MATLAB Murphy's HMM Toolbox

I am trying to learn HMM GMM implementation and created a simple model to detect some certain sounds (animal calls etc.) I am trying to train a HMM (Hidden Markov Model) network with GMM (Gaussian Mixtures) in MATLAB. I have a few questions, I could…