title: hit and miss transform in image processing
body: <p>This <a href="http://www.cs.auckland.ac.nz/courses/compsci773s1c/lectures/ImageProcessing-html/topic4.htm" rel="nofollow">page</a> talks about <code>hit and miss</code>, and it says:</p>
  
  <blockquote>
    <p>It is easier to describe it by considering s1 and s2 as a single structuring element with 1s for pixels of s1 and 0s for pixels of s2; in this case the hit-and-miss transform assigns 1 to an output pixel only if the object (with the value of 1) and background (with the value of 0) pixels in the structuring element exactly match object (1) and background (0) pixels in the input image. Oterwise that pixel is set to the background value (0).</p>
  </blockquote>
  
  <p>Why should <strong>2</strong> structuring elements applied in <code>hit and miss</code> transform? </p>
  
  <p>For example, here are 2 elements:</p>
  
  <pre><code>[ 1 * 1 ]      [ * 0 * ]
  [ * 1 * ]      [ 0 * 0 ] 
  [ 1 * 1 ]      [ * 0 * ]
  </code></pre>
  
  <p>BUT, why can't I just use <strong>1</strong> element like this:</p>
  
  <pre><code>[ 1 0 1 ]
  [ 0 1 0 ]
  [ 1 0 1 ]
  </code></pre>
  
  <p>?</p>