You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
816 lines
44 KiB
816 lines
44 KiB
# -*- coding: utf-8 -*-
|
|
|
|
# Form implementation generated from reading ui file 'Mainwindow.ui'
|
|
#
|
|
# Created by: PyQt5 UI code generator 5.15.7
|
|
#
|
|
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
|
|
# run again. Do not edit this file unless you know what you are doing.
|
|
|
|
from PyQt5.QtWidgets import QMainWindow, QApplication, QFrame
|
|
from PyQt5 import QtCore, QtGui, QtWidgets
|
|
from PyQt5.QtGui import *
|
|
from PyQt5.QtWidgets import QLabel
|
|
from PyQt5.QtCore import Qt
|
|
|
|
|
|
class Ui_Mainwindow(object):
|
|
def setupUi(self, Mainwindow):
|
|
Mainwindow.setObjectName("Mainwindow")
|
|
Mainwindow.resize(1400, 900)
|
|
Mainwindow.setObjectName("wkWgt") # 替换背景图片只对当前窗口生效 核心代码
|
|
Mainwindow.setStyleSheet("wkWgt{border-image:url(AA.webp);}") # 替换图片路径 核心代码
|
|
#Mainwindow.setStyleSheet("MainWindow{border-image:url(AA.webp)}")
|
|
Mainwindow.setStyleSheet("MainWindow{background-color:white}")
|
|
self.verticalLayoutWidget = QtWidgets.QWidget(Mainwindow)
|
|
self.verticalLayoutWidget.setGeometry(QtCore.QRect(40, 20, 250, 850))#抽屉
|
|
self.verticalLayoutWidget.setObjectName("verticalLayoutWidget")
|
|
self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget)
|
|
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
|
|
self.verticalLayout.setObjectName("verticalLayout")
|
|
self.pushButton_1 = QtWidgets.QPushButton(self.verticalLayoutWidget)
|
|
self.pushButton_1.setObjectName("pushButton_1")
|
|
self.verticalLayout.addWidget(self.pushButton_1)
|
|
self.pushButton_2 = QtWidgets.QPushButton(self.verticalLayoutWidget)
|
|
self.pushButton_2.setObjectName("pushButton_2")
|
|
self.verticalLayout.addWidget(self.pushButton_2)
|
|
self.pushButton_3 = QtWidgets.QPushButton(self.verticalLayoutWidget)
|
|
self.pushButton_3.setObjectName("pushButton_3")
|
|
self.verticalLayout.addWidget(self.pushButton_3)
|
|
self.pushButton_4 = QtWidgets.QPushButton(self.verticalLayoutWidget)
|
|
self.pushButton_4.setObjectName("pushButton_4")
|
|
self.verticalLayout.addWidget(self.pushButton_4)
|
|
self.pushButton_5 = QtWidgets.QPushButton(self.verticalLayoutWidget)
|
|
self.pushButton_5.setObjectName("pushButton_5")
|
|
self.verticalLayout.addWidget(self.pushButton_5)
|
|
self.pushButton_6 = QtWidgets.QPushButton(self.verticalLayoutWidget)
|
|
self.pushButton_6.setObjectName("pushButton_6")
|
|
self.verticalLayout.addWidget(self.pushButton_6)
|
|
self.pushButton_7 = QtWidgets.QPushButton(self.verticalLayoutWidget)
|
|
self.pushButton_7.setObjectName("pushButton_7")
|
|
self.verticalLayout.addWidget(self.pushButton_7)
|
|
self.frame = QtWidgets.QFrame(Mainwindow)
|
|
self.frame.setGeometry(QtCore.QRect(330, 19, 1030, 850))
|
|
self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
|
|
self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
|
|
|
|
#self.frame.setStyleSheet("QFrame{background-color:rgb(50,50,50)}")
|
|
|
|
|
|
|
|
#"QPushButton{color:black}"
|
|
self.frame.setObjectName("frame")
|
|
self.frame.setStyleSheet("#frame{background:write url(r-c.jpg);}")
|
|
|
|
|
|
|
|
self.retranslateUi(Mainwindow)
|
|
QtCore.QMetaObject.connectSlotsByName(Mainwindow)
|
|
|
|
def retranslateUi(self, Mainwindow):
|
|
_translate = QtCore.QCoreApplication.translate
|
|
Mainwindow.setWindowTitle(_translate("Mainwindow", "图像处理_509_佘晓雯"))
|
|
self.pushButton_1.setText(_translate("Mainwindow", "灰度/二值化"))
|
|
#self.pushButton_1.setGeometry(100, 1080, 100, 100)
|
|
self.pushButton_1.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:lightblue}"
|
|
"QPushButton{border:50px}"
|
|
"QPushButton{border-radius:20px}"
|
|
"QPushButton{padding:2px 4px}")
|
|
self.pushButton_2.setText(_translate("Mainwindow", "几何变换"))
|
|
self.pushButton_2.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:lightblue}"
|
|
"QPushButton{border:50px}"
|
|
"QPushButton{border-radius:20px}"
|
|
"QPushButton{padding:2px 4px}")
|
|
self.pushButton_3.setText(_translate("Mainwindow", "图像增强"))
|
|
self.pushButton_3.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:lightblue}"
|
|
"QPushButton{border:50px}"
|
|
"QPushButton{border-radius:20px}"
|
|
"QPushButton{padding:2px 4px}")
|
|
self.pushButton_4.setText(_translate("Mainwindow", "加噪"))
|
|
self.pushButton_4.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:lightblue}"
|
|
"QPushButton{border:50px}"
|
|
"QPushButton{border-radius:20px}"
|
|
"QPushButton{padding:2px 4px}")
|
|
self.pushButton_5.setText(_translate("Mainwindow", "滤波"))
|
|
self.pushButton_5.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:lightblue}"
|
|
"QPushButton{border:50px}"
|
|
"QPushButton{border-radius:20px}"
|
|
"QPushButton{padding:2px 4px}")
|
|
self.pushButton_6.setText(_translate("Mainwindow", "检测"))
|
|
self.pushButton_6.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:lightblue}"
|
|
"QPushButton{border:50px}"
|
|
"QPushButton{border-radius:20px}"
|
|
"QPushButton{padding:2px 4px}")
|
|
self.pushButton_7.setText(_translate("Mainwindow", "图像修复"))
|
|
self.pushButton_7.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:lightblue}"
|
|
"QPushButton{border:50px}"
|
|
"QPushButton{border-radius:20px}"
|
|
"QPushButton{padding:2px 4px}")
|
|
self.pushButton_1.setFont(QFont('幼圆', 20))
|
|
self.pushButton_2.setFont(QFont('幼圆', 20))
|
|
self.pushButton_3.setFont(QFont('幼圆', 20))
|
|
self.pushButton_4.setFont(QFont('幼圆', 20))
|
|
self.pushButton_5.setFont(QFont('幼圆', 20))
|
|
self.pushButton_6.setFont(QFont('幼圆', 20))
|
|
self.pushButton_7.setFont(QFont('幼圆', 20))
|
|
|
|
class Ui_Formwin1(object):
|
|
def setupUi(self, Formwin1):
|
|
Formwin1.setObjectName("Formwin1")
|
|
Formwin1.resize(571, 388)
|
|
self.label_daichuli = QtWidgets.QLabel(Formwin1)
|
|
self.label_daichuli.setGeometry(QtCore.QRect(50, 50, 441, 501))#待处理
|
|
self.label_daichuli.setFrameShadow(QtWidgets.QFrame.Raised)#边框阴影
|
|
self.label_daichuli.setFrameShape(QFrame.Box)#边框样式
|
|
self.label_daichuli.setStyleSheet('background-color: rgb(240,240,240);')
|
|
self.label_daichuli.setFont(QFont('幼圆', 20))
|
|
self.label_daichuli.setAlignment(Qt.AlignCenter) # 居中对齐
|
|
self.label_daichuli.setObjectName("label_daichuli")
|
|
self.label_jieguo = QtWidgets.QLabel(Formwin1)
|
|
self.label_jieguo.setGeometry(QtCore.QRect(530, 50, 441, 501))#结果
|
|
self.label_jieguo.setFrameShadow(QtWidgets.QFrame.Raised) # 边框阴影
|
|
self.label_jieguo.setFrameShape(QFrame.Box) # 边框样式
|
|
self.label_jieguo.setStyleSheet('background-color: rgb(240,240,240);')
|
|
self.label_jieguo.setFont(QFont('幼圆', 20))
|
|
self.label_jieguo.setAlignment(Qt.AlignCenter) # 居中对齐
|
|
self.label_jieguo.setObjectName("label_jieguo")
|
|
self.pushButton_load = QtWidgets.QPushButton(Formwin1)
|
|
self.pushButton_load.setGeometry(QtCore.QRect(315, 570, 151, 45))#选择图片
|
|
self.pushButton_load.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:lightblue}"
|
|
"QPushButton{border:50px}"
|
|
"QPushButton{border-radius:20px}"
|
|
"QPushButton{padding:2px 4px}")
|
|
self.pushButton_load.setFont(QFont('幼圆', 13))
|
|
self.pushButton_load.setObjectName("pushButton_load")
|
|
self.pushButton_save = QtWidgets.QPushButton(Formwin1)
|
|
self.pushButton_save.setGeometry(QtCore.QRect(800, 570, 151, 45))#保存图片
|
|
self.pushButton_save.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:white}"
|
|
"QPushButton{border:50px}"
|
|
"QPushButton{border-radius:20px}"
|
|
"QPushButton{padding:2px 4px}")
|
|
self.pushButton_save.setFont(QFont('幼圆', 13))
|
|
self.pushButton_save.setObjectName("pushButton_save")
|
|
self.pushButton_turntoGray = QtWidgets.QPushButton(Formwin1)
|
|
self.pushButton_turntoGray.setGeometry(QtCore.QRect(150, 680, 250, 110))
|
|
self.pushButton_turntoGray.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:white}"
|
|
"QPushButton{border:30px}"
|
|
"QPushButton{border-radius:0px}"
|
|
"QPushButton{padding:2px 4px}"
|
|
"QPushButton{border: 4px solid lightblue}")
|
|
self.pushButton_turntoGray.setFont(QFont('幼圆', 21))
|
|
self.pushButton_turntoGray.setObjectName("pushButton_turntoGray")
|
|
self.pushButton_turntotwo = QtWidgets.QPushButton(Formwin1)
|
|
self.pushButton_turntotwo.setGeometry(QtCore.QRect(600, 680, 250, 110))
|
|
self.pushButton_turntotwo.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:white}"
|
|
"QPushButton{border:30px}"
|
|
"QPushButton{border-radius:0px}"
|
|
"QPushButton{padding:2px 4px}"
|
|
"QPushButton{border: 4px solid lightblue}")
|
|
self.pushButton_turntotwo.setFont(QFont('幼圆', 21))
|
|
self.pushButton_turntotwo.setObjectName("pushButton_turntotwo")
|
|
|
|
self.retranslateUi(Formwin1)
|
|
QtCore.QMetaObject.connectSlotsByName(Formwin1)
|
|
|
|
def retranslateUi(self, Formwin1):
|
|
_translate = QtCore.QCoreApplication.translate
|
|
Formwin1.setWindowTitle(_translate("Formwin1", "Form"))
|
|
self.label_daichuli.setText(_translate("Formwin1", "原图"))
|
|
self.label_jieguo.setText(_translate("Formwin1", "结果"))
|
|
self.pushButton_load.setText(_translate("Formwin1", "选择图片"))
|
|
self.pushButton_save.setText(_translate("Formwin1", "保存图片"))
|
|
self.pushButton_turntoGray.setText(_translate("Formwin1", "转成灰度图"))
|
|
self.pushButton_turntotwo.setText(_translate("Formwin1", "图片二值化"))
|
|
|
|
|
|
class Ui_Formwin2(object):
|
|
def setupUi(self, Formwin2):
|
|
Formwin2.setObjectName("Formwin2")
|
|
Formwin2.resize(571, 388)
|
|
self.label_daichuli = QtWidgets.QLabel(Formwin2)
|
|
self.label_daichuli.setGeometry(QtCore.QRect(50, 50, 441, 501)) # 待处理
|
|
self.label_daichuli.setFrameShadow(QtWidgets.QFrame.Raised) # 边框阴影
|
|
self.label_daichuli.setFrameShape(QFrame.Box) # 边框样式
|
|
self.label_daichuli.setStyleSheet('background-color: rgb(240,240,240);')
|
|
self.label_daichuli.setFont(QFont('幼圆', 20))
|
|
self.label_daichuli.setAlignment(Qt.AlignCenter) # 居中对齐
|
|
self.label_daichuli.setObjectName("label_daichuli")
|
|
self.label_jieguo = QtWidgets.QLabel(Formwin2)
|
|
self.label_jieguo.setGeometry(QtCore.QRect(530, 50, 441, 501)) # 结果
|
|
self.label_jieguo.setFrameShadow(QtWidgets.QFrame.Raised) # 边框阴影
|
|
self.label_jieguo.setFrameShape(QFrame.Box) # 边框样式
|
|
self.label_jieguo.setStyleSheet('background-color: rgb(240,240,240);')
|
|
self.label_jieguo.setFont(QFont('幼圆', 20))
|
|
self.label_jieguo.setAlignment(Qt.AlignCenter) # 居中对齐
|
|
self.label_jieguo.setObjectName("label_jieguo")
|
|
self.pushButton_load = QtWidgets.QPushButton(Formwin2)
|
|
self.pushButton_load.setGeometry(QtCore.QRect(315, 570, 151, 45)) # 选择图片
|
|
self.pushButton_load.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:lightblue}"
|
|
"QPushButton{border:50px}"
|
|
"QPushButton{border-radius:20px}"
|
|
"QPushButton{padding:2px 4px}")
|
|
self.pushButton_load.setFont(QFont('幼圆', 13))
|
|
self.pushButton_load.setObjectName("pushButton_load")
|
|
self.pushButton_save = QtWidgets.QPushButton(Formwin2)
|
|
self.pushButton_save.setGeometry(QtCore.QRect(800, 570, 151, 45)) # 保存图片
|
|
self.pushButton_save.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:white}"
|
|
"QPushButton{border:50px}"
|
|
"QPushButton{border-radius:20px}"
|
|
"QPushButton{padding:2px 4px}")
|
|
self.pushButton_save.setFont(QFont('幼圆', 13))
|
|
self.pushButton_save.setObjectName("pushButton_save")
|
|
self.pushButton_fun0 = QtWidgets.QPushButton(Formwin2)
|
|
self.pushButton_fun0.setGeometry(QtCore.QRect(60, 680, 210, 100))
|
|
self.pushButton_fun0.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:white}"
|
|
"QPushButton{border:30px}"
|
|
"QPushButton{border-radius:0px}"
|
|
"QPushButton{padding:2px 4px}"
|
|
"QPushButton{border: 4px solid lightblue}")
|
|
self.pushButton_fun0.setFont(QFont('幼圆', 21))
|
|
self.pushButton_fun0.setObjectName("pushButton_fun0")
|
|
self.pushButton_fun1 = QtWidgets.QPushButton(Formwin2)
|
|
self.pushButton_fun1.setGeometry(QtCore.QRect(290, 680, 210, 100))
|
|
self.pushButton_fun1.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:white}"
|
|
"QPushButton{border:30px}"
|
|
"QPushButton{border-radius:0px}"
|
|
"QPushButton{padding:2px 4px}"
|
|
"QPushButton{border: 4px solid lightblue}")
|
|
self.pushButton_fun1.setFont(QFont('幼圆', 21))
|
|
self.pushButton_fun1.setObjectName("pushButton_fun1")
|
|
self.pushButton_fun2 = QtWidgets.QPushButton(Formwin2)
|
|
self.pushButton_fun2.setGeometry(QtCore.QRect(520, 680, 210,100))
|
|
self.pushButton_fun2.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:white}"
|
|
"QPushButton{border:30px}"
|
|
"QPushButton{border-radius:0px}"
|
|
"QPushButton{padding:2px 4px}"
|
|
"QPushButton{border: 4px solid lightblue}")
|
|
self.pushButton_fun2.setFont(QFont('幼圆', 21))
|
|
self.pushButton_fun2.setObjectName("pushButton_fun2")
|
|
self.pushButton_fun3 = QtWidgets.QPushButton(Formwin2)
|
|
self.pushButton_fun3.setGeometry(QtCore.QRect(840, 710, 160, 70))
|
|
self.pushButton_fun3.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:white}"
|
|
"QPushButton{border:30px}"
|
|
"QPushButton{border-radius:0px}"
|
|
"QPushButton{padding:2px 4px}"
|
|
"QPushButton{border: 4px solid lightblue}")
|
|
self.pushButton_fun3.setFont(QFont('幼圆', 21))
|
|
self.pushButton_fun3.setObjectName("pushButton_fun0")
|
|
self.lineEdit_power_value = QtWidgets.QLineEdit(Formwin2)
|
|
self.lineEdit_power_value.setGeometry(QtCore.QRect(745, 655, 120, 45)) # 输入行
|
|
self.lineEdit_power_value.setFont(QFont('Times', 15))
|
|
self.lineEdit_power_value.setObjectName("lineEdit_power_value")
|
|
|
|
self.retranslateUi(Formwin2)
|
|
QtCore.QMetaObject.connectSlotsByName(Formwin2)
|
|
|
|
def retranslateUi(self, Formwin2):
|
|
_translate = QtCore.QCoreApplication.translate
|
|
Formwin2.setWindowTitle(_translate("Formwin2", "Form"))
|
|
self.label_daichuli.setText(_translate("Formwin2", "原图"))
|
|
self.label_jieguo.setText(_translate("Formwin2", "结果"))
|
|
self.pushButton_load.setText(_translate("Formwin2", "选择图片"))
|
|
self.pushButton_save.setText(_translate("Formwin2", "保存图片"))
|
|
self.pushButton_fun0.setText(_translate("Formwin2", "垂直翻转"))
|
|
self.pushButton_fun1.setText(_translate("Formwin2", "水平翻转"))
|
|
self.pushButton_fun2.setText(_translate("Formwin2", "对角翻转"))
|
|
self.pushButton_fun3.setText(_translate("Formwin2", "放缩"))
|
|
self.lineEdit_power_value.setText(_translate("Formwin2", "1.5"))
|
|
|
|
|
|
class Ui_Formwin3(object):
|
|
def setupUi(self, Formwin3):
|
|
Formwin3.setObjectName("Formwin3")
|
|
Formwin3.resize(571, 388)
|
|
self.label_daichuli = QtWidgets.QLabel(Formwin3)
|
|
self.label_daichuli.setGeometry(QtCore.QRect(50, 50, 441, 501)) # 待处理
|
|
self.label_daichuli.setFrameShadow(QtWidgets.QFrame.Raised) # 边框阴影
|
|
self.label_daichuli.setFrameShape(QFrame.Box) # 边框样式
|
|
self.label_daichuli.setStyleSheet('background-color: rgb(240,240,240);')
|
|
self.label_daichuli.setFont(QFont('幼圆', 20))
|
|
self.label_daichuli.setAlignment(Qt.AlignCenter) # 居中对齐
|
|
self.label_daichuli.setObjectName("label_daichuli")
|
|
self.label_jieguo = QtWidgets.QLabel(Formwin3)
|
|
self.label_jieguo.setGeometry(QtCore.QRect(530, 50, 441, 501)) # 结果
|
|
self.label_jieguo.setFrameShadow(QtWidgets.QFrame.Raised) # 边框阴影
|
|
self.label_jieguo.setFrameShape(QFrame.Box) # 边框样式
|
|
self.label_jieguo.setStyleSheet('background-color: rgb(240,240,240);')
|
|
self.label_jieguo.setFont(QFont('幼圆', 20))
|
|
self.label_jieguo.setAlignment(Qt.AlignCenter) # 居中对齐
|
|
self.label_jieguo.setObjectName("label_jieguo")
|
|
self.pushButton_load = QtWidgets.QPushButton(Formwin3)
|
|
self.pushButton_load.setGeometry(QtCore.QRect(315, 570, 151, 45)) # 选择图片
|
|
self.pushButton_load.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:lightblue}"
|
|
"QPushButton{border:50px}"
|
|
"QPushButton{border-radius:20px}"
|
|
"QPushButton{padding:2px 4px}")
|
|
self.pushButton_load.setFont(QFont('幼圆', 13))
|
|
self.pushButton_load.setObjectName("pushButton_load")
|
|
self.pushButton_save = QtWidgets.QPushButton(Formwin3)
|
|
self.pushButton_save.setGeometry(QtCore.QRect(800, 570, 151, 45)) # 保存图片
|
|
self.pushButton_save.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:white}"
|
|
"QPushButton{border:50px}"
|
|
"QPushButton{border-radius:20px}"
|
|
"QPushButton{padding:2px 4px}")
|
|
self.pushButton_save.setFont(QFont('幼圆', 13))
|
|
self.pushButton_save.setObjectName("pushButton_save")
|
|
self.pushButton_lap = QtWidgets.QPushButton(Formwin3)
|
|
self.pushButton_lap.setGeometry(QtCore.QRect(60, 680, 210, 110))#拉普拉斯
|
|
self.pushButton_lap.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:white}"
|
|
"QPushButton{border:30px}"
|
|
"QPushButton{border-radius:0px}"
|
|
"QPushButton{padding:2px 4px}"
|
|
"QPushButton{border: 4px solid lightblue}")
|
|
self.pushButton_lap.setFont(QFont('幼圆', 21))
|
|
self.pushButton_lap.setObjectName("pushButton_lap")
|
|
self.pushButton_zhifangtu = QtWidgets.QPushButton(Formwin3)
|
|
self.pushButton_zhifangtu.setGeometry(QtCore.QRect(320, 680, 210, 110))#直方图
|
|
self.pushButton_zhifangtu.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:white}"
|
|
"QPushButton{border:30px}"
|
|
"QPushButton{border-radius:0px}"
|
|
"QPushButton{padding:2px 4px}"
|
|
"QPushButton{border: 4px solid lightblue}")
|
|
self.pushButton_zhifangtu.setFont(QFont('幼圆', 21))
|
|
self.pushButton_zhifangtu.setObjectName("pushButton_zhifangtu")
|
|
self.pushButton_gama = QtWidgets.QPushButton(Formwin3)
|
|
self.pushButton_gama.setGeometry(QtCore.QRect(580, 680, 210, 110))#伽马
|
|
self.pushButton_gama.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:white}"
|
|
"QPushButton{border:30px}"
|
|
"QPushButton{border-radius:0px}"
|
|
"QPushButton{padding:2px 4px}"
|
|
"QPushButton{border: 4px solid lightblue}")
|
|
self.pushButton_gama.setFont(QFont('幼圆', 19))
|
|
self.pushButton_gama.setObjectName("pushButton_gama")
|
|
self.label = QtWidgets.QLabel(Formwin3)
|
|
self.label.setGeometry(QtCore.QRect(800, 680, 151, 31))
|
|
self.label.setStyleSheet("QLabel{color:blue}")
|
|
self.label.setFont(QFont('幼圆', 16))
|
|
self.label.setObjectName("label")
|
|
self.lineEdit_power_value = QtWidgets.QLineEdit(Formwin3)
|
|
self.lineEdit_power_value.setGeometry(QtCore.QRect(850, 725, 150, 65))#输入行
|
|
self.lineEdit_power_value.setFont(QFont('Times', 15))
|
|
self.lineEdit_power_value.setObjectName("lineEdit_power_value")
|
|
|
|
self.retranslateUi(Formwin3)
|
|
QtCore.QMetaObject.connectSlotsByName(Formwin3)
|
|
|
|
def retranslateUi(self, Formwin3):
|
|
_translate = QtCore.QCoreApplication.translate
|
|
Formwin3.setWindowTitle(_translate("Formwin3", "Form"))
|
|
self.label_daichuli.setText(_translate("Formwin3", "原图"))
|
|
self.label_jieguo.setText(_translate("Formwin3", "结果"))
|
|
self.pushButton_load.setText(_translate("Formwin3", "选择图片"))
|
|
self.pushButton_save.setText(_translate("Formwin3", "保存图片"))
|
|
self.pushButton_lap.setText(_translate("Formwin3", "拉普拉斯"))
|
|
self.pushButton_zhifangtu.setText(_translate("Formwin3", "直方图"))
|
|
self.pushButton_gama.setText(_translate("Formwin3", "伽马变化"))
|
|
self.label.setText(_translate("Formwin3", "伽马因子="))
|
|
self.lineEdit_power_value.setText(_translate("Formwin3", "1.5"))
|
|
|
|
|
|
class Ui_Formwin4(object):
|
|
def setupUi(self, Formwin4):
|
|
Formwin4.setObjectName("Formwin4")
|
|
Formwin4.resize(571, 388)
|
|
self.label_daichuli = QtWidgets.QLabel(Formwin4)
|
|
self.label_daichuli.setGeometry(QtCore.QRect(50, 50, 441, 501)) # 待处理
|
|
self.label_daichuli.setFrameShadow(QtWidgets.QFrame.Raised) # 边框阴影
|
|
self.label_daichuli.setFrameShape(QFrame.Box) # 边框样式
|
|
self.label_daichuli.setStyleSheet('background-color: rgb(240,240,240);')
|
|
self.label_daichuli.setFont(QFont('幼圆', 20))
|
|
self.label_daichuli.setAlignment(Qt.AlignCenter) # 居中对齐
|
|
self.label_daichuli.setObjectName("label_daichuli")
|
|
self.label_jieguo = QtWidgets.QLabel(Formwin4)
|
|
self.label_jieguo.setGeometry(QtCore.QRect(530, 50, 441, 501)) # 结果
|
|
self.label_jieguo.setFrameShadow(QtWidgets.QFrame.Raised) # 边框阴影
|
|
self.label_jieguo.setFrameShape(QFrame.Box) # 边框样式
|
|
self.label_jieguo.setStyleSheet('background-color: rgb(240,240,240);')
|
|
self.label_jieguo.setFont(QFont('幼圆', 20))
|
|
self.label_jieguo.setAlignment(Qt.AlignCenter) # 居中对齐
|
|
self.label_jieguo.setObjectName("label_jieguo")
|
|
self.pushButton_load = QtWidgets.QPushButton(Formwin4)
|
|
self.pushButton_load.setGeometry(QtCore.QRect(315, 570, 151, 45)) # 选择图片
|
|
self.pushButton_load.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:lightblue}"
|
|
"QPushButton{border:50px}"
|
|
"QPushButton{border-radius:20px}"
|
|
"QPushButton{padding:2px 4px}")
|
|
self.pushButton_load.setFont(QFont('幼圆', 13))
|
|
self.pushButton_load.setObjectName("pushButton_load")
|
|
self.pushButton_save = QtWidgets.QPushButton(Formwin4)
|
|
self.pushButton_save.setGeometry(QtCore.QRect(800, 570, 151, 45)) # 保存图片
|
|
self.pushButton_save.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:white}"
|
|
"QPushButton{border:50px}"
|
|
"QPushButton{border-radius:20px}"
|
|
"QPushButton{padding:2px 4px}")
|
|
self.pushButton_save.setFont(QFont('幼圆', 13))
|
|
self.pushButton_save.setObjectName("pushButton_save")
|
|
self.pushButton_gauss = QtWidgets.QPushButton(Formwin4)
|
|
self.pushButton_gauss.setGeometry(QtCore.QRect(60, 680, 210, 110))
|
|
self.pushButton_gauss.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:white}"
|
|
"QPushButton{border:30px}"
|
|
"QPushButton{border-radius:0px}"
|
|
"QPushButton{padding:2px 4px}"
|
|
"QPushButton{border: 4px solid lightblue}")
|
|
self.pushButton_gauss.setFont(QFont('幼圆', 21))
|
|
self.pushButton_gauss.setObjectName("pushButton_gauss")
|
|
self.pushButton_salt = QtWidgets.QPushButton(Formwin4)
|
|
self.pushButton_salt.setGeometry(QtCore.QRect(530, 680, 210, 110))
|
|
self.pushButton_salt.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:white}"
|
|
"QPushButton{border:30px}"
|
|
"QPushButton{border-radius:0px}"
|
|
"QPushButton{padding:2px 4px}"
|
|
"QPushButton{border: 4px solid lightblue}")
|
|
self.pushButton_salt.setFont(QFont('幼圆', 21))
|
|
self.pushButton_salt.setObjectName("pushButton_gama")
|
|
self.label = QtWidgets.QLabel(Formwin4) #椒盐个数
|
|
self.label.setGeometry(QtCore.QRect(760, 680, 151, 31))
|
|
self.label.setStyleSheet("QLabel{color:blue}")
|
|
self.label.setFont(QFont('幼圆', 16))
|
|
self.label.setObjectName("label")
|
|
self.lineEdit_n_value = QtWidgets.QLineEdit(Formwin4)
|
|
self.lineEdit_n_value.setGeometry(QtCore.QRect(850, 725, 150, 65))#输入信噪比
|
|
self.lineEdit_n_value.setFont(QFont('Times', 15))
|
|
self.lineEdit_n_value.setObjectName("lineEdit_n_value")
|
|
self.label_3 = QtWidgets.QLabel(Formwin4)
|
|
self.label_3.setGeometry(QtCore.QRect(280, 620, 90, 60))#均值
|
|
self.label_3.setStyleSheet("QLabel{color:white}")
|
|
self.label_3.setFont(QFont('幼圆', 16))
|
|
self.label_3.setObjectName("label_3")
|
|
self.lineEdit_mean_value = QtWidgets.QLineEdit(Formwin4)
|
|
self.lineEdit_mean_value.setGeometry(QtCore.QRect(350, 670, 150, 50))#输入均值
|
|
self.lineEdit_mean_value.setFont(QFont('Times', 15))
|
|
self.lineEdit_mean_value.setObjectName("lineEdit_mean_value")
|
|
self.lineEdit_val_value = QtWidgets.QLineEdit(Formwin4)
|
|
self.lineEdit_val_value.setGeometry(QtCore.QRect(350, 770, 150, 50))#输入标准差
|
|
self.lineEdit_val_value.setFont(QFont('Times', 15))
|
|
self.lineEdit_val_value.setObjectName("lineEdit_val_value")
|
|
self.label_4 = QtWidgets.QLabel(Formwin4)
|
|
self.label_4.setGeometry(QtCore.QRect(280, 730, 110, 31))#标准差
|
|
self.label_4.setStyleSheet("QLabel{color:white}")
|
|
self.label_4.setFont(QFont('幼圆', 16))
|
|
self.label_4.setObjectName("label_4")
|
|
|
|
self.retranslateUi(Formwin4)
|
|
QtCore.QMetaObject.connectSlotsByName(Formwin4)
|
|
|
|
def retranslateUi(self, Formwin4):
|
|
_translate = QtCore.QCoreApplication.translate
|
|
Formwin4.setWindowTitle(_translate("Formwin4", "Form"))
|
|
self.label_daichuli.setText(_translate("Formwin4", "原图"))
|
|
self.label_jieguo.setText(_translate("Formwin4", "结果"))
|
|
self.pushButton_load.setText(_translate("Formwin4", "选择图片"))
|
|
self.pushButton_save.setText(_translate("Formwin4", "保存图片"))
|
|
self.pushButton_gauss.setText(_translate("Formwin4", "高斯噪声"))
|
|
self.pushButton_salt.setText(_translate("Formwin4", "椒盐噪声"))
|
|
self.label.setText(_translate("Formwin4", "信噪比="))
|
|
self.lineEdit_n_value.setText(_translate("Formwin4", "0.9"))
|
|
self.label_3.setText(_translate("Formwin4", "均值="))
|
|
self.lineEdit_mean_value.setText(_translate("Formwin4", "0"))
|
|
self.lineEdit_val_value.setText(_translate("Formwin4", "0.1"))
|
|
self.label_4.setText(_translate("Formwin4", "标准差="))
|
|
|
|
|
|
class Ui_Formwin5(object):
|
|
def setupUi(self, Formwin5):
|
|
Formwin5.setObjectName("Formwin5")
|
|
Formwin5.resize(571, 388)
|
|
self.label_daichuli = QtWidgets.QLabel(Formwin5)
|
|
self.label_daichuli.setGeometry(QtCore.QRect(50, 50, 441, 501)) # 待处理
|
|
self.label_daichuli.setFrameShadow(QtWidgets.QFrame.Raised) # 边框阴影
|
|
self.label_daichuli.setFrameShape(QFrame.Box) # 边框样式
|
|
self.label_daichuli.setStyleSheet('background-color: rgb(240,240,240);')
|
|
self.label_daichuli.setFont(QFont('幼圆', 20))
|
|
self.label_daichuli.setAlignment(Qt.AlignCenter) # 居中对齐
|
|
self.label_daichuli.setObjectName("label_daichuli")
|
|
self.label_jieguo = QtWidgets.QLabel(Formwin5)
|
|
self.label_jieguo.setGeometry(QtCore.QRect(530, 50, 441, 501)) # 结果
|
|
self.label_jieguo.setFrameShadow(QtWidgets.QFrame.Raised) # 边框阴影
|
|
self.label_jieguo.setFrameShape(QFrame.Box) # 边框样式
|
|
self.label_jieguo.setStyleSheet('background-color: rgb(240,240,240);')
|
|
self.label_jieguo.setFont(QFont('幼圆', 20))
|
|
self.label_jieguo.setAlignment(Qt.AlignCenter) # 居中对齐
|
|
self.label_jieguo.setObjectName("label_jieguo")
|
|
self.pushButton_load = QtWidgets.QPushButton(Formwin5)
|
|
self.pushButton_load.setGeometry(QtCore.QRect(315, 570, 151, 45)) # 选择图片
|
|
self.pushButton_load.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:lightblue}"
|
|
"QPushButton{border:50px}"
|
|
"QPushButton{border-radius:20px}"
|
|
"QPushButton{padding:2px 4px}")
|
|
self.pushButton_load.setFont(QFont('幼圆', 13))
|
|
self.pushButton_load.setObjectName("pushButton_load")
|
|
self.pushButton_save = QtWidgets.QPushButton(Formwin5)
|
|
self.pushButton_save.setGeometry(QtCore.QRect(800, 570, 151, 45)) # 保存图片
|
|
self.pushButton_save.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:white}"
|
|
"QPushButton{border:50px}"
|
|
"QPushButton{border-radius:20px}"
|
|
"QPushButton{padding:2px 4px}")
|
|
self.pushButton_save.setFont(QFont('幼圆', 13))
|
|
self.pushButton_save.setObjectName("pushButton_save")
|
|
self.pushButton_fangbo = QtWidgets.QPushButton(Formwin5)
|
|
self.pushButton_fangbo.setGeometry(QtCore.QRect(160, 640, 190, 80))#方波滤波
|
|
self.pushButton_fangbo.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:white}"
|
|
"QPushButton{border:30px}"
|
|
"QPushButton{border-radius:0px}"
|
|
"QPushButton{padding:2px 4px}"
|
|
"QPushButton{border: 4px solid lightblue}")
|
|
self.pushButton_fangbo.setFont(QFont('幼圆', 21))
|
|
self.pushButton_fangbo.setObjectName("pushButton_fangbo")
|
|
self.pushButton_zhongzhi = QtWidgets.QPushButton(Formwin5)
|
|
self.pushButton_zhongzhi.setGeometry(QtCore.QRect(410, 640, 190, 80))#中值滤波
|
|
self.pushButton_zhongzhi.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:white}"
|
|
"QPushButton{border:30px}"
|
|
"QPushButton{border-radius:0px}"
|
|
"QPushButton{padding:2px 4px}"
|
|
"QPushButton{border: 4px solid lightblue}")
|
|
self.pushButton_zhongzhi.setFont(QFont('幼圆', 21))
|
|
self.pushButton_zhongzhi.setObjectName("pushButton_zhongzhi")
|
|
self.pushButton_junzhi = QtWidgets.QPushButton(Formwin5)
|
|
self.pushButton_junzhi.setGeometry(QtCore.QRect(660, 640, 190, 80))#均值滤波
|
|
self.pushButton_junzhi.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:white}"
|
|
"QPushButton{border:30px}"
|
|
"QPushButton{border-radius:0px}"
|
|
"QPushButton{padding:2px 4px}"
|
|
"QPushButton{border: 4px solid lightblue}")
|
|
self.pushButton_junzhi.setFont(QFont('幼圆', 21))
|
|
self.pushButton_junzhi.setObjectName("pushButton_junzhi")
|
|
self.pushButton_gauss = QtWidgets.QPushButton(Formwin5)
|
|
self.pushButton_gauss.setGeometry(QtCore.QRect(160, 740, 190, 80))#高斯滤波
|
|
self.pushButton_gauss.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:white}"
|
|
"QPushButton{border:30px}"
|
|
"QPushButton{border-radius:0px}"
|
|
"QPushButton{padding:2px 4px}"
|
|
"QPushButton{border: 4px solid lightblue}")
|
|
self.pushButton_gauss.setFont(QFont('幼圆', 21))
|
|
self.pushButton_gauss.setObjectName("pushButton_gauss")
|
|
self.pushButton_suangbian = QtWidgets.QPushButton(Formwin5)
|
|
self.pushButton_suangbian.setGeometry(QtCore.QRect(410, 740, 190, 80))#双边滤波
|
|
self.pushButton_suangbian.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:white}"
|
|
"QPushButton{border:30px}"
|
|
"QPushButton{border-radius:0px}"
|
|
"QPushButton{padding:2px 4px}"
|
|
"QPushButton{border: 4px solid lightblue}")
|
|
self.pushButton_suangbian.setFont(QFont('幼圆', 21))
|
|
self.pushButton_suangbian.setObjectName("pushButton_suangbian")
|
|
|
|
self.retranslateUi(Formwin5)
|
|
QtCore.QMetaObject.connectSlotsByName(Formwin5)
|
|
|
|
def retranslateUi(self, Formwin5):
|
|
_translate = QtCore.QCoreApplication.translate
|
|
Formwin5.setWindowTitle(_translate("Formwin5", "Form"))
|
|
self.label_daichuli.setText(_translate("Formwin5", "原图"))
|
|
self.label_jieguo.setText(_translate("Formwin5", "结果"))
|
|
self.pushButton_load.setText(_translate("Formwin5", "选择图片"))
|
|
self.pushButton_save.setText(_translate("Formwin5", "保存图片"))
|
|
self.pushButton_fangbo.setText(_translate("Formwin5", "方波滤波"))
|
|
self.pushButton_zhongzhi.setText(_translate("Formwin5", "中值滤波"))
|
|
self.pushButton_junzhi.setText(_translate("Formwin5", "均值滤波"))
|
|
self.pushButton_gauss.setText(_translate("Formwin5", "高斯滤波"))
|
|
self.pushButton_suangbian.setText(_translate("Formwin5", "双边滤波"))
|
|
|
|
|
|
class Ui_Formwin6(object):
|
|
def setupUi(self, Formwin6):
|
|
Formwin6.setObjectName("Formwin6")
|
|
Formwin6.resize(571, 388)
|
|
self.label_daichuli = QtWidgets.QLabel(Formwin6)
|
|
self.label_daichuli.setGeometry(QtCore.QRect(50, 50, 441, 501)) # 待处理
|
|
self.label_daichuli.setFrameShadow(QtWidgets.QFrame.Raised) # 边框阴影
|
|
self.label_daichuli.setFrameShape(QFrame.Box) # 边框样式
|
|
self.label_daichuli.setStyleSheet('background-color: rgb(240,240,240);')
|
|
self.label_daichuli.setFont(QFont('幼圆', 20))
|
|
self.label_daichuli.setAlignment(Qt.AlignCenter) # 居中对齐
|
|
self.label_daichuli.setObjectName("label_daichuli")
|
|
self.label_jieguo = QtWidgets.QLabel(Formwin6)
|
|
self.label_jieguo.setGeometry(QtCore.QRect(530, 50, 441, 501)) # 结果
|
|
self.label_jieguo.setFrameShadow(QtWidgets.QFrame.Raised) # 边框阴影
|
|
self.label_jieguo.setFrameShape(QFrame.Box) # 边框样式
|
|
self.label_jieguo.setStyleSheet('background-color: rgb(240,240,240);')
|
|
self.label_jieguo.setFont(QFont('幼圆', 20))
|
|
self.label_jieguo.setAlignment(Qt.AlignCenter) # 居中对齐
|
|
self.label_jieguo.setObjectName("label_jieguo")
|
|
self.pushButton_load = QtWidgets.QPushButton(Formwin6)
|
|
self.pushButton_load.setGeometry(QtCore.QRect(315, 570, 151, 45)) # 选择图片
|
|
self.pushButton_load.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:lightblue}"
|
|
"QPushButton{border:50px}"
|
|
"QPushButton{border-radius:20px}"
|
|
"QPushButton{padding:2px 4px}")
|
|
self.pushButton_load.setFont(QFont('幼圆', 13))
|
|
self.pushButton_load.setObjectName("pushButton_load")
|
|
self.pushButton_save = QtWidgets.QPushButton(Formwin6)
|
|
self.pushButton_save.setGeometry(QtCore.QRect(800, 570, 151, 45)) # 保存图片
|
|
self.pushButton_save.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:white}"
|
|
"QPushButton{border:50px}"
|
|
"QPushButton{border-radius:20px}"
|
|
"QPushButton{padding:2px 4px}")
|
|
self.pushButton_save.setFont(QFont('幼圆', 13))
|
|
self.pushButton_save.setObjectName("pushButton_save")
|
|
self.pushButton_sift = QtWidgets.QPushButton(Formwin6)
|
|
self.pushButton_sift.setGeometry(QtCore.QRect(150, 680, 250, 110))
|
|
self.pushButton_sift.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:white}"
|
|
"QPushButton{border:30px}"
|
|
"QPushButton{border-radius:0px}"
|
|
"QPushButton{padding:2px 4px}"
|
|
"QPushButton{border: 4px solid lightblue}")
|
|
self.pushButton_sift.setFont(QFont('幼圆', 21))
|
|
self.pushButton_sift.setObjectName("pushButton_sift")
|
|
self.pushButton_lunkuo = QtWidgets.QPushButton(Formwin6)
|
|
self.pushButton_lunkuo.setGeometry(QtCore.QRect(600, 680, 250, 110))
|
|
self.pushButton_lunkuo.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:white}"
|
|
"QPushButton{border:30px}"
|
|
"QPushButton{border-radius:0px}"
|
|
"QPushButton{padding:2px 4px}"
|
|
"QPushButton{border: 4px solid lightblue}")
|
|
self.pushButton_lunkuo.setFont(QFont('幼圆', 21))
|
|
self.pushButton_lunkuo.setObjectName("pushButton_lunkuo")
|
|
|
|
self.retranslateUi(Formwin6)
|
|
QtCore.QMetaObject.connectSlotsByName(Formwin6)
|
|
|
|
def retranslateUi(self, Formwin6):
|
|
_translate = QtCore.QCoreApplication.translate
|
|
Formwin6.setWindowTitle(_translate("Formwin6", "Form"))
|
|
self.label_daichuli.setText(_translate("Formwin6", "原图"))
|
|
self.label_jieguo.setText(_translate("Formwin6", "结果"))
|
|
self.pushButton_load.setText(_translate("Formwin6", "选择图片"))
|
|
self.pushButton_save.setText(_translate("Formwin6", "保存图片"))
|
|
self.pushButton_sift.setText(_translate("Formwin6", "sift检测"))
|
|
self.pushButton_lunkuo.setText(_translate("Formwin6", "轮廓检测"))
|
|
|
|
|
|
class Ui_Formwin7(object):
|
|
def setupUi(self, Formwin7):
|
|
Formwin7.setObjectName("Formwin7")
|
|
Formwin7.resize(571, 388)
|
|
self.label_daichuli = QtWidgets.QLabel(Formwin7)
|
|
self.label_daichuli.setGeometry(QtCore.QRect(50, 50, 441, 501)) # 待处理
|
|
self.label_daichuli.setFrameShadow(QtWidgets.QFrame.Raised) # 边框阴影
|
|
self.label_daichuli.setFrameShape(QFrame.Box) # 边框样式
|
|
self.label_daichuli.setStyleSheet('background-color: rgb(240,240,240);')
|
|
self.label_daichuli.setFont(QFont('幼圆', 20))
|
|
self.label_daichuli.setAlignment(Qt.AlignCenter) # 居中对齐
|
|
self.label_daichuli.setObjectName("label_daichuli")
|
|
self.label_jieguo = QtWidgets.QLabel(Formwin7)
|
|
self.label_jieguo.setGeometry(QtCore.QRect(530, 50, 441, 501)) # 结果
|
|
self.label_jieguo.setFrameShadow(QtWidgets.QFrame.Raised) # 边框阴影
|
|
self.label_jieguo.setFrameShape(QFrame.Box) # 边框样式
|
|
self.label_jieguo.setStyleSheet('background-color: rgb(240,240,240);')
|
|
self.label_jieguo.setFont(QFont('幼圆', 20))
|
|
self.label_jieguo.setAlignment(Qt.AlignCenter) # 居中对齐
|
|
self.label_jieguo.setObjectName("label_jieguo")
|
|
self.pushButton_load = QtWidgets.QPushButton(Formwin7)
|
|
self.pushButton_load.setGeometry(QtCore.QRect(315, 570, 151, 45)) # 选择图片
|
|
self.pushButton_load.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:lightblue}"
|
|
"QPushButton{border:50px}"
|
|
"QPushButton{border-radius:20px}"
|
|
"QPushButton{padding:2px 4px}")
|
|
self.pushButton_load.setFont(QFont('幼圆', 13))
|
|
self.pushButton_load.setObjectName("pushButton_load")
|
|
self.pushButton_save = QtWidgets.QPushButton(Formwin7)
|
|
self.pushButton_save.setGeometry(QtCore.QRect(800, 570, 151, 45)) # 保存图片
|
|
self.pushButton_save.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:white}"
|
|
"QPushButton{border:50px}"
|
|
"QPushButton{border-radius:20px}"
|
|
"QPushButton{padding:2px 4px}")
|
|
self.pushButton_save.setFont(QFont('幼圆', 13))
|
|
self.pushButton_save.setObjectName("pushButton_save")
|
|
self.pushButton_xiufu = QtWidgets.QPushButton(Formwin7)
|
|
self.pushButton_xiufu.setGeometry(QtCore.QRect(385, 680, 250, 110))
|
|
self.pushButton_xiufu.setStyleSheet(
|
|
"QPushButton{color:black}"
|
|
"QPushButton:hover{color:blue}"
|
|
"QPushButton{background-color:white}"
|
|
"QPushButton{border:30px}"
|
|
"QPushButton{border-radius:0px}"
|
|
"QPushButton{padding:2px 4px}"
|
|
"QPushButton{border: 4px solid lightblue}")
|
|
self.pushButton_xiufu.setFont(QFont('幼圆', 21))
|
|
self.pushButton_xiufu.setObjectName("pushButton_xiufu")
|
|
|
|
self.retranslateUi(Formwin7)
|
|
QtCore.QMetaObject.connectSlotsByName(Formwin7)
|
|
|
|
def retranslateUi(self, Formwin7):
|
|
_translate = QtCore.QCoreApplication.translate
|
|
Formwin7.setWindowTitle(_translate("Formwin7", "Form"))
|
|
self.label_daichuli.setText(_translate("Formwin7", "原图"))
|
|
self.label_jieguo.setText(_translate("Formwin7", "结果"))
|
|
self.pushButton_load.setText(_translate("Formwin7", "选择图片"))
|
|
self.pushButton_save.setText(_translate("Formwin7", "保存图片"))
|
|
self.pushButton_xiufu.setText(_translate("Formwin7", "图像修复")) |