草庐IT

createTrackbar

全部标签

python - cv2.createTrackbar 使用 python

我是python和opencv的新手,我想创建一个轨迹栏来控制函数cv2.findContours的层次结构但我不知道如何将它添加到源代码中她是代码:importcv2importcv2.cvascvcv2.namedWindow("test")vc=cv2.VideoCapture(2);retVal,frame=vc.read();whileTrue:ifframeisnotNone:imgray=cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY)ret,thresh=cv2.threshold(imgray,127,255,0)contours,hier