Merge pull request #2311 from SvenWe:master

pull/2290/merge
Roman Donchenko 11 years ago committed by OpenCV Buildbot
commit 511e79aef7
  1. 4
      samples/python2/grabcut.py

@ -63,14 +63,14 @@ def onmouse(event,x,y,flags,param):
if rectangle == True:
img = img2.copy()
cv2.rectangle(img,(ix,iy),(x,y),BLUE,2)
rect = (ix,iy,abs(ix-x),abs(iy-y))
rect = (min(ix,x),min(iy,y),abs(ix-x),abs(iy-y))
rect_or_mask = 0
elif event == cv2.EVENT_RBUTTONUP:
rectangle = False
rect_over = True
cv2.rectangle(img,(ix,iy),(x,y),BLUE,2)
rect = (ix,iy,abs(ix-x),abs(iy-y))
rect = (min(ix,x),min(iy,y),abs(ix-x),abs(iy-y))
rect_or_mask = 0
print " Now press the key 'n' a few times until no further change \n"

Loading…
Cancel
Save