title: How to flip image with opencv and python( without cv2.flip)
body: <p>i just want to flip image vertically without <code>cv2.flip()</code>, but output is completely black image. where is my mistake ?</p>
  
  <pre><code>import cv2
  import numpy as np
  
  
  def flipv(imgg):
      for i in range(480):
          img2= np.zeros([480, 640, 3], np.uint8)
          img2[i,:]=imgg[480-i-1,:]
  
      return img2
  
  img = cv2.imread("foto\\test.jpg", 1)
  
  ads= flipv(img)
  
  cv2.imshow("qw",ads)
  
  cv2.waitKey(0)
  cv2.destroyAllWindows()
  </code></pre>