title: How to save a picture to a specific file after using OpenCV to take it?
body: <p>I use Python 3 and Windows. Currently, all my program can do is take a picture and display it, but I want to be able to save it to a specific destination. Here is the program:</p>
  
  <pre><code># import the opencv and numpy libraries
  import cv2
  import numpy as np
  
  
  # define a video capture object
  cap = cv2.VideoCapture(0)
  ret, frame = cap.read()
  
  while(True):
  
      cv2.imshow('img1',frame)
      if(cv2.waitKey(1) and 0xFF == ord('y')):
          cv2.imwrite('images/c1.png', frame)
          cv2.destroyAllWindows()
          break
  
  cap.release()
  </code></pre>
  
  <p>Edit: BTW I'm new to Python and OpenCV so this code is mostly someone else's (forgot who so I can't cite, sorry).</p>