Exemplo n.º 1
0
    def configButton_click(self):
        import MainApp.conf as Conf

        log("opening configuration window")
        ui = configWindow.configWindow(self)
        ui.WorkingThread = self.thread
        ui.lineEdit.setText(config.get("IP"))
        ui.colorThresholdVal.setValue(int(config.get("threshold")))
        ui.p1.setValue(int(Conf.get("param1")))
        ui.p2.setValue(int(Conf.get("param2")))
        if ui.exec_():
            config.set("IP", ui.lineEdit.text())
            config.set("threshold", ui.colorThresholdVal.value())
Exemplo n.º 2
0
    def calibrate_board(self, img):
        import MainApp.conf as conf

        self.img = img
        self.ImgCopy = copy.deepcopy(self.img)
        self.ImgCopy2 = copy.deepcopy(self.img)
        cv2.namedWindow('image')
        cv2.setMouseCallback('image', self.mouseEvent)
        self.splitPointsTemp = []
        while True:
            cv2.imshow('image', self.ImgCopy2)
            if len(self.splitPointsTemp) == 4 or cv2.waitKey(1) & 0xFF == 27:
                break
        if len(self.splitPointsTemp) == 4:
            self.splitPoints = self.splitPointsTemp
            #print self.splitPoints
        conf.set('splitPoints', self.splitPoints)
        cv2.destroyAllWindows()
Exemplo n.º 3
0
    def calibrate_board(self,img):
        import MainApp.conf as conf

        self.img = img
        self.ImgCopy = copy.deepcopy(self.img)
        self.ImgCopy2 = copy.deepcopy(self.img)
        cv2.namedWindow('image')
        cv2.setMouseCallback('image', self.mouseEvent)
        self.splitPointsTemp = []
        while True:
            cv2.imshow('image', self.ImgCopy2)
            if len(self.splitPointsTemp) == 4 or cv2.waitKey(1) & 0xFF == 27:
                break
        if len(self.splitPointsTemp) == 4:
            self.splitPoints = self.splitPointsTemp
            #print self.splitPoints
        conf.set('splitPoints', self.splitPoints)
        cv2.destroyAllWindows()
Exemplo n.º 4
0
 def on_rightButton_clicked(self):
     x = int(conf.get('rotate'))
     conf.set('rotate', x - 1)
Exemplo n.º 5
0
 def on_leftButton_clicked(self):
     x = int(conf.get('rotate'))
     conf.set('rotate', x + 1)
Exemplo n.º 6
0
    def on_p2_valueChanged(self, x):
        import MainApp.conf as conf

        conf.set('param2', x)
        self.WorkingThread.calc_image()