gaussian

Gaussian fit in C#

怎甘沉沦 提交于 2019-12-21 05:38:12
问题 In a project I'm working on I need to obtain a Gaussian fit from a set of points - needing mean and variance for some processing, and possibly an error degree (or accuracy level) to let me figure out if the set of points really have a normal distribution. I've found this question but it is limited to 3 points only - whereas I need a fit that can work with any number of points. What I need is similar to the labview Gaussian Peak Fit I have looked at mathdotnet and aforge.net (using both in the

Laplacian of gaussian filter use

别说谁变了你拦得住时间么 提交于 2019-12-21 03:44:32
问题 This is a formula for LoG filtering: (source: ed.ac.uk) Also in applications with LoG filtering I see that function is called with only one parameter: sigma(σ). I want to try LoG filtering using that formula (previous attempt was by gaussian filter and then laplacian filter with some filter-window size ) But looking at that formula I can't understand how the size of filter is connected with this formula, does it mean that the filter size is fixed? Can you explain how to use it? 回答1: As you've

Gaussian Smoothing an image in python

[亡魂溺海] 提交于 2019-12-20 18:07:37
问题 I am very new to programming in python, and im still trying to figure everything out, but I have a problem trying to gaussian smooth or convolve an image. This is probably an easy fix, but I've spent so much time trying to figure it out im starting to go crazy. I have a 3d .fits file of a group of galaxies and have cut out a certain one and saved it to a png with aplpy. Basically, it needs to be smoothed as a gaussian to a larger beam size (i.e. make the whole thing larger by expanding out

Plotting of 1-dimensional Gaussian distribution function

删除回忆录丶 提交于 2019-12-20 10:29:51
问题 How do I make plots of a 1-dimensional Gaussian distribution function using the mean and standard deviation parameter values (μ, σ) = (−1, 1), (0, 2), and (2, 3)? I'm new to programming, using Python. Thank you in advance! 回答1: With the excellent matplotlib and numpy packages from matplotlib import pyplot as mp import numpy as np def gaussian(x, mu, sig): return np.exp(-np.power(x - mu, 2.) / (2 * np.power(sig, 2.))) x_values = np.linspace(-3, 3, 120) for mu, sig in [(-1, 1), (0, 2), (2, 3)]:

How to correctly use scikit-learn's Gaussian Process for a 2D-inputs, 1D-output regression?

橙三吉。 提交于 2019-12-20 10:25:12
问题 Prior to posting I did a lot of searches and found this question which might be exactly my problem. However, I tried what is proposed in the answer but unfortunately this did not fix it, and I couldn't add a comment to request further explanation, as I am a new member here. Anyway, I want to use the Gaussian Processes with scikit-learn in Python on a simple but real case to start (using the examples provided in scikit-learn's documentation). I have a 2D input set (8 couples of 2 parameters)

(Matlab) Performance of Gaussian filtering using imfilter on a binary image

岁酱吖の 提交于 2019-12-20 05:31:28
问题 I am currently coding a program to keep track of a running fly in a small chamber, what I want is XY-coordinates of the center of the fly. For this I first filter each frame with a Gaussian filter using fspecial('gaussian',[30 30],100) and imfilter to get a white "cloud" where the fly is. I need this to reduce noise of the center of the fly. I convert the outcome into a binary image using im2bw with a certain threshold to get a white blob from the aforementioned cloud. To get the coordinates,

(Matlab) Performance of Gaussian filtering using imfilter on a binary image

心不动则不痛 提交于 2019-12-20 05:31:07
问题 I am currently coding a program to keep track of a running fly in a small chamber, what I want is XY-coordinates of the center of the fly. For this I first filter each frame with a Gaussian filter using fspecial('gaussian',[30 30],100) and imfilter to get a white "cloud" where the fly is. I need this to reduce noise of the center of the fly. I convert the outcome into a binary image using im2bw with a certain threshold to get a white blob from the aforementioned cloud. To get the coordinates,

How to make a 2D Gaussian Process using GPML (Matlab) for regression?

一个人想着一个人 提交于 2019-12-19 09:15:46
问题 I have an Nx2 input matrix called X . I also have the output values Y which is a vector Nx1 . I create some data to test as follows: Xtest=linspace(x_min,x_max,n); Ytest=linspace(y_min,y_max,n); So, matrix Z is of nx2 dimensions and is going to be used as my test points. I use the default tuning of the parameters found in the demo provided with the GPML lib which is as follows: covfunc = {@covMaterniso, 3}; ell = 1/4; sf = 1; hyp.cov = log([ell; sf]); likfunc = @likGauss; sn = 0.1; hyp.lik =

Gaussian Filter on a vector in Matlab [duplicate]

荒凉一梦 提交于 2019-12-18 13:26:20
问题 This question already has answers here : one Dimensional gauss convolution function in Matlab (2 answers) Closed 3 years ago . I have a n-dimensional vector (1xn dataset, and it is not image data), and I want to apply a Gaussian filter to it. I have the Image Processing Toolkit, and a few others (ask if you need a list). Presumably I can make the hsize parameter of the fspecial function something like [1 n] . Can I still use imfilter to apply it to my vector as the next step, or should I be

How to generate normally distributed random from an integer range?

雨燕双飞 提交于 2019-12-18 11:13:11
问题 Given the start and the end of an integer range, how do I calculate a normally distributed random integer between this range? I realize that the normal distribution goes into -+ infinity. I guess the tails can be cutoff, so when a random gets computed outside the range, recompute. This elevates the probability of integers in the range, but as long as the this effect is tolerable (<5%), it's fine. public class Gaussian { private static bool uselast = true; private static double next_gaussian =