title: External Webcam not working for Opencv and Python
body: <p>I'm using Python cv2 module to use to run a program.</p>
  
  <p>I'm able to access the inbuilt webcam but when I using the external webcam, it doesn't work.</p>
  
  <p>I have used all codes like </p>
  
  <pre><code>VideoCapture(1) # or any other no.s like 0,1,2,3 etc etc.
  </code></pre>
  
  <p>I have even disabled the inbuilt webcam using device manager.</p>
  
  <p>but nothing works. I'm using pythonxy. I have tried in command prompt also. It still doesn't work.</p>
  
  <p>I get the following error</p>
  
  <pre><code>runfile('C:/Users/Prashant/Documents/Python Scripts/Circledetection.py',     wdir=r'C:/Users/Prashant/Documents/Python Scripts')
  OpenCV Error: Assertion failed (scn == 3 || scn == 4) in unknown function, file ..\..\..\modules\imgproc\src\color.cpp, line 3402
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "C:\Python27\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 540, in runfile
      execfile(filename, namespace)
    File "C:/Users/Prashant/Documents/Python Scripts/Circledetection.py", line 27, in &lt;module&gt;
      prev_gray = cv2.cvtColor(im,cv2.COLOR_BGR2GRAY)
  cv2.error: ..\..\..\modules\imgproc\src\color.cpp:3402: error: (-215) scn == 3 || scn == 4
  </code></pre>