# ToupCam+OpenCV+Python

**URL:** <https://forum.opencv.org/t/toupcam-opencv-python/7404>\
**Category:** Python\
**Tags:** videoio\
**Created:** [February 2, 2022, 8:47pm UTC](https://forum.opencv.org/t/toupcam-opencv-python/7404 "2022-02-02T20:47:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![timoxa19962105](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/timoxa19962105/32/4397_2.png) [@timoxa19962105](https://forum.opencv.org/u/timoxa19962105)\
**Post date:** [February 2, 2022, 8:47pm UTC](https://forum.opencv.org/t/toupcam-opencv-python/7404/1 "2022-02-02T20:47:17Z")

</div>

Good day!  
I have a big problem:  
When trying to connect a ToupCam camera in Python for post-processing with OpenCV, I get an error. The program does not initialize the camera. I connect via DSHOW, different indexes, but still an error. What could be the reason?

OpenCV 4.5.5 v.  
Python 3.8.10  
Code:

```auto
import cv2
cap = cv2.VideoCapture(0,cv2.CAP_DSHOW)
if cap.isOpened() == False:
    print('ERROR: Unable to open the camera')
else:
    # this pop ups the driver settings form only with DSHOW
    cap.set(cv2.CAP_PROP_SETTINGS,-1)
cap.release()
cv2.destroyAllWindows()

```

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [February 18, 2022, 12:07pm UTC](https://forum.opencv.org/t/toupcam-opencv-python/7404/3 "2022-02-18T12:07:55Z")

</div>

since this is on windows – [try to update drivers](http://www.touptek.com/download/)
