title: Extract arbitrary rectangular patches from image in python
body: <p>Is there a way to extract a rectangle of my choice from an image, maybe using numpy arrays?
  Most implementations available seem to be for regular sliding window solutions, but those always include steps, or rectangles of the same aspect ratio, or something like that.</p>
  
  <p>Is it possible to provide the beginning x and y coordinates and the width and height (or ending x and y coordinates), and extract exactly that rectangle? Can this be done using numpy arrays alone? Or is there another way to do this?</p>