Questions tagged [convolution]

A mathematical operation that combines two signals to generate a third signal. Convolution often arises in audio processing (e.g., filtering, reverb) and image processing (e.g., blurring, edge detection).

Convolution takes two signals and combines them to generate a third signal. For 1-D signals, the operation can be thought of as sliding the time-reverse of one signal along the other, and at each time step, taking the integral of the product of the signals (see wikipedia). The convolution operation describes the response of linear time-invariant systems to common input signals. Therefore, it commonly occurs in digital signal processing (DSP) contexts. Audio and image processing are two very common application areas for convolution.

A simple implementation for convolving two discrete time signals requires M*N multiply-add operations, where M and N are the lengths of the two signals. However, by taking advantage of the fact that convolution in the time domain is equivalent to multiplication in the frequency domain, and that transforming between domains can be implemented with O(N*log N) operations, convolution can be sped up. See here for more details.


Related tags

2052 questions
1
vote
2 answers

Linear convolution and cross-correlation of two vectors in Matlab using fft and same length output

I'm implementing an algorithm where I need to compute the linear convolution and cross-correlation between two 1D vectors a and b using the FFT. If the length of a is m and the length of b is n, then the total length of the resulting convolution…
Nicholas Kinar
  • 1,440
  • 5
  • 24
  • 36
1
vote
3 answers

The deconv() function in MATLAB does not invert the conv() function

I would like to convolve a time-series containing two spikes (call it Spike) with an exponential kernel (k) in MATLAB. Call the convolved response "calcium1". I would like to recover the original spike ("reconSpike") data using deconvolution with…
jfeng92
  • 341
  • 2
  • 3
  • 4
1
vote
1 answer

conv across dimensions matlab

I have a 3D volume and I want to apply a gaussian filter (with conv) on the first dimension. That means that I want each column to be convolved with the filter independently. I need something like: result = conv(cube, Gfilter, 1 ,'same') What I…
matlabit
  • 838
  • 2
  • 13
  • 31
1
vote
1 answer

Cyclic convolution with CUDA

In the FFT2D paper http://developer.download.nvidia.com/compute/cuda/2_2/sdk/website/projects/convolutionFFT2D/doc/convolutionFFT2D.pdf in the figure 1 and 2 it's stated that: assuming the image is bigger than the convolution kernel, which is …
Johnny Pauling
  • 12,701
  • 18
  • 65
  • 108
1
vote
1 answer

SuperResolution and Laplacian Term

I'm writing a program that allows to preform the SuperResolution algorithm. In the book, on the way of restoration, they uses the discrete Laplacian operator. I must somehow multiply the matrix (my image) by this Laplacian operator. So, i have to…
a3dsfcv
  • 1,146
  • 2
  • 20
  • 35
1
vote
1 answer

CUDA 2D Convolution kernel

I'm a beginner in CUDA and I'm trying to implement a Sobel Edge detection kernel. I'm using this code for it but it doesn't work. Can anyone tell me what is wrong with it. I just get some -1's and some really big values. __global__ void…
soroosh.strife
  • 1,181
  • 4
  • 19
  • 45
1
vote
2 answers

Replace matrix values with mean values extracted from smaller matrix in MATLAB

Let's say I have a 10 x 10 matrix. What I do then is iterate through the whole matrix with an 3 x 3 matrix (except from the edges to make it easier), and from this 3 x 3 matrix I get the mean/average value of this 3 x 3 space. What I then want to do…
dtd
  • 79
  • 11
0
votes
2 answers

Filter images android?

I'm using this algorithm to filter images in andriod. http://xjaphx.wordpress.com/2011/06/22/image-processing-convolution-matrix/ But the images are not as expected, where I can find other ways to do this. You see that applications already do this,…
tebitoq
  • 165
  • 1
  • 13
0
votes
1 answer

2D-filter algorithm

Is there anyway to do this faster? I want to reduce the O(N^2) complexity to something lower. Note: The filter kernel is rotational symmetric around N/2. for(unsigned int k=N/2;k
user877329
  • 6,717
  • 8
  • 46
  • 88
0
votes
1 answer

Is it possible to combine Convolution Matrices to apply several transformations at once?

Theoretically it should be possible to combine transformation or color matrices, through addition or multiplication (I'm lame when it comes to such math). Is it possible?
jayarjo
  • 16,124
  • 24
  • 94
  • 138
0
votes
1 answer

OpenCV GPU convolve function and the missing border

I have a question about the Convolve function in OpenCV using GPU acceleration. The speed of the convolutions are roughly 3.5 faster using GPU when running: convolve(src_32F, kernel, cresult, false, cbuffer); However the image borders are missing…
0
votes
1 answer

1D convolution in each row of an image in the x-direction

I would like to calculate a 1D convolution in each row of an image in the x-direction. For that I am trying to use the example shown at…
Antonio
  • 569
  • 5
  • 20
0
votes
1 answer

MATLAB SPMD and nlfilter - change window size

I am using a modified version of CONTRAST2_SPMD by John Burkardt to run a 3x3 variance calculation on a large grayscale image. The advantage of this is that I can use the PCT to use 8 cores on my local machine, however I would like to change the…
MBL
  • 1,197
  • 2
  • 11
  • 17
0
votes
0 answers

Custom deep learning layers in MATLAB

I am working on a image classification problem with CNN. I was trying to build my own customized convolution layer for a deep learning architecture in matlab. The following class was written for the same. classdef CustomConvolutionLayer <…
0
votes
1 answer

Shifted result for convolution of two functions when using asymmetric arrays

I have been having problems fitting a spectrum that requires me to use a convolution of a certain lineshape and a detector resolution function. When I use a symmetric array (array centered at zero) the convolution seems to work well. However a shift…