title: Extracting a region from an image using slicing in Python, OpenCV
body: <p>I have an image and I want to extract a region from it. I have coordinates of left upper corner and right lower corner of this region. In gray scale I do it like this:</p>
  
  <pre><code>I = cv2.imread("lena.png")
  I = cv2.cvtColor(I, cv2.COLOR_RGB2GRAY)
  region = I[248:280,245:288]
  tools.show_1_image_pylab(region)
  </code></pre>
  
  <p>I can't figure it out how to do it in color. I thought of extracting each channel R, G, B; slicing this region from each of the channels and to merge them back together but there is gotta be a shorter way. </p>