gui_windowSignal.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:vbcg 作者: nspi 项目源码 文件源码
def __create_gui(self):

        # Add subplots
        self.figure = Mat_figure(figsize=(5, 3), dpi=100)
        self.subplotTop = self.figure.add_subplot(211)
        self.subplotBottom = self.figure.add_subplot(212)

        # Add labels
        self.subplotTop.set_xlabel('Frames')
        self.subplotBottom.set_xlabel('Hz')
        # Change font size
        matplotlib.rcParams.update({'font.size': 10})

        # Create canvas
        self.canvas = FigureCanvasTkAgg(self.figure, master=self.root)
        self.canvas.show()
        self.canvas.get_tk_widget().pack(side=Tk.TOP, fill=Tk.BOTH, expand=1)

        # We store the data that is interchanged from GuiSignalProcessor to GuiSignalPlotter in a queue
        self.dataQueue = LifoQueue()

        # Create thread that displays signal
        self.signalPlotThread = GuiSignalPlotter(self.root, self.cameraInstance, self.figure, self.canvas,
                                                 self.subplotTop, self.subplotBottom, self.statusbar,
                                                 self.video_display, self.dataQueue)
        # Create thread that processes signal
        self.signalProcessorThread = GuiSignalProcessor(self.root, self.cameraInstance, self.figure, self.canvas,
                                                        self.subplotTop, self.subplotBottom, self.statusbar,
                                                        self.video_display, self.dataQueue)

        # Start both threads
        self.signalPlotThread.start()
        self.signalProcessorThread.start()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号