gaussian

openCV Gaussian blur/smoothing of 3D Matrix/Histogram

廉价感情. 提交于 2019-11-29 15:54:05
I have a (3D) Histogram which I like to apply Gaussian smoothing on: cv::MatND Hist; In the 1D and 2D cases I blur it via: cv::GaussianBlur(Hist, Hist, cv::Size(1,3), 1.0);// 1D case cv::GaussianBlur(Hist, Hist, cv::Size(3,3), 1.0);// 2D case But I struggle to apply Gaussian blurring in the 3D case. Has anyone got an idea how to attempt this? Try use separable kernels like shown here: http://www.programming-techniques.com/2013/03/gaussian-blurring-using-separable.html 来源: https://stackoverflow.com/questions/18020438/opencv-gaussian-blur-smoothing-of-3d-matrix-histogram

Gaussian elimination without result for acceleration

喜夏-厌秋 提交于 2019-11-29 15:34:00
Good day, I'm working on a C library (for myself, code: https://github.com/BattlestarSC/matrixLibrary.git ) to handle matrix functions. This is mostly a learning/practice activity. One of my challenges is to take the determinant of a matrix efficiently. As my current attempts have failed, I wanted to take a different approach. I was reading though this method from MIT docs: http://web.mit.edu/18.06/www/Spring17/Determinants.pdf and it made a lot of sense. The issue I'm having is how to get to said point. As the Gaussian elimination method is good for multi-variable systems of equations, my

Converting 2d mask to 1d in Gaussian blur

冷暖自知 提交于 2019-11-29 15:22:22
问题 I am trying to implement the Gaussian blur. I have already computed the mask using the 2d function provided on wikipedia. I currently have a 2d matrix. I understand that in order to improve the running time, one can avoid using standard convolution methods due to the seperability of the Gaussian. In other words, as this This answer says, "In the Gaussian blur case it breaks down to two one dimensional operations". This page has been helpful, however, I do not understand how to obtain a 1d

how to generate a gaussian distribution using mysql user-defined function

我的梦境 提交于 2019-11-29 14:23:30
I like to use MySQL to do quantitative analysis and statistics. I would like to make a MySQL user-defined function of the form: sample_gaussian(mean, stdev) that returns a single randomized value sampled from a gaussian distribution having mean and standard deviation of the user-entered arguments. MySQL already has a function rand() that returns a random number, so I just need to know some pseudocode for constraining/transforming that value so that it falls into the right distribution. Any suggestions? BTW- This is my first stackoverflow question, so please forgive me if this question is

cuda matrix inverse gaussian jordan

半城伤御伤魂 提交于 2019-11-29 12:52:00
I didn't find any similar question to mine. I'm trying to write the gaussian-jordan inverse matrix algorithm. The idea of the algorithm is simple:) I want to inverse only a lower triangular matrix. I got almost correct answer. Where did I do sth wrong? Does anyone can help me? I will appreciate it. d _ A lower triangular matrix (nxn) dI identity matrix (nxn) n size of a matrix in one direction (n%16=0) dim3 threadsPerBlock(n/16,n/16); dim3 numBlocks(16,16); I know it is a simple implementation but at first I need it to work correctly :) Does anyone can help me or give me any hint? I will

Median variance in background subtraction

主宰稳场 提交于 2019-11-29 11:52:13
I am facing some issues in implementation of the paper Statistical Background Subtraction for a Mobile Observer . Question 1 : In Section 4.1, it talks about "... the median variance is computed over the entire image from the first components ..." I am confused what the authors actually mean by this. According to Stauffer & Grimson 's paper Adaptive Background Mixture Models for Real-Time Tracking(1999), for every background model a variance gets initialized (say with value 36) and then it gets updated for each pixel. Should the median of the first model's variance across all the pixels for

Swift Gaussian Blur an image [closed]

回眸只為那壹抹淺笑 提交于 2019-11-29 07:17:09
问题 I've been developing an app for quite a while now and am soon to finish. I have been blurring some images using the UIImage+ImageEffects.h library, but now I want to switch to Gaussian blurring an UIImage Is there any library or something similar that would allow me to gaussian blur an image in my app? 回答1: I use following in my app. func applyBlurEffect(image: UIImage){ var imageToBlur = CIImage(image: image) var blurfilter = CIFilter(name: "CIGaussianBlur") blurfilter.setValue(imageToBlur,

one Dimensional gauss convolution function in Matlab

梦想的初衷 提交于 2019-11-29 06:59:45
I am trying to write a function that returns a one dimentional gauss filter. the function took sigma as a parameter. The problem is that the function returns the same array for all sigmas. function gaussFilter=gauss(sigma) width = 3 * sigma; support = (-width :sigma: width); gaussFilter= exp( - (support).^2 / (2*sigma^2)); gaussFilter = gaussFilter/ sum(gaussFilter); Note that support array is calculated correctly but the problem arise when applying the exp. The idea is that the filter needs to be wide enough to represent the Gaussian function. The rule of thumb is to use filter size of at

Generating a random Gaussian double in Objective-C/C

可紊 提交于 2019-11-29 02:20:48
I'm trying to generate a random Gaussian double in Objective-C (the same as random.nextGaussian in Java). However rand_gauss() doesn't seem to work. Anyone know a way of achieving this? This link shows how to calculate it using the standard random() function. I should note that you'll likely have to make the ranf() routine that converts the output of random() from [0,MAX_INT] to be from [0,1] , but that shouldn't be too difficult. From the linked article: The polar form of the Box-Muller transformation is both faster and more robust numerically. The algorithmic description of it is: float x1,

Python unsharp mask

陌路散爱 提交于 2019-11-29 00:11:22
I want to use unsharp mask on a 16 Bit Image. The Image has 640 x 480 Pixel and is saved in a numpy array. In the first Step i blur the Image withe a Gaussian filter (three different Methods). After this i create a Mask by subtract the blur Image form the Original. in The last step i add the Mask multiplied by wightfaktor to the Original Image. But it don´t really works. Here is the Python code: Gaussian1 = ndimage.filters.gaussian_filter(Image,sigma=10.0) Gaussian2 = filters.gaussian_filter(Image,sigma=10.0) Gaussian3 = cv2.GaussianBlur(Image,(9,9),sigmaX=10.0) Mask1 = Image - Gaussian1