murtazahassan / Learn-OpenCV-in-3-hours

996 stars 565 forks source link

ColorPicker.py Question #8

Open 10UAikawa opened 4 years ago

10UAikawa commented 4 years ago

From project 1 you use the Colorpicker.py to get the right values you need. when running the Code I get a problem with it at:

[ WARN:0] global C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-2b5g8ysb\opencv\modules\videoio\src\cap_msmf.cpp (435) `anonymous-namespace'::SourceReaderCB::~SourceReaderCB terminating async callback Traceback (most recent call last): imgHsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV) cv2.error: OpenCV(4.4.0)

Im using python 3.7.6 and I have cv2 imported

RaghavKaushal03 commented 3 years ago

try changing the 6th line cap = cv2.VideoCapture(1) to cap = cv2.VideoCapture(0)