def __init__(self, parent, fps=30): Tcp.__init__(self, "capture:") wx.Panel.__init__(self, parent) # parent.SetSize((640, 480)) self.fps = fps self.timer = wx.Timer(self) self.timer.Start(1000. / self.fps) self.Bind(wx.EVT_PAINT, self.OnPaint) self.Bind(wx.EVT_TIMER, self.NextFrame)
def __init__(self, width, height): Tcp.__init__(self, "command:") self.width, self.height = width, height self.hm = pyHook.HookManager() self.hm.KeyDown = self.onKeyboardEvent self.hm.MouseAll = self.onMouseEvent self.time = time.time() self.holder_1 = 90 self.holder_2 = 90
def __init__(self, address): Tcp.__init__(self, address, "command:")
def __init__(self, address): Tcp.__init__(self, address, "capture:") self.frame = None
def __init__(self, CAMERA=0, IMG_QUILITY=80, captureInterval=0.01): Tcp.__init__(self, "capture:") self.CAMERA, self.IMG_QUILITY = CAMERA, IMG_QUILITY self.encode_param = [int(cv2.IMWRITE_JPEG_QUALITY), self.IMG_QUILITY] self.capture = cv2.VideoCapture(self.CAMERA) self.captureInterval = captureInterval
def __init__(self): Tcp.__init__(self, 'command:') self.ser = None self.isConnectToArduino = False