title: Plot values not updated in OpenCV's VideoCapture
body: <p>I am trying to plot facial key points on the video frame using Open CV Video Capture. I am using a trained pytorch CNN model. Here is the code:</p>
  
  <pre><code>cap = cv.VideoCapture(0)
  time.sleep(2.0)
  
  while cap.isOpened():
      ret, frame = cap.read()
      gray = cv.cvtColor(frame, cv.COLOR_BGR2GRAY)
  
      faces = face_cascade.detectMultiScale(gray, 1.3, 5)
      for (x,y,w,h) in faces:
          cv.rectangle(frame,(x,y),(x+w,y+h),(255,0,0),2)
          face_gray = gray[y:y+h, x:x+w]
  
      sample = cv.resize(face_gray, (96, 96))
      sample = sample.astype('float32')/255
      sample = np.asarray(sample).reshape(1,96,96)
      sample = torch.from_numpy(sample).unsqueeze(0).to(device)
      output = saved_model(sample)
      output = output.view(-1, 2).detach()
      output = (output * 48) + 48
      output = output.cpu().numpy()
      print(output)
      for i in range(15):
          cv.circle(frame, (output[i][0], output[i][1]), 1, (0, 0, 255), -1)
  
      cv.imshow("Frame", frame)
      key = cv.waitKey(1) &amp; 0xFF
  
  
      if key == ord('q'):
          break
  
  cap.release()
  cv.destroyAllWindows()
  </code></pre>
  
  <p>Input dimension: torch.Tensor([1,1,96,96]), 1 grayscale image</p>
  
  <p>Output dimension: torch.Tensor([15, 2]), (x,y) of 15 facial key points</p>
  
  <p>When the face is detected (using Haar Cascade) in the Video Capture, the output values are the same due to which the key points plot does not change. </p>