1self.trainPreproBtn.clicked.connect(self.connectionFunction)
2
3@pyqtSlot()
4def connectionFunction(self):
5 self.firstFunction()
6 self.secondFunction()
1self.trainPreproBtn.clicked.connect(self.preproClicked, self.thresClicked)
2
3@pyqtSlot()
4def preproClicked(self):
5 gray = cv2.cvtColor(self.image, cv2.IMREAD_COLOR)
6 self.image = cv2.cvtColor(gray,cv2.COLOR_BGR2GRAY)
7 #(thresh, im_bw) = cv2.threshold(self.image, 128, 255, cv2.THRESH_BINARY | cv2.THRESH_OTSU)
8 #resize_image = cv2.resize(im_bw, (180, 180))
9 self.displayImage(2)
10@pyqtSlot()
11def thresClicked(self):
12 gray = cv2.cvtColor(self.image, cv2.IMREAD_COLOR)
13 self.image = cv2.cvtColor(gray, cv2.COLOR_BGR2GRAY)
14 self.image = cv2.threshold(self.image, 128, 255, cv2.THRESH_BINARY )
15 self.displayImage(4)