<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: A structuring element decomposition &#8220;gotcha&#8221;</title>
	<link>http://blogs.mathworks.com/steve/2008/11/26/a-structuring-element-decomposition-gotcha/</link>
	<description>Steve Eddins manages the Image &#38; Geospatial development team at &#60;a href="http://www.mathworks.com/"&#62;The MathWorks&#60;/a&#62; and coauthored &#60;a href="http://www.mathworks.com/support/books/book5291.html?category=-1&#38;language=-1"&#62;Digital Image Processing Using MATLAB&#60;/a&#62;. He writes here about image processing concepts, algorithm implementations, and MATLAB.&#60;br&#62;&#60;br&#62;&#60;img&#62;</description>
	<pubDate>Sun, 08 Nov 2009 04:16:29 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
		<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2008/11/26/a-structuring-element-decomposition-gotcha/#comment-21814</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Mon, 01 Jun 2009 13:43:40 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2008/11/26/a-structuring-element-decomposition-gotcha/#comment-21814</guid>
		<description>Alex&#8212;The appropriate structuring element shape depends on your application and data set, just like choosing between a lowpass filter and a highpass filter.  You might want to get a good textbook on image processing.</description>
		<content:encoded><![CDATA[<p>Alex&mdash;The appropriate structuring element shape depends on your application and data set, just like choosing between a lowpass filter and a highpass filter.  You might want to get a good textbook on image processing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://blogs.mathworks.com/steve/2008/11/26/a-structuring-element-decomposition-gotcha/#comment-21812</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Sun, 31 May 2009 17:37:22 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2008/11/26/a-structuring-element-decomposition-gotcha/#comment-21812</guid>
		<description>Hi.. I cannot understand what is written in matlab help. Could you give me a brief description on how to select the appropriate structuring element parameter? wheter is disc or rectangle or wad.</description>
		<content:encoded><![CDATA[<p>Hi.. I cannot understand what is written in matlab help. Could you give me a brief description on how to select the appropriate structuring element parameter? wheter is disc or rectangle or wad.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2008/11/26/a-structuring-element-decomposition-gotcha/#comment-21331</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Fri, 19 Dec 2008 21:08:29 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2008/11/26/a-structuring-element-decomposition-gotcha/#comment-21331</guid>
		<description>Ken&#8212;I get similar results.  Clearly, we have a lot of room to improve our dilation implementation!  We're looking into it.</description>
		<content:encoded><![CDATA[<p>Ken&mdash;I get similar results.  Clearly, we have a lot of room to improve our dilation implementation!  We&#8217;re looking into it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2008/11/26/a-structuring-element-decomposition-gotcha/#comment-21323</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Sat, 13 Dec 2008 16:59:08 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2008/11/26/a-structuring-element-decomposition-gotcha/#comment-21323</guid>
		<description>Oliver&#8212;I didn't say &lt;tt&gt;bwlabel&lt;/tt&gt; allows arbitrary strels, just arbitrary connectivities.  I would be interested to hear more about your application, if you care to share it.  For example, when would it make sense to say that the two 1-valued pixels below are connected?

&lt;pre&gt;
1 0 0 0 0 0 0 0 1
&lt;/pre&gt;

Anyway, some of the material in my &lt;a href="http://blogs.mathworks.com/steve/category/connected-components/" rel="nofollow"&gt;series on connected component labeling algorithms&lt;/a&gt; might be useful to you.</description>
		<content:encoded><![CDATA[<p>Oliver&mdash;I didn&#8217;t say <tt>bwlabel</tt> allows arbitrary strels, just arbitrary connectivities.  I would be interested to hear more about your application, if you care to share it.  For example, when would it make sense to say that the two 1-valued pixels below are connected?</p>
<pre>
1 0 0 0 0 0 0 0 1
</pre>
<p>Anyway, some of the material in my <a href="http://blogs.mathworks.com/steve/category/connected-components/" rel="nofollow">series on connected component labeling algorithms</a> might be useful to you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oliver Woodford</title>
		<link>http://blogs.mathworks.com/steve/2008/11/26/a-structuring-element-decomposition-gotcha/#comment-21322</link>
		<dc:creator>Oliver Woodford</dc:creator>
		<pubDate>Sat, 13 Dec 2008 16:35:47 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2008/11/26/a-structuring-element-decomposition-gotcha/#comment-21322</guid>
		<description>Thanks, Steve. However, the CONN matrix doesn't allow arbitrary strel neighbourhoods. In particular, the neighbourhoods are limited to 3x3 (for 2d) and must be symmetric. For the problem I have (with a 9x9 neighbourhood), BWLABELN can't be used.</description>
		<content:encoded><![CDATA[<p>Thanks, Steve. However, the CONN matrix doesn&#8217;t allow arbitrary strel neighbourhoods. In particular, the neighbourhoods are limited to 3&#215;3 (for 2d) and must be symmetric. For the problem I have (with a 9&#215;9 neighbourhood), BWLABELN can&#8217;t be used.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2008/11/26/a-structuring-element-decomposition-gotcha/#comment-21321</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Sat, 13 Dec 2008 16:02:08 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2008/11/26/a-structuring-element-decomposition-gotcha/#comment-21321</guid>
		<description>Oliver&#8212;&lt;tt&gt;bwlabeln&lt;/tt&gt; supports labeling operations with an arbitrary connectivity definition.  See the doc regarding the &lt;tt&gt;CONN&lt;/tt&gt; input argument.  You can use &lt;tt&gt;bwlabeln&lt;/tt&gt; on two-dimensional inputs.</description>
		<content:encoded><![CDATA[<p>Oliver&mdash;<tt>bwlabeln</tt> supports labeling operations with an arbitrary connectivity definition.  See the doc regarding the <tt>CONN</tt> input argument.  You can use <tt>bwlabeln</tt> on two-dimensional inputs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oliver Woodford</title>
		<link>http://blogs.mathworks.com/steve/2008/11/26/a-structuring-element-decomposition-gotcha/#comment-21320</link>
		<dc:creator>Oliver Woodford</dc:creator>
		<pubDate>Sat, 13 Dec 2008 14:33:22 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2008/11/26/a-structuring-element-decomposition-gotcha/#comment-21320</guid>
		<description>Hi Steve

On the topic of structural elements, why can they be used for IMDILATE, but not for BWLABEL? Currently I need to use them in the latter (see http://www.mathworks.com/matlabcentral/newsreader/view_thread/240944), but I can't see how to achieve this using the IPT. Is there a way?

Many thanks,
Oliver</description>
		<content:encoded><![CDATA[<p>Hi Steve</p>
<p>On the topic of structural elements, why can they be used for IMDILATE, but not for BWLABEL? Currently I need to use them in the latter (see <a href="http://www.mathworks.com/matlabcentral/newsreader/view_thread/240944" rel="nofollow">http://www.mathworks.com/matlabcentral/newsreader/view_thread/240944</a>), but I can&#8217;t see how to achieve this using the IPT. Is there a way?</p>
<p>Many thanks,<br />
Oliver</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ken Eaton</title>
		<link>http://blogs.mathworks.com/steve/2008/11/26/a-structuring-element-decomposition-gotcha/#comment-21313</link>
		<dc:creator>Ken Eaton</dc:creator>
		<pubDate>Wed, 10 Dec 2008 20:09:15 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2008/11/26/a-structuring-element-decomposition-gotcha/#comment-21313</guid>
		<description>Steve,

I've found your posts about dilation and structure elements very interesting, since I've been doing some things with it recently. I came across something strange that I wasn't expecting, and I was hoping you might explain it for me...

I had some operations were I wanted to dilate points with a disk shape, and found that using IMFILTER instead of IMDILATE was actually much faster:

&lt;pre&gt;
  a = zeros(9);
  a(5,5) = 1;

  % using imdilate:

  disk = strel('disk',5);
  tic;
  for iCount = 1:100,
    b_dilate = imdilate(a,disk);
  end
  toc;

  % using imfilter:

  disk = fspecial('disk',4);
  tic;
  for iCount = 1:100,
    b_filter = double(imfilter(a,disk,'replicate') &#62; 0);
  end
  toc;

  % using a thresholded imfilter:

  disk = double(fspecial('disk',4) &#62; 0);
  tic;
  for iCount = 1:100,
    b_thresh = imfilter(a,disk,'replicate');
  end
  toc;
&lt;/pre&gt;

Using MATLAB version 7.1, I get the following from the above code, and all the results are equal:

Elapsed time is 0.341824 seconds.
Elapsed time is 0.089447 seconds.
Elapsed time is 0.082622 seconds.

Why is this happening? Is this the same for newer MATLAB versions?

Thanks,
Ken</description>
		<content:encoded><![CDATA[<p>Steve,</p>
<p>I&#8217;ve found your posts about dilation and structure elements very interesting, since I&#8217;ve been doing some things with it recently. I came across something strange that I wasn&#8217;t expecting, and I was hoping you might explain it for me&#8230;</p>
<p>I had some operations were I wanted to dilate points with a disk shape, and found that using IMFILTER instead of IMDILATE was actually much faster:</p>
<pre>
  a = zeros(9);
  a(5,5) = 1;

  % using imdilate:

  disk = strel('disk',5);
  tic;
  for iCount = 1:100,
    b_dilate = imdilate(a,disk);
  end
  toc;

  % using imfilter:

  disk = fspecial('disk',4);
  tic;
  for iCount = 1:100,
    b_filter = double(imfilter(a,disk,'replicate') &gt; 0);
  end
  toc;

  % using a thresholded imfilter:

  disk = double(fspecial('disk',4) &gt; 0);
  tic;
  for iCount = 1:100,
    b_thresh = imfilter(a,disk,'replicate');
  end
  toc;
</pre>
<p>Using MATLAB version 7.1, I get the following from the above code, and all the results are equal:</p>
<p>Elapsed time is 0.341824 seconds.<br />
Elapsed time is 0.089447 seconds.<br />
Elapsed time is 0.082622 seconds.</p>
<p>Why is this happening? Is this the same for newer MATLAB versions?</p>
<p>Thanks,<br />
Ken</p>
]]></content:encoded>
	</item>
</channel>
</rss>
