connect two mathod to the same button in pyq5
self.trainPreproBtn.clicked.connect(self.connectionFunction)
@pyqtSlot()
def connectionFunction(self):
self.firstFunction()
self.secondFunction()
connect two mathod to the same button in pyq5
self.trainPreproBtn.clicked.connect(self.connectionFunction)
@pyqtSlot()
def connectionFunction(self):
self.firstFunction()
self.secondFunction()
connect two mathod to the same button in pyq5
self.trainPreproBtn.clicked.connect(self.preproClicked, self.thresClicked)
@pyqtSlot()
def preproClicked(self):
gray = cv2.cvtColor(self.image, cv2.IMREAD_COLOR)
self.image = cv2.cvtColor(gray,cv2.COLOR_BGR2GRAY)
#(thresh, im_bw) = cv2.threshold(self.image, 128, 255, cv2.THRESH_BINARY | cv2.THRESH_OTSU)
#resize_image = cv2.resize(im_bw, (180, 180))
self.displayImage(2)
@pyqtSlot()
def thresClicked(self):
gray = cv2.cvtColor(self.image, cv2.IMREAD_COLOR)
self.image = cv2.cvtColor(gray, cv2.COLOR_BGR2GRAY)
self.image = cv2.threshold(self.image, 128, 255, cv2.THRESH_BINARY )
self.displayImage(4)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us