gaussian

Illumination normalization in OpenCV

会有一股神秘感。 提交于 2019-12-03 16:37:35
I am working on a face recognition project. I have pictures with different lighting so I need to do illumination normalization. I read a paper which which claims to do illumination normalization. The paper describe the following function and values. 1- gamma correction with gamma = 0.2 2- Difference of Gaussian (DOG) filtering with (sigma0 = 1, sigma1 =2) 3- contrast equalization (truncation threshold of 10 and compressive component 0.1 is used in the paper) I use CvPow for gamma correction, CvSmooth for DoG and Threshold() with truncate (I don't know how to specify the compression component)

Implementation of Gaussian Process Regression in Python y(n_samples, n_targets)

谁说胖子不能爱 提交于 2019-12-03 15:51:42
I am working on some price data with x = day1, day2, day3,...etc. on day1, I have let's say 15 price points(y), day2, I have 30 price points(y2), and so on. When I read the documentation of Gaussian Process Regression: http://scikit-learn.org/stable/modules/generated/sklearn.gaussian_process.GaussianProcess.html#sklearn.gaussian_process.GaussianProcess.fit y is shape (n_samples, n_targets) with the observations of the output to be predicted. I assume n_targets refers all the price points I observed on each day. However, the number of price points on each day are not the same. I wonder how to

Gaussian Process scikit-learn - Exception

孤街浪徒 提交于 2019-12-03 13:34:16
I want to use Gaussian Processes to solve a regression task. My data is as follow : each X vector has a length of 37, and each Y vector has a length of 8. I'm using the sklearn package in Python but trying to use gaussian processes leads to an Exception : from sklearn import gaussian_process print "x :", x__ print "y :", y__ gp = gaussian_process.GaussianProcess(theta0=1e-2, thetaL=1e-4, thetaU=1e-1) gp.fit(x__, y__) x : [[ 136. 137. 137. 132. 130. 130. 132. 133. 134. 135. 135. 134. 134. 1139. 1019. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 70. 24. 55. 0. 9. 0. 0.] [ 136. 137. 137. 132. 130

Gaussian Blur - standard deviation, radius and kernel size

折月煮酒 提交于 2019-12-03 12:32:31
问题 I've implemented a gaussian blur fragment shader in GLSL. I understand the main concepts behind all of it: convolution, separation of x and y using linearity, multiple passes to increase radius... I still have a few questions though: What's the relationship between sigma and radius? I've read that sigma is equivalent to radius, I don't see how sigma is expressed in pixels. Or is "radius" just a name for sigma, not related to pixels? How do I choose sigma? Considering I use multiple passes to

How can I fit a gaussian curve in python?

本秂侑毒 提交于 2019-12-03 12:00:56
问题 I'm given an array and when I plot it I get a gaussian shape with some noise. I want to fit the gaussian. This is what I already have but when I plot this I do not get a fitted gaussian, instead I just get a straight line. I've tried this many different ways and I just can't figure it out. random_sample=norm.rvs(h) parameters = norm.fit(h) fitted_pdf = norm.pdf(f, loc = parameters[0], scale = parameters[1]) normal_pdf = norm.pdf(f) plt.plot(f,fitted_pdf,"green") plt.plot(f, normal_pdf, "red")

Laplacian of gaussian filter use

六眼飞鱼酱① 提交于 2019-12-03 11:06:35
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? As you've probably figured out by now from the other answers and links, LoG filter detects edges and lines in the

Looking for C/C++ library calculating max of Gaussian curve using discrete values

假如想象 提交于 2019-12-03 10:08:14
I have some discrete values and assumption, that these values lie on a Gaussian curve. There should be an algorithm for max-calculation using only 3 discrete values. Do you know any library or code in C/C++ implementing this calculation? Thank you! P.S.: The original task is auto-focus implementation. I move a (microscope) camera and capture the pictures in different positions. The position having most different colors should have best focus. EDIT This was long time ago :-( I'just wanted to remove this question, but left it respecting the good answer. Matteo Italia You have three points that

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

痴心易碎 提交于 2019-12-03 09:59:39
问题 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 have a good example of how to use quad w/ a multidimensional function? But this led me to a more grand question about the best way to integrate a gaussian in general. I didn't find a gaussian integrate in scipy (to my surprise). My plan was to

Python-load data and do multi Gaussian fit

北战南征 提交于 2019-12-03 09:45:21
问题 I've been looking for a way to do multiple Gaussian fitting to my data. Most of the examples I've found so far use a normal distribution to make random numbers. But I am interested in looking at the plot of my data and checking if there are 1-3 peaks. I can do this for one peak, but I don't know how to do it for more. For example, I have this data: http://www.filedropper.com/data_11 I have tried using lmfit, and of course scipy, but with no nice results. Thanks for any help! 回答1: Simply make

Gaussian blur and convolution kernels

筅森魡賤 提交于 2019-12-03 08:52:07
问题 I do not understand what a convolution kernel is and how I would apply a convolution matrix to pixels in an image (I am talking about doing a Gaussian Blur operation on an image). Also could I get an explanation on how to create a kernel for a Gaussian Blur operation? I am reading this article but I cannot seem to understand how things are done... Thanks to anyone who takes time to explain this to me :), ExtremeCoder 回答1: The basic idea is that the new pixels of the image are created by an