<instructions>Your goal is to analyze the following comment and estimate how highly it will be upvoted by the Hacker News community.</instructions><comment><author>kragen</author><text>This is super cool but it&amp;#x27;s unfortunate that it clamps negative result values to black.&lt;p&gt;It&amp;#x27;s probably worth mentioning that there are a lot of ways to implement convolution with a kernel, and the kernel can be of any size, not just 3×3.  The explanation here shows how to implement the output-side algorithm nonrecursively; &lt;a href=&quot;http:&amp;#x2F;&amp;#x2F;www.dspguide.com&amp;#x2F;ch6&amp;#x2F;3.htm&quot; rel=&quot;nofollow&quot;&gt;http:&amp;#x2F;&amp;#x2F;www.dspguide.com&amp;#x2F;ch6&amp;#x2F;3.htm&lt;/a&gt; gives this for the one-dimensional case.  But you can implement it on the input side instead (iterating over the input samples instead of the output samples), there are kernels that have a much more efficient recursive implementation (including zero-phase kernels using time-reversal), you can implement very large kernels if you can afford to do the convolution in the frequency domain, and there&amp;#x27;s a whole class of kernels that have efficient sparse filter cascade representations, including large Gaussians.&lt;p&gt;(To say nothing of convolutions over other rings.)</text><parent_chain></parent_chain></comment><story><title>Image Kernels explained visually</title><url>http://setosa.io/ev/image-kernels/</url></story>
<instructions>Your goal is to analyze the following comment and estimate how highly it will be upvoted by the Hacker News community.</instructions><comment><author>guelo</author><text>How are the kernels derived? Is it just an art where people play with the matrices to see their effects or is there well-understood math behind them?</text><parent_chain></parent_chain></comment><story><title>Image Kernels explained visually</title><url>http://setosa.io/ev/image-kernels/</url></story>