title: Finding a subimage inside a Numpy image
body: <p>I have two Numpy arrays (3-dimensional uint8) converted from PIL images.</p>
  
  <p>I want to find if the first image contains the second image, and if so, find out the coordinates of the top-left pixel inside the first image where the match is.</p>
  
  <p>Is there a way to do that purely in Numpy, in a fast enough way, rather than using (4! very slow) pure Python loops?</p>
  
  <p>2D example:</p>
  
  <pre><code>a = numpy.array([
      [0, 1,  2,  3],
      [4, 5,  6,  7],
      [8, 9, 10, 11]
  ])
  b = numpy.array([
      [2, 3],
      [6, 7]
  ])
  </code></pre>
  
  <p>How to do something like this?</p>
  
  <pre><code>position = a.find(b)
  </code></pre>
  
  <p><code>position</code> would then be <code>(0, 2)</code>.</p>