Skip to main content

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.

Filter by
Sorted by
Tagged with
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?
winuall's user avatar
  • 463
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 ...
OverLordGoldDragon's user avatar
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(\...
OverLordGoldDragon's user avatar
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 ...
Mage Front's user avatar
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 ...
Mien's user avatar
  • 815
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 ...
user1724's user avatar
  • 169
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 ...
user26609's user avatar
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 ...
Shkodrani's user avatar
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 ...
pseudomarvin's user avatar
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?
Parag's user avatar
  • 743
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 ...
OverLordGoldDragon's user avatar
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 ...
endolith's user avatar
  • 15.9k
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): ...
matlabit's user avatar
  • 887
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 ...
user avatar
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, ...
Anand Mohan's user avatar
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}...
Panda's user avatar
  • 173
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),...
Roi Divon's user avatar
  • 193
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 ...
user8469759's user avatar
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 ...
OverLordGoldDragon's user avatar
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,...
TrendyParker's user avatar
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 ...
the_naive's user avatar
  • 363
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 ...
Johnny Pauling's user avatar
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 ...
bruin's user avatar
  • 213
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 ...
user4262's user avatar
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-...
Basj's user avatar
  • 1,297
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 ...
Struggling_In_Final's user avatar
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 $...
Mr guy's user avatar
  • 85
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 $\...
Alex Cerry's user avatar
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 ...
user24823's user avatar
  • 253
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 ...
Aaron Dawson's user avatar
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 ...
user782220's user avatar
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 ...
user2381442's user avatar
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 ...
Codemonkey's user avatar
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 ...
Simon Balfe's user avatar
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 ...
OstrichProjects's user avatar
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 ...
Neeks's user avatar
  • 393
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 ...
Mayank Tiwari's user avatar
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 ...
ACR's user avatar
  • 606
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 ...
Ahsan Yousaf's user avatar
  • 1,593
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 ...
ThomasLM's user avatar
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)...
Buzz bee's user avatar
  • 175
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. ...
Royi's user avatar
  • 20.2k
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 ...
jomegaA's user avatar
  • 669
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? ...
Mark's user avatar
  • 377
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 ...
bryhoyt's user avatar
  • 1,453
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 ...
Bowler's user avatar
  • 251
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 ...
Yinan Hu's user avatar
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 ...
M.H.'s user avatar
  • 53
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 ...
Uffe's user avatar
  • 355
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 ...
botman's user avatar
  • 71