<?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: Nonlinear operations using imfilter</title>
	<atom:link href="http://blogs.mathworks.com/steve/2008/07/07/nonlinear-operations-using-imfilter/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.mathworks.com/steve/2008/07/07/nonlinear-operations-using-imfilter/</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>Sat, 11 Feb 2012 18:27:50 +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/2008/07/07/nonlinear-operations-using-imfilter/#comment-23762</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Fri, 03 Dec 2010 15:32:32 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/2008/07/07/nonlinear-operations-using-imfilter/#comment-23762</guid>
		<description>Sean&#8212;A lot of the mathematical details are omitted in this post. See the places, for example, where I include a note that says &quot;scale factors omitted.&quot;  There is a significant difference between stdfilt and the code in this post because, well, they don&#039;t compute the same thing.</description>
		<content:encoded><![CDATA[<p>Sean&mdash;A lot of the mathematical details are omitted in this post. See the places, for example, where I include a note that says &#8220;scale factors omitted.&#8221;  There is a significant difference between stdfilt and the code in this post because, well, they don&#8217;t compute the same thing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean de Wolski</title>
		<link>http://blogs.mathworks.com/steve/2008/07/07/nonlinear-operations-using-imfilter/#comment-23760</link>
		<dc:creator>Sean de Wolski</dc:creator>
		<pubDate>Thu, 02 Dec 2010 22:20:56 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/2008/07/07/nonlinear-operations-using-imfilter/#comment-23760</guid>
		<description>Okay, I guess by opening stdfilt you can see the difference between the two.  So why the discrepancy?</description>
		<content:encoded><![CDATA[<p>Okay, I guess by opening stdfilt you can see the difference between the two.  So why the discrepancy?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean de Wolski</title>
		<link>http://blogs.mathworks.com/steve/2008/07/07/nonlinear-operations-using-imfilter/#comment-23759</link>
		<dc:creator>Sean de Wolski</dc:creator>
		<pubDate>Thu, 02 Dec 2010 22:01:36 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/2008/07/07/nonlinear-operations-using-imfilter/#comment-23759</guid>
		<description>Hi Steve,
I realize this is old but I have a question about it.  Why is there such a significant difference between your imfilter method and stdfilt with numbers in the range 0-255.  Is it just numerical round off?  The thing that irks me is that the greatest difference between the two is in the middle where there is a significant standard deviation and that the standard deviation from your imfilter example doesn&#039;t seem reasonable.

Thanks!
-Sean

%%%
I = double(imread(&#039;cameraman.tif&#039;));

h = ones(11,11);
Istd1 = sqrt(imfilter(I.^2, h, &#039;symmetric&#039;) - imfilter(I, h, &#039;symmetric&#039;).^2 / numel(h));

Istd2 = stdfilt(I,h);

imshow(Istd1-Istd2,[])

norm(Istd1(:)-Istd2(:))
%{
ans =   75950
%}

max([Istd1(:), Istd2(:)])
%{
ans = 1092.4       99.719
%}</description>
		<content:encoded><![CDATA[<p>Hi Steve,<br />
I realize this is old but I have a question about it.  Why is there such a significant difference between your imfilter method and stdfilt with numbers in the range 0-255.  Is it just numerical round off?  The thing that irks me is that the greatest difference between the two is in the middle where there is a significant standard deviation and that the standard deviation from your imfilter example doesn&#8217;t seem reasonable.</p>
<p>Thanks!<br />
-Sean</p>
<p>%%%<br />
I = double(imread(&#8216;cameraman.tif&#8217;));</p>
<p>h = ones(11,11);<br />
Istd1 = sqrt(imfilter(I.^2, h, &#8216;symmetric&#8217;) &#8211; imfilter(I, h, &#8216;symmetric&#8217;).^2 / numel(h));</p>
<p>Istd2 = stdfilt(I,h);</p>
<p>imshow(Istd1-Istd2,[])</p>
<p>norm(Istd1(:)-Istd2(:))<br />
%{<br />
ans =   75950<br />
%}</p>
<p>max([Istd1(:), Istd2(:)])<br />
%{<br />
ans = 1092.4       99.719<br />
%}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2008/07/07/nonlinear-operations-using-imfilter/#comment-23298</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Tue, 20 Jul 2010 11:51:13 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/2008/07/07/nonlinear-operations-using-imfilter/#comment-23298</guid>
		<description>Diego&#8212;It doesn&#039;t matter; the procedure still gives the correct answer. Note that the geometric mean of a set of values containing a 0 is 0.  Try this:

&lt;pre class=&quot;code&quot;&gt;
exp(-inf)
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Diego&mdash;It doesn&#8217;t matter; the procedure still gives the correct answer. Note that the geometric mean of a set of values containing a 0 is 0.  Try this:</p>
<pre class="code">
exp(-inf)
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Diego</title>
		<link>http://blogs.mathworks.com/steve/2008/07/07/nonlinear-operations-using-imfilter/#comment-23295</link>
		<dc:creator>Diego</dc:creator>
		<pubDate>Tue, 20 Jul 2010 02:58:24 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/2008/07/07/nonlinear-operations-using-imfilter/#comment-23295</guid>
		<description>I am aware this post is old, but just to note:

At this line:
geo_mean = imfilter(log(I), h, &#039;replicate&#039;);

You are calculating the log() of an array of doubles where 0 &lt;= x &lt;= 1.

That will produce an array of negative values, and possibly -Inf.

also replicating to the image as black squares.</description>
		<content:encoded><![CDATA[<p>I am aware this post is old, but just to note:</p>
<p>At this line:<br />
geo_mean = imfilter(log(I), h, &#8216;replicate&#8217;);</p>
<p>You are calculating the log() of an array of doubles where 0 &lt;= x &lt;= 1.</p>
<p>That will produce an array of negative values, and possibly -Inf.</p>
<p>also replicating to the image as black squares.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2008/07/07/nonlinear-operations-using-imfilter/#comment-20860</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Thu, 10 Jul 2008 16:58:19 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/2008/07/07/nonlinear-operations-using-imfilter/#comment-20860</guid>
		<description>Francisco&#8212;At last count, there were 13,273,474 journal and conference papers describing different methods of edge detection.  :-)

Think about regions of differing texture.  The local standard deviation operator would have a relatively higher response in regions of &quot;busier&quot; texture, and it would have a relatively lower response in &quot;smoother&quot; regions.  This is different than what most people think an edge detector does.</description>
		<content:encoded><![CDATA[<p>Francisco&mdash;At last count, there were 13,273,474 journal and conference papers describing different methods of edge detection.  :-)</p>
<p>Think about regions of differing texture.  The local standard deviation operator would have a relatively higher response in regions of &#8220;busier&#8221; texture, and it would have a relatively lower response in &#8220;smoother&#8221; regions.  This is different than what most people think an edge detector does.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: francisco</title>
		<link>http://blogs.mathworks.com/steve/2008/07/07/nonlinear-operations-using-imfilter/#comment-20859</link>
		<dc:creator>francisco</dc:creator>
		<pubDate>Wed, 09 Jul 2008 16:56:05 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/2008/07/07/nonlinear-operations-using-imfilter/#comment-20859</guid>
		<description>Hi Steve,

You mention that the local standard deviation technique measures the &#039;business&#039; of an image. How is this different, if at all, from edge detection? It looks like your first example does a really amazing job at finding edges, albeit they are rather thick.

thanks
-francisco</description>
		<content:encoded><![CDATA[<p>Hi Steve,</p>
<p>You mention that the local standard deviation technique measures the &#8216;business&#8217; of an image. How is this different, if at all, from edge detection? It looks like your first example does a really amazing job at finding edges, albeit they are rather thick.</p>
<p>thanks<br />
-francisco</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2008/07/07/nonlinear-operations-using-imfilter/#comment-20854</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Mon, 07 Jul 2008 15:58:31 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/2008/07/07/nonlinear-operations-using-imfilter/#comment-20854</guid>
		<description>Luca&#8212;Thanks for submitting your code to the File Exchange!</description>
		<content:encoded><![CDATA[<p>Luca&mdash;Thanks for submitting your code to the File Exchange!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luca Balbi</title>
		<link>http://blogs.mathworks.com/steve/2008/07/07/nonlinear-operations-using-imfilter/#comment-20853</link>
		<dc:creator>Luca Balbi</dc:creator>
		<pubDate>Mon, 07 Jul 2008 15:21:18 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/2008/07/07/nonlinear-operations-using-imfilter/#comment-20853</guid>
		<description>This very same &quot;sum of squares minus sqaure of sum&quot; consideration drove me to re-implement the Kuwahara nonlinear filter in a faster way, though I did not use imfilter but just straightforward convolution, as I did not want the Image Processing Toolbox to be needed:

http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=15027&amp;objectType=FILE

Nice example by the way Steve! And thanks for pointing to the stdfilt function.</description>
		<content:encoded><![CDATA[<p>This very same &#8220;sum of squares minus sqaure of sum&#8221; consideration drove me to re-implement the Kuwahara nonlinear filter in a faster way, though I did not use imfilter but just straightforward convolution, as I did not want the Image Processing Toolbox to be needed:</p>
<p><a href="http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=15027&#038;objectType=FILE" rel="nofollow">http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=15027&#038;objectType=FILE</a></p>
<p>Nice example by the way Steve! And thanks for pointing to the stdfilt function.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

