title: Can't center duplicate picture
body: <p>So for this code to work properly, i need it to center the new image in the black space with borders around it. I've been trying to take the first image dimensions and subtract the new enlarged empty dimensions but I can't seem to get it to work. I'm not sure what to do at this point. I've managed to duplicate the picture i just need to center it now.</p>
  <pre><code>import numpy as np
  # read in image (in the same folder)
  image = cv2.imread(&quot;cones11.png&quot;)
  # get size of image
  numRows = image.shape[0] # height of image
  numCols = image.shape[1] # width of image
  print(image.shape[0])
  print(image.shape[1])
  #scalar
  scalar = 1.2
  #newdimensions nxn
  n = int (scalar * numRows)
  n1 = int(scalar * numCols)
  
  shift = n/2
  shift1 = n1/2
  
  # create an empty color image
  emptyIm = np.zeros((n, n1, 3))  # (size, data type)
  
  # iterate over all the pixels of your image
  for i in range(numRows): # iterate over height of image, y-coordinates
      for j in range(numCols): # iteratve over the width of image, x-coordinates
          # access values at a pixel:
          # image[i][j][0]: blue value stored at pixel (i,j)
          # image[i][j][1]: green value stored at pixel (i,j)
          # image[i][j][2]: red value stored at pixel (i,j)
          #image[i][j][0] = emptyIm[i][j][0]
          #image[i][j][1] = emptyIm[i][j][1]
          #image[i][j][2] = emptyIm[i][j][2]
          emptyIm[i,j] = emptyIm[j,i] - image[int(shift)-1, int(shift1)-1]
          emptyIm[i][j][0] = image[i][j][0]
          emptyIm[i][j][1] = image[i][j][1]
          emptyIm[i][j][2] = image[i][j][2]
  
  
  #emptyIm[i][j] = emptyIm[i+n][i+n]
  #enlarging image
  # n = 2*emptyIm[i][j]
  cv2.imshow(&quot;xd&quot;, image)
  cv2.imshow(&quot;enlarged&quot;, emptyIm/255.0)
  cv2.waitKey(0)```
  </code></pre>