Skip to content
Permalink
Browse files

fix MaskEditor, upd manual ru

  • Loading branch information...
iperov committed Apr 8, 2019
1 parent 7c93012 commit 8561c1a9318be7179cd946ab911b504317ab196d
Showing with 136 additions and 133 deletions.
  1. BIN doc/manual_ru.pdf
  2. BIN doc/manual_ru_source.docx
  3. +7 −2 interact/interact.py
  4. +129 −131 mainscripts/MaskEditorTool.py
BIN +30.3 KB (100%) doc/manual_ru.pdf
Binary file not shown.
BIN +34.7 KB (100%) doc/manual_ru_source.docx
Binary file not shown.
@@ -259,6 +259,8 @@ def on_show_image (self, wnd_name, img):
cv2.imshow (wnd_name, img)

def on_capture_mouse (self, wnd_name):
self.last_xy = (0,0)

def onMouse(event, x, y, flags, param):
(inst, wnd_name) = param
if event == cv2.EVENT_LBUTTONDOWN: ev = InteractBase.EVENT_LBUTTONDOWN
@@ -267,9 +269,12 @@ def onMouse(event, x, y, flags, param):
elif event == cv2.EVENT_RBUTTONUP: ev = InteractBase.EVENT_RBUTTONUP
elif event == cv2.EVENT_MBUTTONDOWN: ev = InteractBase.EVENT_MBUTTONDOWN
elif event == cv2.EVENT_MBUTTONUP: ev = InteractBase.EVENT_MBUTTONUP
elif event == cv2.EVENT_MOUSEWHEEL: ev = InteractBase.EVENT_MOUSEWHEEL

elif event == cv2.EVENT_MOUSEWHEEL:
ev = InteractBase.EVENT_MOUSEWHEEL
x,y = self.last_xy #fix opencv bug when window size more than screen size
else: ev = 0

self.last_xy = (x,y)
inst.add_mouse_event (wnd_name, x, y, ev, flags)
cv2.setMouseCallback(wnd_name, onMouse, (self,wnd_name) )

Oops, something went wrong.

0 comments on commit 8561c1a

Please sign in to comment.
You can’t perform that action at this time.