<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Separable convolution</title>
	<atom:link href="http://blogs.mathworks.com/steve/2006/10/04/separable-convolution/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.mathworks.com/steve/2006/10/04/separable-convolution/</link>
	<description>Steve Eddins manages the Image &#38; Geospatial development team at The MathWorks and coauthored Digital Image Processing Using MATLAB. He writes here about image processing concepts, algorithm implementations, and MATLAB.</description>
	<lastBuildDate>Wed, 01 Feb 2012 13:58:45 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2006/10/04/separable-convolution/#comment-23221</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Sat, 26 Jun 2010 14:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/?p=78#comment-23221</guid>
		<description>Jonathan&#8212;If you mean &quot;separable filter,&quot; then yes, that is the same thing as separable convolution.</description>
		<content:encoded><![CDATA[<p>Jonathan&mdash;If you mean &#8220;separable filter,&#8221; then yes, that is the same thing as separable convolution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan</title>
		<link>http://blogs.mathworks.com/steve/2006/10/04/separable-convolution/#comment-23220</link>
		<dc:creator>Jonathan</dc:creator>
		<pubDate>Sat, 26 Jun 2010 12:59:49 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/?p=78#comment-23220</guid>
		<description>Hi Steve, I was wondering whether or not this content of this article relates at all to a Separability filter - read it in a paper and I have not been able to get a clear definition.
Thanks!</description>
		<content:encoded><![CDATA[<p>Hi Steve, I was wondering whether or not this content of this article relates at all to a Separability filter &#8211; read it in a paper and I have not been able to get a clear definition.<br />
Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Felipe</title>
		<link>http://blogs.mathworks.com/steve/2006/10/04/separable-convolution/#comment-23214</link>
		<dc:creator>Felipe</dc:creator>
		<pubDate>Wed, 23 Jun 2010 12:19:59 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/?p=78#comment-23214</guid>
		<description>Hi Steve,

You describe how to determine if a filter is separable in the time domain. What if I have an filter in the frequency domain only, and want to recognize if it is separable, and possibly write the h1 and h2 components of the filter in the time domain, whithout using ifft2?</description>
		<content:encoded><![CDATA[<p>Hi Steve,</p>
<p>You describe how to determine if a filter is separable in the time domain. What if I have an filter in the frequency domain only, and want to recognize if it is separable, and possibly write the h1 and h2 components of the filter in the time domain, whithout using ifft2?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2006/10/04/separable-convolution/#comment-22049</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Mon, 17 Aug 2009 13:58:32 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/?p=78#comment-22049</guid>
		<description>Vasek&#8212;I believe convn does not use extra memory besides that required for the input and output arrays. So if you are running out of memory with convn, a block-based approach will not help you.  You might want to look at the &lt;a href=&quot;http://www.mathworks.com/support/tech-notes/1100/1107.html&quot; rel=&quot;nofollow&quot;&gt;&quot;Avoiding Out of Memory Errors&quot;&lt;/a&gt; support page for more information and tips.</description>
		<content:encoded><![CDATA[<p>Vasek&mdash;I believe convn does not use extra memory besides that required for the input and output arrays. So if you are running out of memory with convn, a block-based approach will not help you.  You might want to look at the <a href="http://www.mathworks.com/support/tech-notes/1100/1107.html" rel="nofollow">&#8220;Avoiding Out of Memory Errors&#8221;</a> support page for more information and tips.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vasek</title>
		<link>http://blogs.mathworks.com/steve/2006/10/04/separable-convolution/#comment-22018</link>
		<dc:creator>Vasek</dc:creator>
		<pubDate>Wed, 29 Jul 2009 09:13:51 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/?p=78#comment-22018</guid>
		<description>Hi Steve, 

Concerning the built-in n-D convolution methods: 

MATLAB (v2008b) keeps failing due to out-of-memory errors when convolving large 3D arrays (e.g. (256)^3) with a ~16^3 (general, non-separable) kernel. 

I&#039;ve tried imfilter, convn or convnfft from the filexchange, same result ... 

Would it make sense to add an functionality that transparently breaks down the task into filtering smaller sub-arrays and stitches together the results, depending on the free contiguous memory blocks, to prevent memory errors?  Or can you think of another solution ? 

Thanks

Vasek</description>
		<content:encoded><![CDATA[<p>Hi Steve, </p>
<p>Concerning the built-in n-D convolution methods: </p>
<p>MATLAB (v2008b) keeps failing due to out-of-memory errors when convolving large 3D arrays (e.g. (256)^3) with a ~16^3 (general, non-separable) kernel. </p>
<p>I&#8217;ve tried imfilter, convn or convnfft from the filexchange, same result &#8230; </p>
<p>Would it make sense to add an functionality that transparently breaks down the task into filtering smaller sub-arrays and stitches together the results, depending on the free contiguous memory blocks, to prevent memory errors?  Or can you think of another solution ? </p>
<p>Thanks</p>
<p>Vasek</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2006/10/04/separable-convolution/#comment-21810</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Sat, 30 May 2009 17:31:19 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/?p=78#comment-21810</guid>
		<description>GT&#8212;Just filter three times in succession.  Use a one-dimensional Gaussian filter oriented along the 1st dimension, then along the 2nd dimension, then along the 3rd.</description>
		<content:encoded><![CDATA[<p>GT&mdash;Just filter three times in succession.  Use a one-dimensional Gaussian filter oriented along the 1st dimension, then along the 2nd dimension, then along the 3rd.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GT</title>
		<link>http://blogs.mathworks.com/steve/2006/10/04/separable-convolution/#comment-21800</link>
		<dc:creator>GT</dc:creator>
		<pubDate>Thu, 28 May 2009 14:11:27 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/?p=78#comment-21800</guid>
		<description>Hey Steve, thanks for the insight into separable kernels. I would like to know how what you have written in the initial posts applies to 3D.

For instance I have a 3D mask  and intend to convolve with a guassian. I know that the gaussian is separable, how do I go about separating the kernel for convolution in 3D ?

regards

GT</description>
		<content:encoded><![CDATA[<p>Hey Steve, thanks for the insight into separable kernels. I would like to know how what you have written in the initial posts applies to 3D.</p>
<p>For instance I have a 3D mask  and intend to convolve with a guassian. I know that the gaussian is separable, how do I go about separating the kernel for convolution in 3D ?</p>
<p>regards</p>
<p>GT</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Randy Yates</title>
		<link>http://blogs.mathworks.com/steve/2006/10/04/separable-convolution/#comment-21709</link>
		<dc:creator>Randy Yates</dc:creator>
		<pubDate>Sun, 26 Apr 2009 00:34:33 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/?p=78#comment-21709</guid>
		<description>Steve, ignore that previous post - i was getting confused between the multiplication operator and the convolution operator.</description>
		<content:encoded><![CDATA[<p>Steve, ignore that previous post &#8211; i was getting confused between the multiplication operator and the convolution operator.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Randy Yates</title>
		<link>http://blogs.mathworks.com/steve/2006/10/04/separable-convolution/#comment-21706</link>
		<dc:creator>Randy Yates</dc:creator>
		<pubDate>Sat, 25 Apr 2009 21:35:58 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/?p=78#comment-21706</guid>
		<description>Hi Steve,

I am just entering the image processing realm and have what is probably a very basic question. 

Let G_MxM be a separable filter given by

  Gx_MxM = d_Mx1 * s_1xM,

where &quot;*&quot; denotes matrix multiplication.

The result of filtering [1] an input matrix X at row n and column m by
this Gx matrix is then

  Yx_M(n,m) = X_M(n,m) * Gx
           = X_M(n,m) * d * s
           = (X_M(n,m) * d) * s,

where X_M(n,m) and Yx_M(n,x) are the MxM matrices at n, m. 

Further expanding this gives 

  Yx(n,m) = s(m) * \sum_{k = 0}{M - 1} X(n, m + k) d(k),

where X(n,m) and Yx(n,m) are the elements of the matrices X and Yx at row
n and column m, respectively.

Now note that the product of X_M and d is a 1D convolution of the filter
d along the nth row of X_M, and the value s(m) simply scales that
convolution. 

Thus if d is the simple 1D difference filter [1 0 -1] (as it is for a
Sobel filter), then this operation produces the derivative of X_M along
the nth row of X_M, or what I would call the gradient in the x
direction.

Fine. Great.

But then, if Gy = Gx&#039;, as it is here for a Sobel filter,

  http://en.wikipedia.org/wiki/Sobel_operator

then the gradient in the y direction is

  Yy_M(n,m) = X_M(n,m) * Gy

and therefore

  Yy(n,m) = d(m) * \sum_{k = 0}{M - 1} X(n, m+k) s(k).

By the same mathematics as above, we see that the product
of X_M and s is a 1D convolution of the filter s along
the nth row of X_M.

But this is NOT the gradient of X in the y direction, since such a
gradient would have to be performed on the COLUMNS of X.

So from this reasoning, it seems that to determine the x-gradient
of X we should compute

  X * Gx

but to determine the y-gradient of X we should compute

  Gy * X.

Is this correct? If so, then isn&#039;t is also true that to perform these
gradients correctly one must have a side-specific image filter
operation? Specifically, my question is, if this is true, how can the
Matlab/Octave image processing library&#039;s imfilter(X,Gx) and
imfilter(X,Gy) compute both gradients correctly, since it presumably
multiplies on only one &quot;side&quot; and thus one would be incorrect?

--Randy


[1] We ignore various details such as edge effects and the sign-reversal
that standard convolution requires here to simplify the notation and
presentation.</description>
		<content:encoded><![CDATA[<p>Hi Steve,</p>
<p>I am just entering the image processing realm and have what is probably a very basic question. </p>
<p>Let G_MxM be a separable filter given by</p>
<p>  Gx_MxM = d_Mx1 * s_1xM,</p>
<p>where &#8220;*&#8221; denotes matrix multiplication.</p>
<p>The result of filtering [1] an input matrix X at row n and column m by<br />
this Gx matrix is then</p>
<p>  Yx_M(n,m) = X_M(n,m) * Gx<br />
           = X_M(n,m) * d * s<br />
           = (X_M(n,m) * d) * s,</p>
<p>where X_M(n,m) and Yx_M(n,x) are the MxM matrices at n, m. </p>
<p>Further expanding this gives </p>
<p>  Yx(n,m) = s(m) * \sum_{k = 0}{M &#8211; 1} X(n, m + k) d(k),</p>
<p>where X(n,m) and Yx(n,m) are the elements of the matrices X and Yx at row<br />
n and column m, respectively.</p>
<p>Now note that the product of X_M and d is a 1D convolution of the filter<br />
d along the nth row of X_M, and the value s(m) simply scales that<br />
convolution. </p>
<p>Thus if d is the simple 1D difference filter [1 0 -1] (as it is for a<br />
Sobel filter), then this operation produces the derivative of X_M along<br />
the nth row of X_M, or what I would call the gradient in the x<br />
direction.</p>
<p>Fine. Great.</p>
<p>But then, if Gy = Gx&#8217;, as it is here for a Sobel filter,</p>
<p>  <a href="http://en.wikipedia.org/wiki/Sobel_operator" rel="nofollow">http://en.wikipedia.org/wiki/Sobel_operator</a></p>
<p>then the gradient in the y direction is</p>
<p>  Yy_M(n,m) = X_M(n,m) * Gy</p>
<p>and therefore</p>
<p>  Yy(n,m) = d(m) * \sum_{k = 0}{M &#8211; 1} X(n, m+k) s(k).</p>
<p>By the same mathematics as above, we see that the product<br />
of X_M and s is a 1D convolution of the filter s along<br />
the nth row of X_M.</p>
<p>But this is NOT the gradient of X in the y direction, since such a<br />
gradient would have to be performed on the COLUMNS of X.</p>
<p>So from this reasoning, it seems that to determine the x-gradient<br />
of X we should compute</p>
<p>  X * Gx</p>
<p>but to determine the y-gradient of X we should compute</p>
<p>  Gy * X.</p>
<p>Is this correct? If so, then isn&#8217;t is also true that to perform these<br />
gradients correctly one must have a side-specific image filter<br />
operation? Specifically, my question is, if this is true, how can the<br />
Matlab/Octave image processing library&#8217;s imfilter(X,Gx) and<br />
imfilter(X,Gy) compute both gradients correctly, since it presumably<br />
multiplies on only one &#8220;side&#8221; and thus one would be incorrect?</p>
<p>&#8211;Randy</p>
<p>[1] We ignore various details such as edge effects and the sign-reversal<br />
that standard convolution requires here to simplify the notation and<br />
presentation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: amcum</title>
		<link>http://blogs.mathworks.com/steve/2006/10/04/separable-convolution/#comment-21347</link>
		<dc:creator>amcum</dc:creator>
		<pubDate>Thu, 01 Jan 2009 03:10:18 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/?p=78#comment-21347</guid>
		<description>Can you help me to perform 2d convolution of a large image (10000x10000) with conv2 matlab function.</description>
		<content:encoded><![CDATA[<p>Can you help me to perform 2d convolution of a large image (10000&#215;10000) with conv2 matlab function.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

