-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVisuControl.py
More file actions
38 lines (28 loc) · 993 Bytes
/
Copy pathVisuControl.py
File metadata and controls
38 lines (28 loc) · 993 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import cv2 as cv
from ImgTreatement.TreatementThread import ImgProcessor
from ImgTreatement.DebugDisplay import show_resized
from Data import DB
from GUI.Base import BaseApp
import tkinter as tk
from Cap import CaptureApp
class AppVisuControl(BaseApp):
def __init__(self, root, title="Visual Controller"):
super().__init__(root, title)
self.frame_capture = tk.Frame()
self._capture = CaptureApp(self.frame_capture)
self._treatement_thread = ImgProcessor(self.treated_image)
self.frame_capture.pack()
self._capture.on_capture_callback.append(self._treatement_thread.add)
def exec(self):
self._capture.exec()
self._treatement_thread.start()
super().exec()
def on_close(self):
self._capture.on_close()
self._treatement_thread.stop()
super().on_close()
def treated_image(self, result):
pass
if __name__ == '__main__':
app = AppVisuControl(tk.Tk())
app.exec()