Fix rectangle selection in some of python samples

This commit is contained in:
Vladislav Sovrasov 2016-02-02 14:16:49 +03:00
parent cb7cc81653
commit 3a51cae208

View File

@ -173,6 +173,7 @@ class RectSelector:
x, y = np.int16([x, y]) # BUG
if event == cv2.EVENT_LBUTTONDOWN:
self.drag_start = (x, y)
return
if self.drag_start:
if flags & cv2.EVENT_FLAG_LBUTTON:
xo, yo = self.drag_start