Questions tagged [convolution]
Convolution is a mathematical operation on two functions f and g, producing a third function that is typically viewed as a modified version of one of the original functions.
163
questions
36
votes
6
answers
25k
views
Flipping the impulse response in convolution
During convolution on a signal, why do we need to flip the impulse response during the process?
6
votes
1
answer
771
views
Equivalence between "windowed Fourier transform" and STFT as convolutions/filtering
I've heard, that "windowed Fourier transform" is but one perspective on STFT, and that STFT is fundamentally convolutions of windowed complex sinusoids with the input, i.e. bandpass ...
4
votes
1
answer
2k
views
PyWavelets CWT: normalization? Vs Scipy?
Related. The equation being implemented normalizes by sqrt(1 / scale):
$$
C_{a, b} = \frac{1}{\sqrt{a}} \sum_k s(k)\left( \int_{-\infty}^{k+1} \overline{\psi \left(\...
5
votes
1
answer
876
views
Replicate MATLAB's `conv2()` in Frequency Domain
When conv2d is on same mode, the image needs no padding, because the result is the same size as the image.
When ...
55
votes
5
answers
55k
views
What is the difference between convolution and cross-correlation?
I've found on multiple sites that convolution and cross-correlation are similar (including the tag wiki for convolution), but I didn't find anywhere how they differ.
What is the difference between ...
16
votes
13
answers
38k
views
Deconvolution of 1D Signals Blurred by a Gaussian Kernel
I have convolved a random signal with a a Gaussian and added noise (Poisson noise in this case) to generate a noisy signal. Now I would like to deconvolve this noisy signal to extract the original ...
7
votes
1
answer
5k
views
1D Deconvolution with Gaussian Kernel (MATLAB)
Suppose that I know the output and the transfer functions of a system and I would like to calculate the input function using deconvolution.
To get a grasp of the idea I have created a simple ...
6
votes
1
answer
2k
views
Strategy / Method for Implementation of the Fastest 1D Linear Convolution / Correlation
I am after the method and its implementation of the fastest convolution of 1d signals:
$$ y \left[ n \right] = \left( x \ast h \right) \left[ n \right] $$
Where $ \ast $ is the linear convolution ...
5
votes
1
answer
3k
views
Applying Image Filtering (Circular Convolution) in Frequency Domain
To filter an image we can:
Use a 3x3, 5x5, 7x7, etc. filter, that is convolve the image and the filter in the space domain.
Use a FFT on both the image and the filter, multiply them together in the ...
64
votes
17
answers
183k
views
What is the physical meaning of the convolution of two signals?
If we convolve 2 signals we get a third signal. What does this third signal represent in relation to the input signals?
3
votes
1
answer
821
views
Why is CWT implemented with FFT convolution?
Some implementations generate wavelets in frequency domain.
Besides speed per FFT convolution, is there any reason?
All wavelets will be sampled at same length - 100,000 samples even for those having ...
27
votes
1
answer
9k
views
How to circularly shift a signal by a fraction of a sample?
The shift theorem says:
Multiplying $x_n$ by a linear phase $e^{\frac{2\pi i}{N}n m}$ for some integer m corresponds to a circular shift of the output $X_k$: $X_k$ is replaced by $X_{k-m}$, where ...
12
votes
2
answers
5k
views
Generate the Convolution Matrix of 2D Kernel for Convolution Shape of `same`
I want to find a convolution matrix for a certain 2D kernel $ H $.
For example, for image Img of size $ m \times n $ , I want (in MATALB):
...
9
votes
3
answers
6k
views
How to Zero Pad in Order to Perform Filtering in the Fourier (Frequency) Domain?
Consider an $M\times N$ image $f$ and an $G \times K$ filter $h$. Given that convolution in the spatial domain corresponds to multiplication in the Fourier domain, then we can perform a convolution of ...
9
votes
3
answers
2k
views
Deconvolution of Synthetic 1D Signals - How To?
I convolved a square wave with a Gaussian wave using linear convolution. Can I get the original square wave back by deconvolving my output with the Gaussian function?
I took the FFT of both signals, ...
7
votes
2
answers
14k
views
How to Prove a 2D Filter Is Separable?
I want to prove that 2D Gaussian filter is separable and we can separate it into two dimensions, my problem is about the size of filters. we should prove that $G(x,y)*I$(where $G(x,y)=$$\begin{bmatrix}...
5
votes
1
answer
3k
views
Generate the Matrix Form of 2D Convolution Kernel
We know that a convolution can be replaced by a multiplication with a Toeplitz / Circulant Matrix. Meaning, assume I have convolution kernel $ h $ and matrix $ I $ (Of size $ m \times m $ for example),...
5
votes
1
answer
1k
views
Gaussian Equivalent of Convolving an Image 50 Times with a Box Filter
I have a image that I'm convolving 50 times with a box filter, and I like to replace this with a single gaussian filter. Because both box filter and gaussian filter are separable I can just study the ...
2
votes
1
answer
3k
views
PyWavelets CWT implementation
I seek to understand PyWavelets' implementation of the Continuous Wavelet Transform, and how it compares to the more 'basic' version I've coded and provided here. In particular:
How is integrated ...
1
vote
3
answers
2k
views
Derivation of the Optimal Matched Filter - Convolution vs. Correlation
On the Wikipedia page for Matched Filters here, there is a matrix algebra derivation for an optimal matched filter. Now, considering the output of an LTI system is found using the convolution operator,...
22
votes
1
answer
45k
views
Difference Between Correlation and Convolution in the Context of Image Processing
Could you please clearly explain what is the difference between correlation and convolution that is done by a filter on an image?
I mean in terms of signal processing definition I know that ...
7
votes
2
answers
2k
views
Kernel Convolution in Frequency Domain - Cyclic Padding
I don't know whether this is the right place to post this, but I suppose it is.
I know that frequency multiplication = circular convolution in time space for discrete signals (vectors).
I also know ...
6
votes
1
answer
2k
views
Why a Convolution Matrix Is Called a Kernel?
According to Wikipedia:
In image processing, a kernel, convolution matrix, or mask is a small matrix.
I am wondering, why the matrix is called a kernel? Does it has anything to do with kernel ...
6
votes
1
answer
1k
views
Filtering $ n \times n $ Images by Separable $ m \times m $ Filters. Computation Time for Filtering Using FFT, 2D Convolution and Two 1D Convolutions
Consider filtering square $n\times n$ images by square, separable $m\times m$ filters.
Give general equations for the computation time for the following approaches to this:
Filtering using FFT
2-D ...
5
votes
3
answers
3k
views
Estimating the Impulse Response of the Room Using Sweep Signal Microphone Recorded Signal (Input & Output of a Convolution)
I played this signal A (a 20Hz to 20000Hz sinusoidal sweep in 10 seconds) with a studio monitor speaker in a big church, and I recorded the result B with good microphones.
The result is very reverb-...
5
votes
3
answers
1k
views
Why is sweeping in convolution so confusing
From this formula, I thought that time constant (m or tau) is the variable sweeping from -infinity to infinity.
But in this visualisation https://lpsa.swarthmore.edu/Convolution/CI.html, it is t the ...
4
votes
1
answer
2k
views
2D Frequency Domain Convolution Using FFT (Convolution Theorem)
In the time domain I have an image matrix ($256x256$) and a gaussian blur kernel ($5x5$). I've used FFT within Matlab to convert both the image and kernel to the frequency domain as zero padded $...
4
votes
2
answers
5k
views
Parameters of Gaussian Kernel in the Context of Image Convolution
Hi Everyone i am new at image processing. I copy code from Code with C - Gaussian Filter Generation in C++, I have image $600 \times 480$ gray scale.
What will be the value of standard deviation or $\...
0
votes
1
answer
1k
views
understanding discrete-time convolution in LTI systems
I'm trying to understand the discrete-time convolution for LTIs and its graphical representation. standard explanations (like: this one) start with the idea of decomposing an input signal $x[t]$ into ...
10
votes
1
answer
5k
views
How do real-time convolution plugins process audio so quickly
Okay, so in Logic Pro I can load up a Space Designer plugin (convolution reverb) with an impulse that's 9.1 seconds long, turn my mic on, and get real-time convolution reverb as the mic records ...
7
votes
2
answers
8k
views
Sampling Theorem and Dirac Comb
I am reading "The Scientist and Engineer's Guide to Digital Signal Processing" and trying to understand Figure 3.5 below which is about the sampling theorem and aliasing.
I do not understand the ...
6
votes
1
answer
16k
views
How are two signals multiplied? And how is it different from convolving two signals?
Suppose that I have two signals $x[n] = \left\{2,4,1\right\}$ and $p[n] = \left\{5,1,8\right\}$ and I want to multiply them.
How do you do that?
How different is it from convolving two signals?
I ...
5
votes
4
answers
384
views
After advice about detecting focus quality of objects in a photo detected using YoloV3
I've spent the last couple of days playing with YoloV3, and have had very good results. My use case is sports photography, and the object detection for people/bikes etc is very very good, I'm very ...
5
votes
1
answer
2k
views
Applying a 2D Convolution Using 2D FFT
So I was following the article Victor Podlozhnyuk (nVidia) - FFT Based 2D Convolution (Page 7).
I have expanded the kernel to the correct way they have done it. However when it comes to the part on ...
3
votes
1
answer
983
views
2D deconvolution of recorded electron beam data
I'm currently working on a project that involves using an electron gun and it would be really nice to know the spot shape of the electrons coming out of the gun (the frequency of electrons at some x,y ...
3
votes
4
answers
15k
views
What is convolution of two sine waves (tones)?
Convolution of two sine waves (or tones as called in audio) is theoretically not defined as the integral is infinite. Taking finite duration windowed sine waves and doing there convolution ...
2
votes
3
answers
3k
views
Why unit impulse function is used to find impulse response of an LTI system?
Hello i am working in digital image restoration field, recently i have studied concept of convolution, i studied that to find the impulse response/point-spread function of an LTI system, an unit ...
2
votes
3
answers
2k
views
Linear and Circular Convolution in Fourier Domain (DFT)
Suppose we have two vectors A and B of length 100 and 80 obtained as a function of time. If we wish to perform convolution of the two vectors in the Fourier domain, we need to multiply the Fourier ...
2
votes
2
answers
132
views
Is downsampling LTI for bandlimited inputs?
This question stems from the discussion we had on a previous question of mine.
The point of contention is whether the downsampling operator is time invariant or not. Which gives us a new condition to ...
2
votes
3
answers
4k
views
Get a N-FFT with two N/2-FFT already computed
After somme researchs on the web, I don't find the answer of my problem (or I don't understand it) and I hope this post will succeed.
I'm working on a real-time FFT convolution algorithm (C++) which ...
1
vote
2
answers
5k
views
Is convolution distributive over multiplication?
Is there any formula or expansion for
$$a(t)*[b(t) \cdot c(t)]$$
$$a(t) \cdot[b(t)*c(t)]$$
where $*$ denotes the convolution?
By expansion I mean something like $a(t)\cdot[b(t)+c(t)]=a(t)b(t)+a(t)...
1
vote
2
answers
661
views
The Gradient / Derivative of Least Squares of 2D Image Convolution
Given the objective function:
$$ \frac{1}{2} {\left\| h \ast x - y \right\|}_{2}^{2} $$
Where $ h $ is the 2D convolution kernel and $ x $ is the 2D convolution image and $ y $ is a given 2D image.
...
1
vote
1
answer
618
views
Convolution kernel in Bluestein's algorithm
For any sequence zero-padding in one domain will result in interpolation in another domain and depending on center-padding or padding to right in one domain will either preserver or distort the phase ...
1
vote
2
answers
3k
views
Generate the Matrix Form of 1D Convolution Kernel
As a follow up to Generate the Matrix Form of 2D Convolution Kernel, could someone explain how to generate the matrix form of a 1D convolution kernel?
How different convolutions shapes are handled?
...
23
votes
6
answers
17k
views
What are the problems with designing an FIR filter using FFT?
I'm trying to get an understanding of the relationship between an FIR filter designed from "first principles" using a filter kernel with convolution, and a filter designed in one of two ways using FFT ...
14
votes
1
answer
2k
views
How to find the convolution kernel in frequency domain?
I have a two vectors of spatial data (each about 2000 elements in length). One is a convolved version of the other. I am trying to determine the kernel that would produce such a convolution. I know ...
6
votes
2
answers
1k
views
Circular Convolution Matrix of $ {H}^{H} {H} $
We all know that Discrete Fourier Transform (DFT) corresponds to circular (not linear) convolution. That is to say, if $x(n),h(n)$ and $y(n)$ is the original signal, the filter and output signal in ...
5
votes
2
answers
2k
views
Show Equivalence Between Multiplication in Time Domain to Convolution in Frequency Domain
My goal is to compute the Fourier of the product between two discrete time signals, y1 and y2. This can be done by computing the ...
5
votes
3
answers
4k
views
Simulating analog filter using convolution or converting with fft
My task is simple; I want to simulate analog low-pass filtering of an input signal, using Python. Note that the input signal is an array of values, not an analytical function.
My first question is if ...
5
votes
1
answer
800
views
How to Use Convolution Theorem to Apply a 2D Convolution on an Image
How do I actually apply the convolution theorem? I have my fourier transformed image matrix, and a Fourier transformed kernel, but how do I actually multiply these together to achieve the intended ...