title: ipython cv2.imwrite() doesn't work - produces no errors, but also no files
body: <p>I have written some face detection and normalization code - this part takes 20 photos of the face and saves it to a folder.</p>
  
  <p>I have tried several times to make it save but the <code>cv2.imwrite</code> doesn't work. It did it once but now it doesn't let me find the photos.</p>
  
  <p>I've already implement some ideas from other problems from stack overflow but it still doesn't work.</p>
  
  <p>When I run the code there are no errors or anything, it just doesn't save the photos.</p>
  
  <p>This is the python code and I run it via ipython notebook:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>folder = "C:\Users\John\people" + raw_input('Person: ').lower() # input name
  cv2.namedWindow("PyData Tutorial", cv2.WINDOW_AUTOSIZE)
  if not os.path.exists(folder):
      os.mkdir(folder)
      counter = 1
      timer = 0
      while counter &lt; 21 : # take 20 pictures
          frame = webcam.get_frame()
          faces_coord = detector.detect(frame) # detect
          if len(faces_coord) and timer % 700 == 50: # every Second or so
              faces = normalize_faces(frame, faces_coord) # norm pipeline
              cv2.imwrite(folder + 'C:\Users\John\people' + str(counter) + '.jpg', faces[0])
              plt_show(faces[0], "Images Saved:" + str(counter))
              clear_output(wait = True) # saved face in notebook
              counter += 1
          draw_rectangle(frame, faces_coord) # rectangle around face
          cv2.imshow("PyData Tutorial", frame) # live feed in external
          cv2.waitKey(50)
          timer += 50
      cv2.destroyAllWindows()
  else:
      print "This name already exists."</code></pre>
  </div>
  </div>
  
  Thank you.</p>