title: Python OpenCV External Camera SYSTEM_SERVICE_EXCEPTION (ks.sys) error
body: <p>I want to use an external camera to capture video from OpenCV and display it in my GUI.When I plug in camera and execute my program , my computer shows a blue screen and SYSTEM_SERVICE_EXCEPTION (ks.sys) error , then restarts. Here is the code :</p>
  
  <pre><code>import Tkinter as tk
  import cv2
  from PIL import Image, ImageTk
  
  
  width, height = 400, 300
  cap = cv2.VideoCapture(-1)
  cap.set(cv2.CAP_PROP_FRAME_WIDTH, width)
  cap.set(cv2.CAP_PROP_FRAME_HEIGHT, height)
  
  root = tk.Tk()
  root.geometry("800x600+100+100")
  root.bind('&lt;Escape&gt;', lambda e: root.quit())
  lmain = tk.Label()
  lmain.pack(padx=100, pady=100)
  
  def show_frame():
      if not cap.isOpened():             #checks for the opening of camera
          print("can't open the camera")
          flag, frame = cap.read()
          frame = cv2.flip(frame, 1)
      if flag is None:
          print "Major error!"
      elif flag:
          global last_frame
          last_frame = frame.copy()
  
  pic = cv2.cvtColor(last_frame, cv2.COLOR_BGR2RGB) 
  img = Image.fromarray(pic)
  imgtk = ImageTk.PhotoImage(image=img)
  lmain.imgtk = imgtk
  lmain.configure(image=imgtk)
  lmain.after(10, show_frame)
  
  
  show_frame()
  root.mainloop()
  </code></pre>
  
  <p>I used Logilink Usb 2.0 Video Grabber and I can capture video from 3rd party programs.But I can't capture in Python.I even tried another computer but same result.I use Anaconda - PyCharm..</p>