import PyQt5
from PyQt5 import QtCore, QtGui, QtWidgets

class Ui_MainWindow(QtWidgets.QMainWindow):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("Image Processing")
        MainWindow.resize(1273, 809)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.label = QtWidgets.QLabel(self.centralwidget)
        self.label.setGeometry(QtCore.QRect(280, 30, 721, 81))
        self.label.setStyleSheet("font: 22pt \"MS Shell Dlg 2\";")
        self.label.setObjectName("label")
        self.label_2 = QtWidgets.QLabel(self.centralwidget)
        self.label_2.setGeometry(QtCore.QRect(170, 250, 971, 371))
        self.label_2.setText("")
        self.label_2.setObjectName("label_2")
        self.frame = QtWidgets.QFrame(self.centralwidget)
        self.frame.setGeometry(QtCore.QRect(0, 0, 1271, 751))
        self.frame.setStyleSheet("background-color: rgb(255, 255, 255);")
        self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame.setObjectName("frame")
        self.pushButton = QtWidgets.QPushButton(self.frame)
        self.pushButton.setGeometry(QtCore.QRect(750, 160, 421, 81))
        self.pushButton.setStyleSheet("font: 22pt \"MS Shell Dlg 2\";")
        self.pushButton.setObjectName("pushButton")
        self.lineEdit = QtWidgets.QLineEdit(self.frame)
        self.lineEdit.setGeometry(QtCore.QRect(90, 170, 521, 81))
        self.lineEdit.setObjectName("lineEdit")
        self.pushButton_2 = QtWidgets.QPushButton(self.frame)
        self.pushButton_2.setGeometry(QtCore.QRect(310, 530, 631, 71))
        self.pushButton_2.setStyleSheet("font: 16pt \"MS Shell Dlg 2\";")
        self.pushButton_2.setObjectName("pushButton_2")
        self.frame_2 = QtWidgets.QFrame(self.frame)
        self.frame_2.setGeometry(QtCore.QRect(0, 0, 1271, 761))
        self.frame_2.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame_2.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_2.setObjectName("frame_2")
        self.pushButton_3 = QtWidgets.QPushButton(self.frame_2)
        self.pushButton_3.setGeometry(QtCore.QRect(420, 250, 451, 91))
        self.pushButton_3.setStyleSheet("font: 20pt \"MS Shell Dlg 2\";")
        self.pushButton_3.setObjectName("pushButton_3")
        self.frame_3 = QtWidgets.QFrame(self.frame_2)
        self.frame_3.setGeometry(QtCore.QRect(0, 0, 1281, 751))
        self.frame_3.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame_3.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_3.setObjectName("frame_3")
        self.label_3 = QtWidgets.QLabel(self.frame_3)
        self.label_3.setGeometry(QtCore.QRect(470, 20, 781, 531))
        self.label_3.setStyleSheet("border:2px solid red;")
        self.label_3.setText("")
        self.label_3.setObjectName("label_3")
        self.pushButton_4 = QtWidgets.QPushButton(self.frame_3)
        self.pushButton_4.setGeometry(QtCore.QRect(50, 400, 381, 81))
        self.pushButton_4.setStyleSheet("font: 18pt \"MS Shell Dlg 2\";")
        self.pushButton_4.setObjectName("pushButton_4")
        self.label_4 = QtWidgets.QLabel(self.frame_3)
        self.label_4.setGeometry(QtCore.QRect(50, 600, 161, 131))
        self.label_4.setStyleSheet("border:2px solid blue;")
        self.label_4.setText("")
        self.label_4.setObjectName("label_4")
        self.label_5 = QtWidgets.QLabel(self.frame_3)
        self.label_5.setGeometry(QtCore.QRect(290, 600, 161, 131))
        self.label_5.setStyleSheet("border:2px solid blue;")
        self.label_5.setText("")
        self.label_5.setObjectName("label_5")
        self.label_6 = QtWidgets.QLabel(self.frame_3)
        self.label_6.setGeometry(QtCore.QRect(530, 600, 161, 131))
        self.label_6.setStyleSheet("border:2px solid blue;")
        self.label_6.setText("")
        self.label_6.setObjectName("label_6")
        self.label_7 = QtWidgets.QLabel(self.frame_3)
        self.label_7.setGeometry(QtCore.QRect(770, 600, 161, 131))
        self.label_7.setStyleSheet("border:2px solid blue;")
        self.label_7.setText("")
        self.label_7.setObjectName("label_7")
        self.label_8 = QtWidgets.QLabel(self.frame_3)
        self.label_8.setGeometry(QtCore.QRect(1010, 600, 161, 131))
        self.label_8.setStyleSheet("border:2px solid blue;")
        self.label_8.setText("")
        self.label_8.setObjectName("label_8")
        self.pushButton_5 = QtWidgets.QPushButton(self.frame_3)
        self.pushButton_5.setGeometry(QtCore.QRect(50, 130, 381, 81))
        self.pushButton_5.setStyleSheet("font: 18pt \"MS Shell Dlg 2\";")
        self.pushButton_5.setObjectName("pushButton_5")
        self.label_9 = QtWidgets.QLabel(self.frame_3)
        self.label_9.setGeometry(QtCore.QRect(200, 280, 71, 71))
        self.label_9.setStyleSheet("font: 22pt \"MS Shell Dlg 2\";")
        self.label_9.setObjectName("label_9")
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1273, 31))
        self.menubar.setObjectName("menubar")
        self.menuOptions = QtWidgets.QMenu(self.menubar)
        self.menuOptions.setObjectName("menuOptions")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.actionFace_Recognition = QtWidgets.QAction(MainWindow)
        self.actionFace_Recognition.setObjectName("actionFace_Recognition")
        self.actionObject_Recognition = QtWidgets.QAction(MainWindow)
        self.actionObject_Recognition.setObjectName("actionObject_Recognition")
        self.actionFruit_Recognition = QtWidgets.QAction(MainWindow)
        self.actionFruit_Recognition.setObjectName("actionFruit_Recognition")
        self.actionGesture_Recognition = QtWidgets.QAction(MainWindow)
        self.actionGesture_Recognition.setObjectName("actionGesture_Recognition")
        self.actionImage_Filters = QtWidgets.QAction(MainWindow)
        self.actionImage_Filters.setObjectName("actionImage_Filters")
        self.menuOptions.addAction(self.actionFace_Recognition)
        self.menuOptions.addAction(self.actionObject_Recognition)
        self.menuOptions.addAction(self.actionFruit_Recognition)
        self.menuOptions.addAction(self.actionGesture_Recognition)
        self.menuOptions.addAction(self.actionImage_Filters)
        self.menubar.addAction(self.menuOptions.menuAction())

        self.frame.hide()

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)

    def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
        self.label.setText(_translate("MainWindow", "Machine Learning Image Processing"))
        self.pushButton.setText(_translate("MainWindow", "Store Face Data"))
        self.pushButton_2.setText(_translate("MainWindow", "Start Recognition"))
        self.pushButton_3.setText(_translate("MainWindow", "Start Recognizing Fruits"))
        self.pushButton_4.setText(_translate("MainWindow", "Upload Image"))
        self.pushButton_5.setText(_translate("MainWindow", "Start Camera"))
        self.label_9.setText(_translate("MainWindow", "Or"))
        self.menuOptions.setTitle(_translate("MainWindow", "Options"))
        self.actionFace_Recognition.setText(_translate("MainWindow", "Face Recognition"))
        self.actionObject_Recognition.setText(_translate("MainWindow", "Object Recognition"))
        self.actionFruit_Recognition.setText(_translate("MainWindow", "Fruit Recognition"))
        self.actionGesture_Recognition.setText(_translate("MainWindow", "Gesture Recognition"))
        self.actionImage_Filters.setText(_translate("MainWindow", "Image Filters"))

        self.actionFace_Recognition.triggered.connect(self.faceRecognition)
        self.actionFruit_Recognition.triggered.connect(self.fruitRecognition)
        self.actionImage_Filters.triggered.connect(self.imageFilter)

    def faceRecognition(self):
        print("Start Face Recognition")
        self.frame.show()
        self.frame_2.hide()

    def fruitRecognition(self):
        print("Fruit Recognition")
        self.frame.show()
        self.frame_3.hide()

    def imageFilter(self):
        print("Image Filters")


if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    MainWindow = QtWidgets.QMainWindow()
    ui = Ui_MainWindow()
    ui.setupUi(MainWindow)
    MainWindow.show()
    sys.exit(app.exec_())

