title: Capture image with python
body: <p>How can i capture the image using python?I am talking about capturing the image,not to save the particular frame of video.
  normally we use  this to get picture.but it gives frame,not the image</p>
  
  <pre><code>while(True):
        ret, frame = cap.read()
        rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2BGRA)
  
        cv2.imshow('frame', rgb)
         if cv2.waitKey(1) &amp; 0xFF == ord('q'):
         out = cv2.imwrite('capture.jpg', frame)
         break
  </code></pre>