예제 #1
0
    def __init__(self, parent):
        wx.Frame.__init__(self, parent, size=(640, 480))

        self.camera = Camera(1)
        self.camera.set_resolution(960, 1280)

        self.video_view = VideoView(self, self.capture)
        self.video_view.start()

        box = wx.BoxSizer(wx.HORIZONTAL)
        box.Add(self.video_view, 1, wx.ALL | wx.EXPAND, 0)
        self.SetSizer(box)
        self.Centre()

        self.Bind(wx.EVT_CLOSE, self.on_close)
예제 #2
0
class Frame(wx.Frame):
    def __init__(self, parent):
        wx.Frame.__init__(self, parent, size=(640, 480))

        self.camera = Camera(1)
        self.camera.set_resolution(960, 1280)

        self.video_view = VideoView(self, self.capture)
        self.video_view.start()

        box = wx.BoxSizer(wx.HORIZONTAL)
        box.Add(self.video_view, 1, wx.ALL | wx.EXPAND, 0)
        self.SetSizer(box)
        self.Centre()

        self.Bind(wx.EVT_CLOSE, self.on_close)

    def capture(self):
        return self.camera.capture_image(flush=0)

    def on_close(self, event):
        self.video_view.stop()
        event.Skip()
예제 #3
0
class Frame(wx.Frame):
    def __init__(self, parent):
        wx.Frame.__init__(self, parent, size=(640, 480))

        self.camera = Camera(1)
        self.camera.set_resolution(960, 1280)

        self.video_view = VideoView(self, self.capture)
        self.video_view.start()

        box = wx.BoxSizer(wx.HORIZONTAL)
        box.Add(self.video_view, 1, wx.ALL | wx.EXPAND, 0)
        self.SetSizer(box)
        self.Centre()

        self.Bind(wx.EVT_CLOSE, self.on_close)

    def capture(self):
        return self.camera.capture_image(flush=0)

    def on_close(self, event):
        self.video_view.stop()
        event.Skip()
예제 #4
0
    def __init__(self, parent):
        wx.Frame.__init__(self, parent, size=(640, 480))

        self.camera = Camera(1)
        self.camera.set_resolution(960, 1280)

        self.video_view = VideoView(self, self.capture)
        self.video_view.start()

        box = wx.BoxSizer(wx.HORIZONTAL)
        box.Add(self.video_view, 1, wx.ALL | wx.EXPAND, 0)
        self.SetSizer(box)
        self.Centre()

        self.Bind(wx.EVT_CLOSE, self.on_close)