title: Crop a Bounding Box from an Image which is a Numpy Array
body: <p>So I have an Image which is of shape (224,244,3) as an ndarray. I have a  bounding box annotation for the image that looks like this</p>
  
  <pre><code>{
    annotations: [
    {
      class: "rect",
      height: 172,
      width: 341,
      x: 282,
      y: 165
    },
    {
      class: "rect",
      height: 172,
      width: 353,
      x: 592,
      y: 90
    }
   ],
     class: "image",
     filename: "img_05974.jpg"
  }
  </code></pre>
  
  <p>How do I crop the numpy array so that it gives me an image like the above bounding rectangles ? </p>