title: Encountering AxisError: axis 1 is out of bounds for array of dimension 0
body: <p>I was just trying to make a body recognization feature but I am encountering with this axis error.</p>
  
  <pre><code>import cv2
  import time
  import numpy as np
  
  ## Preparation for writing the ouput video
  fourcc = cv2.VideoWriter_fourcc(*'XVID')
  out = cv2.VideoWriter('output.avi',fourcc,20.0, (640,480))
  
  ##reading from the webcam 
  cap = cv2.VideoCapture(0)
  
  ## Allow the system to sleep for 3 seconds before the webcam starts
  time.sleep(3)
  count = 0
  background = 0
  
  ## Capture the background in range of 60
  for i in range(60):
      ret,background = cap.read()
  background = np.flip(background,axis=1)
  
  AxisError                                 
  Traceback (most recent call last) &lt;ipython-input-6-28a19252eb8f&gt; in &lt;module&gt;()
        for i in range(60):
             ret,background = cap.read()
   ---&gt; background = np.flip(background,axis=1) AxisError: axis 1 is out of bounds for array of dimension 0
  </code></pre>