title: How to save image in a folder with openCV
body: <p>I'm learning OpenCV and Python. I captured some images from my webcam and saved them. But they are saved by default into the local folder. I want to save them to another folder from direct path. How can I do that?</p>
  
  <p>I tried this code</p>
  
  <pre><code>import cv2
  import os
  img = cv2.imread('image.jpg', 1)
  path = 'C:\\Users\MJ-INFO\Desktop\amaster\test'
  
  
  cv2.imwrite('test.jpg', img)
  cv2.waitKey(0)
  cv2.destroyAllWindows()
  </code></pre>