3 ms·
Discrete convolution definitely isn't the dot product. Given an n-tuple a and an m-tuple b, form a polynomial p_1 from the coefficients of a and a polynomial p_
by llamaz 9y ago
Discrete convolution definitely isn't the dot product. Given an n-tuple a and an m-tuple b, form a polynomial p_1 from the coefficients of a and a polynomial p_2 from the coefficients of p_2. The the convolution of a and b is the coefficients of a * b.
e.g. a= [1,2,3] and b=[4,5,6].
p_1 = 1 + 2x + 3x^2 + ...
p_2 = 4 + 5x + 6x^2 + ...
p_1 * p_2 = 4 + 13x + 28x^2 + ...
Hence the convolution of a and b is [4, 13, 28, ...].
Here's the full answer:
octave:1> conv([1,2,3], [4,5,6])
ans =
4 13 28 27 18
The intuition behind convolution to me for an image is uniform blurring. If you have a square shaped eraser, and you use it to blur a pencil sketch, the sketch will appear blocky and square shaped. Or perhaps a better analogy is painting: your wall will appear different depending on whether you use a paintbrush or a roller.
- mlevental 9y agowhy in the world are you presenting convolution of polynomials? i was being glib true but the crux of convolution (what's important for someone who expresses that they don't understand the mathematics) is elementwise multiplication i.e. dot product. yes you take a filter and sweep it across your input (or vice-versa depending on whether you're really talking about convolution or correlation) and that's important but in my opinion what's more important (obviously since that's what /i/ expressed) is elementwise multiplication. once you understand that (the elementwise multiplication) sweeping and padding and etc are simple to understand. >The intuition behind convolution to me for an image is uniform blurring. If you have a square shaped eraser, and you use it to blur a pencil sketch, the sketch will appear blocky and square shaped. Or perhaps a better analogy is painting: your wall will appear different depending on whether you use a paintbrush or a roller. this is a very bad example since you can easily convolve with filters that sharpen (e.g. literally any gaussian kernel). so you're really not illustrating convolution but instead convolution with an averaging filter (or something like that). in general you shouldn't jump to criticize someone's explanation to a student unless you are prepared to give a much better and (this is important) pedagogically sound explanation because 1 you look foolish 2 you sabotage the student's understanding.
- llamaz 9y agoI don't care about the "student", I'm telling /you/ what convolution is. It's not the dot product. "yes you take a filter and sweep it across your input..." Sweeping across your input is the heart and soul of convolution. I've taken courses in image processing, control theory, probability theory, and digital signal processing - and in all these contexts, convolution is always sweeping across in a very specific way. If you change a single minus sign, you get cross correlation which is completely different. I don't appreciate the rude tone you're taking so I will not be replying further. I didn't take that tone when replying to your initial message.
- mlevental 9y ago> don't care about the "student", I'm telling /you/ what convolution is. It's not the dot product. Then don't comment on expositions given to students. >Sweeping across your input is the heart and soul of convolution. But that's like just your opinion man. The definition is what the definition is and a component of it is the translation of the filter and a component of it is the weighted sum. It's up to each individual to decide what's the most significant component and each individual is free to adjust their focus according to the problem at hand. In this instant I chose to focus on the sum for the sake of pedagogy. >If you change a single minus sign, you get cross correlation which is completely different. No in fact you get literally the same function just flipped about t=0. I would not call that completely different. > I didn't take that tone when replying to your initial message. Read your response again and reflect some more because absolutely your initial message was antagonistic