Lines Matching refs:cv2
26 import cv2
36 cv2.namedWindow('camshift')
37 cv2.setMouseCallback('camshift', self.onmouse)
46 if event == cv2.EVENT_LBUTTONDOWN:
50 if flags & cv2.EVENT_FLAG_LBUTTON:
69 …cv2.rectangle(img, (i*bin_w+2, 255), ((i+1)*bin_w-2, 255-h), (int(180.0*i/bin_count), 255, 255), -…
70 img = cv2.cvtColor(img, cv2.COLOR_HSV2BGR)
71 cv2.imshow('hist', img)
77 hsv = cv2.cvtColor(self.frame, cv2.COLOR_BGR2HSV)
78 mask = cv2.inRange(hsv, np.array((0., 60., 32.)), np.array((180., 255., 255.)))
85 hist = cv2.calcHist( [hsv_roi], [0], mask_roi, [16], [0, 180] )
86 cv2.normalize(hist, hist, 0, 255, cv2.NORM_MINMAX);
91 cv2.bitwise_not(vis_roi, vis_roi)
96 prob = cv2.calcBackProject([hsv], [0], self.hist, [0, 180], 1)
98 term_crit = ( cv2.TERM_CRITERIA_EPS | cv2.TERM_CRITERIA_COUNT, 10, 1 )
99 track_box, self.track_window = cv2.CamShift(prob, self.track_window, term_crit)
104 cv2.ellipse(vis, track_box, (0, 0, 255), 2)
108 cv2.imshow('camshift', vis)
110 ch = 0xFF & cv2.waitKey(5)
115 cv2.destroyAllWindows()