title: extracting 5x5 patch from image around a pixel coordinate
body: <pre><code>I = cv.imread('test.png')
  IB = I[:,:,0]
  coords = corner_peaks(corner_harris(IB))
  patch = IB[coords[1,0]-2:coords[1,0]+3,coords[1,1]-2:coords[1,1]+3]
  print(patch)
  </code></pre>
  
  <p>if the interest point is not around boundary then it is working ok, but at boundary it is not working properly(patch is having smaller size). I guess it requires padding at boundaries.(not sure) 
  Is there an easier method to do this? or to make it work at boundaries too?</p>
  
  <p>Edit: i added following , it seems to work. will update if some problem occurs. If this can be solved with some inbuilt function then it would be good, kindly tell if it can be done using some function.</p>
  
  <pre><code>coords = coords +2
  IBpadded = cv.copyMakeBorder(IB, 2, 2, 2, 2, cv.BORDER_REFLECT)
  </code></pre>