Definition at line 118 of file common.py.
◆ __init__()
def var.common.Sketcher.__init__ |
( |
|
self, |
|
|
|
windowname, |
|
|
|
dests, |
|
|
|
colors_func |
|
) |
| |
Definition at line 119 of file common.py.
119 def __init__(self, windowname, dests, colors_func):
121 self.windowname = windowname
123 self.colors_func = colors_func
126 cv.setMouseCallback(self.windowname, self.on_mouse)
◆ on_mouse()
def var.common.Sketcher.on_mouse |
( |
|
self, |
|
|
|
event, |
|
|
|
x, |
|
|
|
y, |
|
|
|
flags, |
|
|
|
param |
|
) |
| |
Definition at line 131 of file common.py.
131 def on_mouse(self, event, x, y, flags, param):
133 if event == cv.EVENT_LBUTTONDOWN:
135 elif event == cv.EVENT_LBUTTONUP:
138 if self.prev_pt
and flags & cv.EVENT_FLAG_LBUTTON:
139 for dst, color
in zip(self.dests, self.colors_func()):
140 cv.line(dst, self.prev_pt, pt, color, 5)
◆ show()
def var.common.Sketcher.show |
( |
|
self | ) |
|
Definition at line 128 of file common.py.
129 cv.imshow(self.windowname, self.dests[0])
◆ colors_func
var.common.Sketcher.colors_func |
◆ dests
var.common.Sketcher.dests |
◆ dirty
var.common.Sketcher.dirty |
◆ prev_pt
var.common.Sketcher.prev_pt |
◆ windowname
var.common.Sketcher.windowname |
The documentation for this class was generated from the following file:
- repos_for_Dox/cFp_Zoo/HOST/vision/common/languages/python/var/common.py