code: def stretch_cv(x,sr,sc,interpolation=cv2.INTER_AREA):
      
      if sr==0 and sc==0: return x
      r,c,*_ = x.shape
      x = cv2.resize(x, None, fx=sr+1, fy=sc+1, interpolation=interpolation)
      nr,nc,*_ = x.shape
      cr = (nr-r)//2; cc = (nc-c)//2
      return x[cr:r+cr, cc:c+cc]
docs: Stretches image x horizontally by sr+1, and vertically by sc+1 while retaining the original image size and proportion.