title: How to fix OpenCV Python not drawing rectangle?
body: <p>I have followed a tutorial to draw rectangle around the face i track. I already write the code same as the tutorial. But when i ran it, it just show the video from the webcam and there is no rectangle drawn around the face. I have no idea why it is happen.</p>
  
  <p>This is my code,</p>
  
  <pre><code>import cv2
  import numpy as np
  
  a = cv2.CascadeClassifier('haarcascade_frontalface_default.xml');
  cam = cv2.VideoCapture(0);
  
  while(True):
      ret,img=cam.read();
      gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
      faces = a.detectMultiScale(gray,1.3,5)
      for(x,y,w,h) in faces :
          cv2.rectangle(img, (x,y), (x+w,y+h), (0,0,255), 2)
      cv2.imshow("Face", img);
      if(cv2.waitKey(1) == ord('q')):
          break;
  cam.release()
  cv2.destroyAllWindows()
  </code></pre>
  
  <p>This is my directory with the haarcascade</p>
  
  <p><a href="https://i.stack.imgur.com/VC3Aj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VC3Aj.png" alt="enter image description here"></a></p>