I am trying to threshold a live webcam video capture. I’d like to threshold it based on their intensity. I have included the full code below. When I run the code, only the CamHSV window is shown, the window for thresh isn’t shown. sorry for the bad english
Thanks for the reply,
But I tried using cv.WaitKey(0) at the end of the line and it doesn’t do any different.
Putting the thresholding code inside the loop just gives an error as shown below.
Traceback (most recent call last):
File "C:\Users\USER\PycharmProjects\OpenCV\FirstTry.py", line 17, in <module>
SkinTresholdHSV = cv.inRange(CamHSV, lower, upper)
cv2.error: OpenCV(4.5.3) C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-1i5nllza\opencv\modules\core\src\arithm.cpp:1742: error: (-209:Sizes of input arguments do not match) The lower boundary is neither an array of the same size and same type as src, nor a scalar in function 'cv::inRange'
[ WARN:1] global C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-1i5nllza\opencv\modules\videoio\src\cap_msmf.cpp (438) `anonymous-namespace'::SourceReaderCB::~SourceReaderCB terminating async callback
Process finished with exit code 1
This is how I put the thresholding code inside the loop