title: hit and miss transform for detecting branched point and endpoint in scikit-image
body: <p>I have 2 functions that use mahotas python library for detecting branched point and end point in an image.</p>
  
  <p>The 2 functions:</p>
  
  <pre><code>def branchedPoints(skel):
      branch1=np.array([[2, 1, 2], [1, 1, 1], [2, 2, 2]])
      branch2=np.array([[1, 2, 1], [2, 1, 2], [1, 2, 1]])
      branch3=np.array([[1, 2, 1], [2, 1, 2], [1, 2, 2]])
      branch4=np.array([[2, 1, 2], [1, 1, 2], [2, 1, 2]])
      branch5=np.array([[1, 2, 2], [2, 1, 2], [1, 2, 1]])
      branch6=np.array([[2, 2, 2], [1, 1, 1], [2, 1, 2]])
      branch7=np.array([[2, 2, 1], [2, 1, 2], [1, 2, 1]])
      branch8=np.array([[2, 1, 2], [2, 1, 1], [2, 1, 2]])
      branch9=np.array([[1, 2, 1], [2, 1, 2], [2, 2, 1]])
      br1=mh.morph.hitmiss(skel,branch1)
      br2=mh.morph.hitmiss(skel,branch2)
      br3=mh.morph.hitmiss(skel,branch3)
      br4=mh.morph.hitmiss(skel,branch4)
      br5=mh.morph.hitmiss(skel,branch5)
      br6=mh.morph.hitmiss(skel,branch6)
      br7=mh.morph.hitmiss(skel,branch7)
      br8=mh.morph.hitmiss(skel,branch8)
      br9=mh.morph.hitmiss(skel,branch9)
      return br1+br2+br3+br4+br5+br6+br7+br8+br9
  
  def endPoints(skel):
      endpoint1=np.array([[0, 0, 0],[0, 1, 0],[2, 1, 2]])
      endpoint2=np.array([[0, 0, 0],[0, 1, 2],[0, 2, 1]])
      endpoint3=np.array([[0, 0, 2],[0, 1, 1],[0, 0, 2]])
      endpoint4=np.array([[0, 2, 1],[0, 1, 2],[0, 0, 0]])
      endpoint5=np.array([[2, 1, 2],[0, 1, 0],[0, 0, 0]])
      endpoint6=np.array([[1, 2, 0],[2, 1, 0],[0, 0, 0]])
      endpoint7=np.array([[2, 0, 0],[1, 1, 0],[2, 0, 0]])
      endpoint8=np.array([[0, 0, 0],[2, 1, 0],[1, 2, 0]])
      ep1=mh.morph.hitmiss(skel,endpoint1)
      ep2=mh.morph.hitmiss(skel,endpoint2)
      ep3=mh.morph.hitmiss(skel,endpoint3)
      ep4=mh.morph.hitmiss(skel,endpoint4)
      ep5=mh.morph.hitmiss(skel,endpoint5)
      ep6=mh.morph.hitmiss(skel,endpoint6)
      ep7=mh.morph.hitmiss(skel,endpoint7)
      ep8=mh.morph.hitmiss(skel,endpoint8)
      ep = ep1+ep2+ep3+ep4+ep5+ep6+ep7+ep8
      return ep
  </code></pre>
  
  <p>There is a way to obtain these functions with Scikit-image library?
  <a href="http://scikit-image.org/docs/0.7.0/api/skimage.morphology.html" rel="nofollow">Morphology section</a> of scikit image hasn't got hit and miss transform.</p>